{"openapi":"3.0.3","info":{"title":"PlusVibe API","version":"1.0.0","contact":{"name":"PlusVibe Support","url":"https://plusvibeapi.ru/docs"},"description":"OpenAI-совместимый API для топовых LLM, веб-поиска и генерации медиа. Российский эндпоинт, оплата в рублях. Базовый адрес для /v1/* — https://plusvibeapi.ru/v1; для /api/* — https://plusvibeapi.ru."},"servers":[{"url":"https://plusvibeapi.ru","description":"PlusVibe API"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Chat","description":"Чат-эндпоинты (OpenAI, Anthropic, Responses)"},{"name":"Models","description":"Управление моделями"},{"name":"Embeddings","description":"Векторные представления текста"},{"name":"Media","description":"Генерация изображений, видео и аудио"},{"name":"Search","description":"Веб-поиск"},{"name":"Billing","description":"Баланс и история использования"},{"name":"Support","description":"Обращения в поддержку (тикеты)"},{"name":"Catalogs","description":"Публичные каталоги (без авторизации)"}],"paths":{"/v1/chat/completions":{"post":{"tags":["Chat"],"summary":"Create chat completion","description":"OpenAI-совместимый эндпоинт чатов. Авторизация: Authorization: Bearer sk-pv-…","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/messages":{"post":{"tags":["Chat"],"summary":"Create message (Anthropic format)","description":"Эндпоинт формата Anthropic Messages. Путь для Claude Code и Anthropic SDK. Авторизация: x-api-key: sk-pv-… или Authorization: Bearer sk-pv-…","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesRequest"}}}},"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/responses":{"post":{"tags":["Chat"],"summary":"Create response (OpenAI Responses API)","description":"Эндпоинт Responses API. Путь для Codex CLI (wire_api = \"responses\"). Авторизация: Authorization: Bearer sk-pv-…","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesRequest"}}}},"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/models":{"get":{"tags":["Models"],"summary":"List models","description":"Возвращает публичные ID моделей в формате vendor/model (в стиле OpenRouter), например anthropic/claude-opus-5. Краткая форма claude-opus-5 принимается на вход как алиас и тарифицируется так же. model:alias закрепляет канал, например openai/gpt-5.6-sol:cxb. GET /v1/models по умолчанию показывает один ID на модель; добавьте ?variants=1 для полного списка.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Список моделей","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/model-capabilities":{"get":{"tags":["Models"],"summary":"Discover model capabilities","description":"Полный машиночитаемый контракт для авторизованного клиента. Для медиа используйте operations[].requestJsonSchema (JSON Schema draft 2020-12) как точную схему submit body, а providerVariants — чтобы выбрать доступный маршрут. requestSchema и conditionalRequirements остаются аннотациями совместимости. operation.id — метаданные discovery, его не передают в POST /api/media/generate.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Возможности, операции, варианты провайдеров и ценовой статус моделей","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCapabilitiesResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/embeddings":{"post":{"tags":["Embeddings"],"summary":"Create embeddings","description":"Векторные представления текста для поиска, RAG и кластеризации.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRequest"}}}},"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"}}}},"/v1/audio/speech":{"post":{"tags":["Media"],"summary":"Create speech audio","description":"OpenAI-compatible speech synthesis. The request is JSON with model, input, and optional voice, response_format, and speed. The response is audio bytes; use the model page for the currently available native formats.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioSpeechRequest"}}}},"responses":{"200":{"description":"Generated audio bytes","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request or unsupported audio format"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"502":{"description":"Speech provider failed or returned unavailable audio"}}}},"/v1/audio/transcriptions":{"post":{"tags":["Media"],"summary":"Transcribe an audio file","description":"OpenAI-compatible multipart transcription. Send file and model fields; language is optional. The default response is JSON with text.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AudioTranscriptionRequest"}}}},"responses":{"200":{"description":"Transcribed text","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioTranscriptionResponse"}}}},"400":{"description":"Invalid multipart request"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"502":{"description":"Transcription provider failed"}}}},"/v1/images/generations":{"post":{"tags":["Media"],"summary":"Generate an image (OpenAI-compatible, synchronous)","description":"OpenAI-compatible image generation. Submits through the same pipeline as POST /api/media/generate — identical model resolution, price quote and debit — and holds the request until the job is terminal. Only a completed generation is charged. Every response carries x-pv-media-job-id; on a timeout, collect the result from GET /api/media/jobs/{id} or GET /v1/images/generations.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationRequest"}}}},"responses":{"200":{"description":"Generated image","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationResponse"}}}},"400":{"description":"Unknown parameter, unsupported size/quality, or a non-image model"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"description":"Unknown model"},"502":{"description":"Generation failed; nothing was charged"},"504":{"description":"Still running at the deadline; the body and x-pv-media-job-id name the job"}}},"get":{"tags":["Media"],"summary":"List this key’s image generations","description":"Owner-scoped recovery list. Exists because a synchronous generation can outlive the connection that requested it: a caller who hangs up mid-wait finds the finished (and charged) job here.","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Recent image jobs, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationListResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/media/generate":{"post":{"tags":["Media"],"summary":"Create media generation job (async)","description":"Асинхронная генерация медиа. Сначала получите авторизованный /v1/model-capabilities: он задаёт допустимые model/alias, opts, enum и условные требования для конкретной операции. operation.id служит только для discovery и не передаётся в запросе. Возвращает jobId для опроса через /api/media/jobs/{id}.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaGenerateRequest"}}}},"responses":{"202":{"description":"Задача создана","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaGenerateResponse"}}}},"400":{"description":"Некорректный JSON или общее тело запроса"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"422":{"description":"Неподдерживаемая модель, комбинация opts или не выполнены требования операции"},"502":{"description":"Провайдер не принял задачу"},"503":{"description":"Маршрут модели временно недоступен"}}}},"/api/media/public-price":{"post":{"tags":["Media"],"summary":"Quote public media price","description":"Не требует авторизации и не запускает генерацию. Передайте точные model и opts из /v1/model-capabilities, чтобы получить текущую цену. Не используйте fromRub из /api/media-catalog как точную цену.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPriceRequest"}}}},"responses":{"200":{"description":"Текущая цена в RUB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPriceResponse"}}}},"400":{"description":"Некорректное тело запроса"},"404":{"description":"Неизвестная публичная media-модель"},"422":{"description":"Недопустимая комбинация opts для расчёта цены"},"503":{"description":"Цена временно недоступна"}}}},"/api/media/price":{"post":{"tags":["Media"],"summary":"Quote authenticated media price","description":"Авторизованный эквивалент публичной проверки цены для точных model и opts; генерацию не запускает.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPriceRequest"}}}},"responses":{"200":{"description":"Текущая цена в RUB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPriceResponse"}}}},"400":{"description":"Некорректное тело запроса"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"Недопустимая комбинация opts для расчёта цены"},"500":{"description":"Расчёт цены временно недоступен"},"503":{"description":"Цена временно недоступна"}}}},"/api/media/jobs/{id}":{"get":{"tags":["Media"],"summary":"Get media job status","description":"Опрос статуса асинхронной задачи генерации медиа. При submitting + media_submission_uncertain следуйте retryGuidance: продолжайте опрос того же jobId и не создавайте дубль автоматически.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"ID задачи (jobId)"}],"responses":{"200":{"description":"Статус задачи","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaJobResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/media/veo/extend/price":{"post":{"tags":["Media"],"summary":"Quote Veo 3.1 extension","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["tier"],"properties":{"tier":{"type":"string","enum":["lite","fast","quality"]}}}}}},"responses":{"200":{"description":"Current RUB quote"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/media/veo/extend":{"post":{"tags":["Media"],"summary":"Extend a completed Veo 3.1 job","security":[{"bearerAuth":[]}],"description":"Creates a new asynchronous job. taskId is the owned PlusVibe jobId of a completed Veo 3.1 generation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["taskId","prompt","tier"],"properties":{"taskId":{"type":"string"},"prompt":{"type":"string"},"tier":{"type":"string","enum":["lite","fast","quality"]},"seeds":{"type":"integer"},"watermark":{"type":"string"}}}}}},"responses":{"202":{"description":"Extension job created"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/search":{"post":{"tags":["Search"],"summary":"Web search","description":"Веб-поиск: возвращает результаты выдачи (заголовок, ссылка, сниппет). Цена Turbo фиксирована за запрос и не зависит от числа результатов; максимум 20 результатов и 32 запроса в минуту на клиента.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}}},"responses":{"200":{"description":"Результаты поиска","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"description":"Лимит поиска на клиента исчерпан; повторите после Retry-After."}}}},"/v1/search":{"post":{"tags":["Search"],"summary":"Web search","description":"OpenAI-compatible web search. Turbo has a fixed per-request price that does not depend on the result count; maximum 20 results and 32 requests per minute per client.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SearchRequest"}}}},"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"description":"Search rate limit exceeded; retry after Retry-After."}}}},"/v1/decisions":{"post":{"tags":["Models"],"summary":"Evaluate decisions","description":"Evaluates named questions against a state and returns a probabilistic answer per question. This is NOT a chat endpoint: the decisions model is not accepted by /v1/chat/completions. Billed on input tokens only; output tokens are free. Answer shapes: choice -> choice/probabilities/confidence, score -> score/legend/probabilities/confidence, noul -> noul.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1DecisionRequest"}}}},"responses":{"200":{"description":"Decision answers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"400":{"description":"Malformed request or unknown decisions model."},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"502":{"description":"The decisions service returned an error."},"504":{"description":"The decisions service timed out."}}}},"/v1/balance":{"get":{"tags":["Billing"],"summary":"Get balance","description":"Возвращает остаток предоплаченного баланса в рублях.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Остаток баланса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/generations":{"get":{"tags":["Billing"],"summary":"List usage history","description":"История использования с пагинацией и фильтрами по датам.","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"dateFrom","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"dateTo","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"История использования","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationsResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/generations/{id}":{"get":{"tags":["Billing"],"summary":"Get a single usage record","description":"Возвращает одну запись истории использования по её id. Доступ ограничен владельцем ключа.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"ID записи (из ответа /v1/generations или заголовка x-pv-generation-id)."}],"responses":{"200":{"description":"Запись использования","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationRecord"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/pricing":{"get":{"tags":["Models","Billing"],"summary":"Get pricing","description":"Канонический источник цен: текстовые модели (data) + медиа-цены (media) с учётом live-переопределений оператором.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Цены аккаунта","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/messages/count_tokens":{"post":{"tags":["Chat"],"summary":"Count tokens (Anthropic stub)","description":"Эндпоинт-заглушка для совместимости с Anthropic SDK / Claude Code (они вызывают его перед отправкой запроса). Возвращает оценку входных токенов по эвристике (~4 символа на токен), а не точный токенайзер.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","example":"claude-opus-4.8"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"system":{"type":"string"}}}}}},"responses":{"200":{"description":"Оценка числа входных токенов","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountTokensResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/media/file/{id}/{idx}":{"get":{"tags":["Media"],"summary":"Get media file (signed proxy)","description":"Подписанный HMAC прокси-адрес результата генерации (изображение, видео, аудио или 3D-модель). URL содержит sig в query — открывается без API-ключа, можно вставлять в <img>/<video>/браузер. upstream провайдер скрыт. С download=1 файл отдаётся как вложение с именем и расширением по содержимому (например .glb для 3D-модели).","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"ID задачи (jobId) из ответа /api/media/jobs/{id}."},{"name":"idx","in":"path","required":true,"schema":{"type":"integer"},"description":"Индекс результата (0-базированный)."},{"name":"sig","in":"query","required":true,"schema":{"type":"string"},"description":"HMAC-подпись из resultUrls ответа задачи. Без неё — 404."},{"name":"download","in":"query","required":false,"schema":{"type":"string","enum":["1"]},"description":"download=1 — отдать файл как вложение (Content-Disposition: attachment) с именем и расширением по содержимому."}],"responses":{"200":{"description":"Бинарный файл (image/*, video/*, audio/* или model/gltf-binary)","content":{"image/*":{"schema":{"type":"string","format":"binary"}},"video/*":{"schema":{"type":"string","format":"binary"}},"audio/*":{"schema":{"type":"string","format":"binary"}},"model/gltf-binary":{"schema":{"type":"string","format":"binary"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/catalog":{"get":{"tags":["Catalogs"],"summary":"Public text model catalog","description":"Публичный каталог текстовых моделей (без авторизации). Модели, варианты, цены, лимиты контекста и conservative tri-state storage metadata. The array shape is stable; use authenticated /v1/model-capabilities for paginated discovery and parameter support.","security":[],"responses":{"200":{"description":"Каталог моделей","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogResponse"}}}}}}},"/api/media-catalog":{"get":{"tags":["Catalogs"],"summary":"Public media catalog","description":"Legacy-витрина медиа-моделей в объектной оболочке. Она не содержит полного per-operation schema: для автономного клиента используйте /v1/model-capabilities; для точной цены model+opts — POST /api/media/public-price.","security":[],"responses":{"200":{"description":"Каталог медиа-моделей","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaCatalogResponse"}}}}}}},"/v1/tickets":{"post":{"tags":["Support"],"operationId":"createTicket","summary":"Open a support ticket","description":"Создаёт обращение в поддержку (API-ключ или сессия кабинета). JSON или multipart/form-data с до 5 изображениями PNG/JPEG/GIF/WebP в поле `files` (до 10 МБ каждое, до 10 на обращение). Совпадающее открытое обращение (та же категория, тема, текст и requestIds — или тот же clientIncidentId) не дублируется: растёт occurrences, ответ 200. Лимит: 10 новых обращений в час на аккаунт. Текст обращения поддержка читает как недоверенные данные; он никогда не запускает изменения баланса, возвраты или выдачу доступа.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreateRequest"}},"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/TicketCreateRequest"},{"type":"object","properties":{"files":{"type":"array","maxItems":5,"items":{"type":"string","format":"binary"}}}}]}}}},"responses":{"200":{"description":"Найдено совпадающее открытое обращение; occurrences увеличен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreateResponse"}}}},"201":{"description":"Обращение создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreateResponse"}}}},"400":{"description":"Некорректные поля, слишком много файлов или чужой request ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketError"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"413":{"description":"Файл или тело запроса слишком большие"},"415":{"description":"Вложение не является изображением PNG/JPEG/GIF/WebP"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"tags":["Support"],"operationId":"listTickets","summary":"List your tickets","description":"Ваши обращения, новые сверху, с курсорной пагинацией. Передайте nextCursor в `after` для следующей страницы.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"after","in":"query","schema":{"type":"string"},"description":"nextCursor предыдущей страницы"},{"name":"status","in":"query","schema":{"type":"string","enum":["open","replied","closed"]}}],"responses":{"200":{"description":"Страница обращений","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketList"}}}},"400":{"description":"Некорректные limit, status или курсор"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/tickets/{id}":{"get":{"tags":["Support"],"operationId":"getTicket","summary":"Get a ticket with its thread","description":"Статус обращения и вся переписка: ваши сообщения и ответы поддержки по времени. Чужой или неизвестный ID — 404.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Обращение","content":{"application/json":{"schema":{"type":"object","required":["ticket"],"properties":{"ticket":{"$ref":"#/components/schemas/TicketThread"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/tickets/{id}/messages":{"post":{"tags":["Support"],"operationId":"addTicketMessage","summary":"Add a follow-up message","description":"Добавляет ваше сообщение в обращение (JSON `{\"message\": \"...\"}` или multipart с `files`). Отвеченное обращение снова становится открытым; закрытое отвечает 409 — создайте новое. Лимит: 60 сообщений в час на аккаунт.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message"],"additionalProperties":false,"properties":{"message":{"type":"string","minLength":1,"maxLength":8000}}}}}},"responses":{"201":{"description":"Сообщение добавлено; обновлённая переписка","content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"$ref":"#/components/schemas/TicketThread"}}}}}},"400":{"description":"Некорректное сообщение или слишком много файлов"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Обращение закрыто"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/tickets/{id}/close":{"post":{"tags":["Support"],"operationId":"closeTicket","summary":"Close a ticket","description":"Закрывает ваше обращение. Идемпотентно.","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Закрытое обращение","content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"$ref":"#/components/schemas/Ticket"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/tickets/{id}/attachments/{attachmentId}":{"get":{"tags":["Support"],"operationId":"getTicketAttachment","summary":"Download a ticket attachment","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Байты изображения","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/technical-feedback":{"post":{"tags":["Support"],"deprecated":true,"summary":"Report a technical issue (alias of POST /v1/tickets)","description":"Создаёт техническое обращение для ручной проверки. При активном совпадающем обращении возвращает существующую серию. Не предназначен для изменения баланса, доступа, настроек или развёртывания.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalFeedbackRequest"}}}},"responses":{"200":{"description":"Активное совпадающее обращение найдено и объединено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalFeedbackCreateResponse"}}}},"201":{"description":"Новое обращение создано","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalFeedbackCreateResponse"}}}},"400":{"description":"Некорректное тело или request ID не принадлежит этому клиенту"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"Обращение содержит нетехническую операционную инструкцию"}}}},"/v1/technical-feedback/{id}":{"get":{"tags":["Support"],"deprecated":true,"summary":"Get a technical issue (alias of GET /v1/tickets/{id})","description":"Возвращает только обращение, принадлежащее владельцу API-ключа.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Идентификатор обращения"}],"responses":{"200":{"description":"Обращение","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalFeedbackGetResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Authorization: Bearer sk-pv-…"},"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"x-api-key: sk-pv-… (формат Anthropic)"}},"responses":{"Unauthorized":{"description":"Не авторизован — ключ отсутствует или недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"PaymentRequired":{"description":"Недостаточно средств на балансе","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"Превышен лимит частоты (429)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Секунды до следующей попытки"}}},"NotFound":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"ChatCompletionRequest":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"Публичный ID модели в формате vendor/model (в стиле OpenRouter), например anthropic/claude-opus-5. Краткая форма claude-opus-5 принимается на вход как алиас и тарифицируется так же. model:alias закрепляет канал, например openai/gpt-5.6-sol:cxb. GET /v1/models по умолчанию показывает один ID на модель; ?variants=1 возвращает полный список.","example":"anthropic/claude-opus-5"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"stream":{"type":"boolean","description":"Потоковая передача через SSE","default":false},"max_tokens":{"type":"integer","description":"Максимум токенов в ответе"},"temperature":{"type":"number","description":"Случайность вывода, 0–2","default":1},"top_p":{"type":"number"},"reasoning_effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"],"description":"Уровень рассуждения для Chat Completions. Набор поддерживаемых значений зависит от модели."},"tools":{"type":"array","description":"Список инструментов (function calling)"},"tool_choice":{"type":"string","description":"auto, none, required или конкретный инструмент"},"response_format":{"type":"object","description":"Принудительный вывод в JSON"}}},"ChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","example":"chat.completion"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"$ref":"#/components/schemas/Message"},"finish_reason":{"type":"string"}}}},"usage":{"$ref":"#/components/schemas/Usage"}}},"MessagesRequest":{"type":"object","required":["model","max_tokens","messages"],"properties":{"model":{"type":"string","example":"claude-opus-4.8"},"max_tokens":{"type":"integer"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"system":{"type":"string","description":"Системный промпт (строка или массив блоков с cache_control)"},"stream":{"type":"boolean","default":false},"thinking":{"type":"object","description":"Native thinking для Claude (budget_tokens)","properties":{"type":{"type":"string","enum":["enabled","disabled"]},"budget_tokens":{"type":"integer"}}}}},"MessagesResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","example":"message"},"role":{"type":"string","example":"assistant"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}}}},"model":{"type":"string"},"stop_reason":{"type":"string"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}}}}},"ResponsesRequest":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","example":"gpt-5.6"},"input":{"description":"Строка или массив входных сообщений"},"reasoning":{"type":"object","description":"Параметры рассуждения. Набор поддерживаемых значений зависит от модели.","properties":{"effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"summary":{"type":"string","enum":["auto","concise","detailed"]}}},"stream":{"type":"boolean","default":false}}},"ResponsesResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","example":"response"},"model":{"type":"string"},"output":{"type":"array"},"usage":{"$ref":"#/components/schemas/Usage"}}},"Message":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"description":"Строка или массив блоков (text, image_url)"}}},"Usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}},"ModelsResponse":{"type":"object","properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","example":"model"}}}}}},"EmbeddingRequest":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","example":"qwen3-embedding-8b"},"input":{"description":"Строка или массив строк (батч)"},"encoding_format":{"type":"string","enum":["float","base64"],"default":"float"}}},"EmbeddingResponse":{"type":"object","properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","example":"embedding"},"index":{"type":"integer"},"embedding":{"type":"array","items":{"type":"number"}}}}},"model":{"type":"string"},"usage":{"$ref":"#/components/schemas/Usage"}}},"ImagesRequest":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","example":"gpt-image-2"},"prompt":{"type":"string"},"n":{"type":"integer","default":1},"size":{"type":"string","example":"1024x1024"},"quality":{"type":"string","enum":["low","medium","high"]}}},"ImagesResponse":{"type":"object","properties":{"created":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"b64_json":{"type":"string"},"revised_prompt":{"type":"string","nullable":true}}}},"usage":{"$ref":"#/components/schemas/Usage"}}},"MediaGenerateRequest":{"type":"object","required":["model"],"properties":{"model":{"type":"string","minLength":1,"example":"veo-3.1","description":"Public model ID or supported provider alias from /v1/model-capabilities."},"prompt":{"type":"string","description":"Required only when the selected operation contract requires it. URL-only utility operations may omit it."},"opts":{"type":"object","additionalProperties":true,"description":"Model- and operation-specific options. Obtain fields, enums and conditional requirements from /v1/model-capabilities."}}},"AudioSpeechRequest":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","minLength":1,"description":"A public TTS model from /v1/models or /v1/model-capabilities."},"input":{"type":"string","minLength":1,"maxLength":10000,"description":"Text to synthesize."},"voice":{"type":"string","description":"Model-specific voice or language selection; default is used when omitted."},"response_format":{"type":"string","enum":["mp3","opus","aac","flac","wav","pcm"],"description":"Requested output format. Native provider output is returned; unsupported conversions fail closed."},"speed":{"type":"number","minimum":0.25,"maximum":4,"description":"Speech speed where supported by the selected model."}}},"AudioTranscriptionRequest":{"type":"object","required":["file","model"],"properties":{"file":{"type":"string","format":"binary","description":"Audio file, up to 50 MB."},"model":{"type":"string","minLength":1,"description":"A public STT model from /v1/models or /v1/model-capabilities."},"language":{"type":"string","minLength":2,"maxLength":10,"description":"Optional language code, for example ru or en."}}},"ImageGenerationRequest":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","minLength":1,"description":"A public image model from /api/media-catalog. The bare id, a vendor-prefixed id (google/gemini-3.1-flash-image) and a pinned variant (gpt-image-2:network) all address the same model."},"prompt":{"type":"string","minLength":1},"n":{"type":"integer","enum":[1],"description":"Only 1: each generation is a separate job with its own price."},"size":{"type":"string","description":"OpenAI size, honoured as its aspect ratio (1024x1024, 1792x1024, 1024x1792, 1536x1024, 1024x1536, auto, or any WxH that reduces to a ratio the model offers)."},"quality":{"type":"string","description":"Forwarded only to models with a priced quality axis; auto omits it. A value the model does not offer is refused, never dropped."},"response_format":{"type":"string","enum":["url","b64_json"],"default":"url"},"user":{"type":"string","description":"Accepted and ignored."}}},"ImageGenerationResponse":{"type":"object","required":["created","data"],"properties":{"created":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"b64_json":{"type":"string"}}}}}},"ImageGenerationListResponse":{"type":"object","required":["object","data"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","required":["id","model","status","created","cost_rub","data"],"properties":{"id":{"type":"string"},"model":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed","in_progress"]},"created":{"type":"integer"},"cost_rub":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}}}}}}}},"AudioTranscriptionResponse":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}},"MediaGenerateResponse":{"type":"object","required":["ok","jobId","status","model","provider","priceRub","requestedModel","effectiveModel","addressAs","providerAlias"],"properties":{"ok":{"type":"boolean"},"jobId":{"type":"string"},"status":{"type":"string","enum":["processing"]},"model":{"type":"string"},"provider":{"type":"string","enum":["pixel","flow","canvas","prime"]},"priceRub":{"type":"number"},"requestedModel":{"type":"string"},"effectiveModel":{"type":"string"},"addressAs":{"type":"string"},"providerAlias":{"type":"string","enum":["pixel","flow","canvas","prime"]}}},"MediaJobResponse":{"type":"object","properties":{"status":{"type":"string","enum":["submitting","processing","success","fail"]},"model":{"type":"string"},"provider":{"type":"string","enum":["pixel","flow","canvas","prime"]},"requestedModel":{"type":"string"},"effectiveModel":{"type":"string"},"addressAs":{"type":"string"},"providerAlias":{"type":"string","enum":["pixel","flow","canvas","prime"]},"resultUrls":{"type":"array","items":{"type":"string"}},"resultsExpireAt":{"type":"string","format":"date-time","nullable":true,"description":"Файлы результата хранятся 7 дней после завершения задачи; после этого момента resultUrls отвечают 410 Gone."},"resultText":{"type":"string","nullable":true},"resultMeta":{"type":"object","nullable":true,"additionalProperties":true},"priceRub":{"type":"number"},"failMsg":{"type":"string","nullable":true},"errorCode":{"type":"string","nullable":true},"retryGuidance":{"type":"string","nullable":true,"description":"Безопасная инструкция для media_submission_uncertain: опросить тот же jobId позже, не отправляя дубликат."}}},"MediaCatalogResponse":{"type":"object","required":["pricesArePlaceholder","pricesAreEstimate","videoDisabled","models"],"properties":{"pricesArePlaceholder":{"type":"boolean"},"pricesAreEstimate":{"type":"boolean"},"videoDisabled":{"type":"boolean"},"models":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"MediaPriceRequest":{"type":"object","required":["model"],"properties":{"model":{"type":"string","minLength":1},"opts":{"type":"object","additionalProperties":true,"description":"Exact option values whose price should be quoted."}}},"MediaPriceResponse":{"type":"object","required":["ok","priceRub","isEstimate"],"properties":{"ok":{"type":"boolean","enum":[true]},"priceRub":{"type":"number"},"isEstimate":{"type":"boolean"}},"additionalProperties":true},"ModelCapabilitiesResponse":{"type":"object","description":"Model discovery payload. Every media operation includes requestJsonSchema (JSON Schema draft 2020-12 for the exact generate body), plus compatibility annotations requestSchema and conditionalRequirements, providerVariants, availability and price-status metadata.","properties":{"models":{"type":"array","items":{"type":"object"}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":1},"pageSize":{"type":"integer","minimum":1,"maximum":100},"total":{"type":"integer","minimum":0},"totalPages":{"type":"integer","minimum":0}}},"stores_data_in_russia":{"type":"boolean","nullable":true},"supported_parameters":{"type":"object","description":"Endpoint/operation-scoped parameter support. Values are supported or unconfirmed."}},"additionalProperties":true},"SearchRequest":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Поисковый запрос (до 1000 символов)"},"num":{"type":"number","description":"Сколько результатов вернуть (1–20)","default":10},"region":{"type":"string","enum":["ru","global"],"default":"ru"}}},"V1SearchRequest":{"type":"object","required":["query"],"properties":{"query":{"type":"string","minLength":1,"maxLength":1000},"max_results":{"type":"integer","minimum":1,"maximum":20,"default":10},"country":{"type":"string","pattern":"^[A-Za-z]{2}$"},"language":{"type":"string","pattern":"^[A-Za-z]{2}$"},"mode":{"type":"string","enum":["turbo","base","pro"],"default":"turbo"}}},"SearchResponse":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"snippet":{"type":"string"}}}},"searched":{"type":"number"},"cost_rub":{"type":"number"}}},"V1DecisionRequest":{"type":"object","required":["state","questions"],"additionalProperties":false,"properties":{"model":{"type":"string","description":"Decisions model id. Optional while only one model exists.","example":"typesafe/jev-1.13"},"state":{"description":"The context the decision is evaluated against: a string, an object, or an array.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":true},{"type":"array","items":{}}]},"questions":{"type":"object","minProperties":1,"maxProperties":20,"additionalProperties":{"$ref":"#/components/schemas/DecisionQuestion"}}}},"DecisionQuestion":{"type":"object","required":["type","instructions"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["choice","score","noul"]},"instructions":{"type":"string"},"criteria":{"description":"choice: an object mapping each option to its description. score: an ordered array of level labels. noul: omitted.","oneOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"array","items":{"type":"string"}}]}}},"DecisionResponse":{"type":"object","properties":{"object":{"type":"string","enum":["decisions"]},"model":{"type":"string","example":"typesafe/jev-1.13"},"answers":{"type":"object","description":"One entry per question name; the shape depends on the question type.","additionalProperties":{"type":"object","additionalProperties":true}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}}}}},"BalanceResponse":{"type":"object","properties":{"balance_rub":{"type":"number"},"currency":{"type":"string","example":"RUB"}}},"GenerationsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"promptTokens":{"type":"integer"},"completionTokens":{"type":"integer"},"priceRub":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}}}},"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"}}},"TicketCreateRequest":{"type":"object","required":["subject","message"],"additionalProperties":false,"properties":{"subject":{"type":"string","minLength":3,"maxLength":200},"message":{"type":"string","minLength":10,"maxLength":8000},"category":{"type":"string","default":"general","enum":["api_error","performance","incorrect_response","integration","feature_request","other","billing","account","general"]},"requestIds":{"type":"array","maxItems":10,"uniqueItems":true,"description":"ID запросов вашего аккаунта; необязательны.","items":{"type":"string","minLength":1,"maxLength":128}},"clientIncidentId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","description":"Ваш стабильный ID серии; открытое обращение с тем же ID переиспользуется."}}},"Ticket":{"type":"object","required":["id","object","subject","category","source","status","requestIds","occurrences","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"object":{"type":"string","enum":["ticket"]},"subject":{"type":"string"},"category":{"type":"string"},"source":{"type":"string","enum":["api","dashboard","technical-feedback"]},"status":{"type":"string","enum":["open","replied","closed"]},"requestIds":{"type":"array","items":{"type":"string"}},"clientIncidentId":{"type":"string","nullable":true},"occurrences":{"type":"integer","minimum":1},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"repliedAt":{"type":"string","format":"date-time","nullable":true}}},"TicketMessage":{"type":"object","required":["id","author","body","createdAt","attachments"],"properties":{"id":{"type":"string"},"author":{"type":"string","enum":["client","staff"]},"body":{"type":"string","description":"Обычный текст. Показывайте как текст, не как HTML."},"createdAt":{"type":"string","format":"date-time"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"byteSize":{"type":"integer"}}}}}},"TicketThread":{"allOf":[{"$ref":"#/components/schemas/Ticket"},{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/TicketMessage"}}}}]},"TicketCreateResponse":{"type":"object","required":["deduplicated","ticket"],"properties":{"deduplicated":{"type":"boolean"},"ticket":{"$ref":"#/components/schemas/Ticket"}}},"TicketList":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"hasMore":{"type":"boolean"},"nextCursor":{"type":"string","nullable":true}}},"TicketError":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","example":"invalid_fields"}}},"TechnicalFeedbackRequest":{"type":"object","required":["category","summary","details"],"additionalProperties":false,"properties":{"category":{"type":"string","enum":["api_error","performance","incorrect_response","integration","feature_request","other"]},"summary":{"type":"string","minLength":3,"maxLength":200},"details":{"type":"string","minLength":10,"maxLength":4000},"requestIds":{"type":"array","maxItems":10,"uniqueItems":true,"description":"ID запросов этого же клиента; необязательны.","items":{"type":"string","minLength":1,"maxLength":128}},"clientIncidentId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","description":"Стабильный ID серии на стороне клиента для дедупликации."}}},"TechnicalFeedbackIncident":{"type":"object","required":["id","category","summary","requestIds","status","occurrences","lastSeenAt","createdAt"],"properties":{"id":{"type":"string"},"category":{"type":"string","enum":["api_error","performance","incorrect_response","integration","feature_request","other"]},"summary":{"type":"string"},"requestIds":{"type":"array","items":{"type":"string"}},"clientIncidentId":{"type":"string","nullable":true},"status":{"type":"string","example":"manual_review"},"occurrences":{"type":"integer","minimum":1},"lastSeenAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"TechnicalFeedbackCreateResponse":{"type":"object","required":["deduplicated","incident"],"properties":{"deduplicated":{"type":"boolean"},"incident":{"$ref":"#/components/schemas/TechnicalFeedbackIncident"}}},"TechnicalFeedbackGetResponse":{"type":"object","required":["incident"],"properties":{"incident":{"$ref":"#/components/schemas/TechnicalFeedbackIncident"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"integer"}}}}},"GenerationRecord":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"mediaType":{"type":"string","enum":["TEXT","IMAGE","VIDEO","AUDIO","MUSIC","MODEL_3D"]},"promptTokens":{"type":"integer"},"completionTokens":{"type":"integer"},"units":{"type":"integer","nullable":true},"priceRub":{"type":"number"},"createdAt":{"type":"string","format":"date-time"}}},"PricingResponse":{"type":"object","properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","description":"Текстовые модели и их варианты с ценами","items":{"type":"object","properties":{"model":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"addressAs":{"type":"string","description":"Точное значение поля model в запросе"},"inputRub":{"type":"number"},"outputRub":{"type":"number"},"cacheable":{"type":"boolean"},"cacheReadRub":{"type":"number","nullable":true},"isDefault":{"type":"boolean"}}}}}}},"media":{"type":"array","description":"Медиа-модели и цены за юнит","items":{"type":"object","properties":{"model":{"type":"string"},"type":{"type":"string","enum":["image","video","audio","music"]},"endpoint":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"addressAs":{"type":"string"},"pricePerUnitRub":{"type":"number"}}}},"estimated":{"type":"boolean"}}}}}},"CountTokensResponse":{"type":"object","properties":{"input_tokens":{"type":"integer","description":"Оценка входных токенов (~4 символа на токен)"}}},"ImagesEditRequest":{"type":"object","required":["model","prompt","image"],"properties":{"model":{"type":"string","example":"gpt-image-2"},"prompt":{"type":"string","description":"Инструкция для редактирования"},"image":{"type":"string","description":"URL исходного изображения (НЕ multipart)"},"n":{"type":"integer","default":1},"size":{"type":"string","example":"1024x1024"}}},"VideoGenerationsRequest":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","example":"klingai/kling-v3.0-t2v"},"prompt":{"type":"string","description":"Текстовое описание сцены"},"n":{"type":"integer","default":1,"description":"Количество роликов"},"duration":{"type":"integer","description":"Длительность в секундах (5 или 10 для Kling). 1 юнит = 5 секунд."}}},"VideoGenerationsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"URL готового ролика (публичный upstream)"},"duration":{"type":"integer","nullable":true},"revised_prompt":{"type":"string","nullable":true}}}},"usage":{"$ref":"#/components/schemas/Usage"}}},"CatalogResponse":{"type":"array","description":"Публичный каталог текстовых моделей","items":{"type":"object","properties":{"model":{"type":"string"},"apiModel":{"type":"string"},"variants":{"type":"array","items":{"type":"object"}},"stores_data_in_russia":{"type":"boolean","nullable":true,"description":"Conservative aggregation across public provider variants; null when any route is unknown or routes disagree."},"byRequest":{"type":"boolean"},"blurb":{"type":"string"}}}}}}}