Справочник API

Все эндпоинты из спецификации OpenAPI. Выберите эндпоинт, чтобы увидеть параметры и отправить реальный запрос своим ключом.

POST/chat/completions

Create a chat completion

Параметры

Idempotency-Keyheader
string — Retrying with the same key within 24h replays the first response (streams included, up to 2MB) instead of running and billing the request again. Keys are dropped after a 5xx so the retry runs.
X-Titleheader
string — Your app's name; shown in usage analytics and GET /generation.
HTTP-Refererheader
string — Your app's URL; shown in usage analytics. Also checked against a key's allowed_referrers.
X-UltraGPT-Cacheheader
"true" | "false" — Serve identical requests from the response cache (also accepted as X-OpenRouter-Cache).
X-UltraGPT-Cache-TTLheader
integer
X-UltraGPT-Cache-Clearheader
"true" | "false"

Тело запроса

modelrequired
string — Model id; append :online for web search
models
string[]
messagesrequired
object[]
stream
boolean
stream_options
object
max_tokens
integer
max_completion_tokens
integer
temperature
number
top_p
number
top_k
integer
stop
string | string[]
seed
integer
presence_penalty
number
frequency_penalty
number
tools
object[]
tool_choice
object
parallel_tool_calls
boolean
response_format
object
reasoning
object
reasoning_effort
string
plugins
object[]
provider
object
user
string
safety_identifier
string — Stable, hashed id of your end user; recorded on the generation (GET /generation `end_user`). Preferred over the deprecated `user`.

Ответы

200OK
429Rate limited (key RPM/TPM/concurrency, or the account ceiling across keys)
4XXError (OpenAI shape)
5XXError (OpenAI shape)

Тело ответа

id
string
object
string
created
integer
model
string
choices
object[]
usage
object

Попробовать

Запросы идут из браузера прямо в API с этим ключом и оплачиваются как обычно. Ключ хранится только в этой вкладке.

cURL
curl -X POST "https://api.ultragpt.pro/v1/chat/completions" \
  -H "Authorization: Bearer $ULTRAGPT_API_KEY"