All endpoints are accessed through the current site domain (proxied). The domain in the examples below is generated dynamically by the page — no manual replacement needed.
echo exaiv.com;; *) echo https://exaiv.com;; esac)Auth: send an Authorization: Bearer YOUR_API_KEY header; for sub-sites also send x-site-id (credits are isolated per site)..
Käytä OpenAI Responses API:ta keskusteluihin. Responses API on uusin OpenAI API -muoto joustavammalla syötteellä.
Bearer YOUR_API_KEY| Parametri | Tyyppi | Pakollinen | Kuvaus |
|---|---|---|---|
| model | string | Pakollinen | Mallin nimi, esim. deepseek-v4.1-flash, qwen3.8-max |
| input | string | Pakollinen | Syöteteksti tai keskustelun sisältö |
| max_tokens | integer | Valinnainen | Tulostokenien enimmäismäärä |
| temperature | float | Valinnainen | Näytteenottolämpötila, ohjaa satunnaisuutta (0-2) |
| stream | boolean | Valinnainen | Ota suoratoistovastaus käyttöön, aseta true SSE:tä varten |
| Parametri | Tyyppi | Kuvaus |
|---|---|---|
| id | string | Yksilöllinen vastauksen tunniste |
| model | string | Todellinen käytetty malli |
| output | string | Luotu tekstituloste |
| usage | object | Tokenien käyttötilastot, mukaan lukien prompt_tokens, completion_tokens, total_tokens |
curl echo exaiv.com;; *) echo https://exaiv.com;; esac)/api/ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "deepseek-v4.1-flash",
"input": "Hello, who are you?",
"max_tokens": 1000
}'