LLM

Chat completion (OpenAI-совместимый)

Drop-in замена POST https://api.openai.com/v1/chat/completions: model — slug из GET /v1/models (LLM-записи), messages — массив OpenAI-сообщений, stream: true — SSE-поток чанков chat.completion.chunk. Неизвестные верхнеуровневые поля (route, transforms, usage, include_reasoning) игнорируются, не отклоняются.

Оплата — кредитами по ставке модели (pricing в LlmModelSummary); фактическое списание конкретного ответа — GET /v1/generation?id=<id ответа>. Ответ содержит id вида chatcmpl-… и provider: "Clipia".

Ошибки — в OpenAI-конверте { "error": { "message", "type", "code" } }: 402 insufficient_quota, 429 rate_limit_error (+ Retry-After), 404 model_not_found.

Sandbox. С тестовым ключом (clipia_test_…) возвращается детерминированный ответ без обращения к модели и без списания.

post/v1/chat/completions

Request

  • Base URL: https://api.clipia.ai
  • URL: https://api.clipia.ai/v1/chat/completions
  • Auth: API key in header Authorization

Request body

modelstring required

Slug LLM-модели из GET /v1/models.

streamboolean
temperaturenumber
top_pnumber
max_tokensinteger
max_completion_tokensinteger
ninteger
seedinteger
toolsobject[]
tool_choiceunknown
response_formatobject
reasoning_effortstring
userstring

Example request

{
  "model": "gpt-5.6-sol"
}

Response

Ответ chat.completion (JSON) либо SSE-поток (text/event-stream) при stream: true, завершающийся data: [DONE].

idstring required

Детерминированный id ответа; принимается GET /v1/generation?id=.

object'chat.completion' required
createdinteger required
modelstring required
provider'Clipia'

Example response

{
  "id": "chatcmpl-7Qx9rT2bK3mN8pL1sV4wY6zA"
}

Changes

No recorded changes to this operation across all 1 revision of this API.