{"openapi":"3.1.0","info":{"title":"Sarovi API","version":"1.6.0","description":"Persian-first AI platform. One account, shared credits, scoped project keys. Provider capabilities may exceed the subset exposed here."},"servers":[{"url":"https://api.sarovi.ir"}],"paths":{"/v1/models":{"get":{"summary":"فهرست مدل‌ها و مسیرهای قابل استفاده","description":"Required scope: models:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_models","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["models"]}},"/v1/chat/completions":{"post":{"summary":"Chat with text, images, inline audio/video, function tools and structured outputs","description":"Select thinking intensity with reasoning.effort (or reasoning_effort). Discover the exact supported values per model in GET /v1/models reasoning.supported_efforts. Omit both fields for automatic behavior. Unsupported values and conflicting aliases return HTTP 400 before credits are reserved. Higher effort may take longer and consume more output tokens within the request token limit. include_reasoning controls visibility separately.","operationId":"post__v1_chat_completions","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."},{"name":"X-Customer-ID","in":"header","schema":{"type":"string","maxLength":120},"description":"Your internal customer or record ID for usage reconciliation; do not include personal information."},{"name":"X-Reference-ID","in":"header","schema":{"type":"string","maxLength":120},"description":"Your internal customer or record ID for usage reconciliation; do not include personal information."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"OpenAI-compatible completion or SSE; tool execution remains in the client.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}},"text/event-stream":{"schema":{"type":"string"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["chat"]}},"/v1/responses":{"post":{"summary":"Text or single-image Responses; JSON or SSE","description":"Select thinking intensity with reasoning.effort (or reasoning_effort). Discover the exact supported values per model in GET /v1/models reasoning.supported_efforts. Omit both fields for automatic behavior. Unsupported values and conflicting aliases return HTTP 400 before credits are reserved. Higher effort may take longer and consume more output tokens within the request token limit. include_reasoning controls visibility separately. Text models require responses:write. An image model as the top-level model requires studio:write and returns one image_generation_call with base64 result; optional image_generation settings and stream=true are supported. Chat-model image tools, previous_response_id, remote image URLs and partial images are not supported. See the images guide for supported options.","operationId":"post__v1_responses","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."},{"name":"X-Customer-ID","in":"header","schema":{"type":"string","maxLength":120},"description":"Your internal customer or record ID for usage reconciliation; do not include personal information."},{"name":"X-Reference-ID","in":"header","schema":{"type":"string","maxLength":120},"description":"Your internal customer or record ID for usage reconciliation; do not include personal information."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRequest"},"example":{"model":"z-ai/glm-5.3-flash","input":"سلام! در یک جمله خودت را معرفی کن.","max_output_tokens":512}}}},"responses":{"200":{"description":"JSON response (including image_generation_call for image models), or SSE when stream=true: response.output_item.done, response.image_generation_call.completed, response.created, response.output_text.delta, response.reasoning.delta (opt-in), response.tool, response.completed or response.failed.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"response"},"model":{"type":"string"},"status":{"enum":["completed","incomplete"]},"output_text":{"type":"string"},"reasoning":{"type":"object","description":"Present only when include_reasoning=true. Provider output; availability varies.","properties":{"status":{"enum":["available","unavailable"]},"text":{"type":"string"},"format":{"enum":["summary","text"]},"source":{"const":"provider"}}},"output":{"type":"array","items":{"type":"object"}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}}},"text/event-stream":{"schema":{"type":"string"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["responses"]}},"/v1/studio/image":{"post":{"summary":"ساخت image با موتور استودیو","description":"Required scope: studio:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_studio_image","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRequest"},"example":{"model":"google/gemini-2.5-flash-image","prompt":"یک پوستر عمودی از انار سرخ روی میز سنگی، نور نرم پنجره","aspectRatio":"auto","count":1}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResult"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["studio"]}},"/v1/studio/audio":{"post":{"summary":"ساخت audio با موتور استودیو","description":"Required scope: studio:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_studio_audio","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioRequest"},"example":{"model":"google/gemini-3.8-flash-tts","text":"سلام! به ساروی خوش آمدید.","voice":"Kore","format":"wav","instructions":"Warm, friendly Persian"}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioResult"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["studio"]}},"/v1/studio/text":{"post":{"summary":"ساخت text با موتور استودیو","description":"Required scope: studio:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_studio_text","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextRequest"},"example":{"model":"z-ai/glm-5.3","prompt":"یک معرفی کوتاه فارسی برای یک فروشگاه بنویس."}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextResult"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["studio"]}},"/v1/studio/video":{"post":{"summary":"ساخت video با موتور استودیو","description":"Required scope: studio:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_studio_video","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRequest"},"example":{"model":"bytedance/seedance-2.5","prompt":"نمای نزدیک گل‌های بهاری، حرکت آرام دوربین و نور صبح","duration":4,"resolution":"480p","aspectRatio":"16:9","generateAudio":false}}}},"responses":{"202":{"description":"Accepted; poll status until terminal completion.","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoSubmission"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["studio"]}},"/v1/studio/video/status":{"post":{"summary":"وضعیت و تسویهٔ ساخت ویدیو","description":"Required scope: studio:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_studio_video_status","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"},"example":{"id":"SAROVI_JOB_ID","providerJobId":"PROVIDER_JOB_ID"}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoStatus"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["studio"]}},"/v1/studio/video/content":{"post":{"summary":"دریافت فایل ویدیو پس از تکمیل","description":"Required scope: studio:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_studio_video_content","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"},"example":{"id":"SAROVI_JOB_ID","providerJobId":"PROVIDER_JOB_ID"}}}},"responses":{"200":{"description":"Video file","content":{"video/mp4":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["studio"]}},"/v1/audio/transcriptions":{"post":{"summary":"تبدیل صدای Base64 به متن","description":"Required scope: audio:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_audio_transcriptions","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptionRequest"},"example":{"model":"openai/whisper-large-v3-turbo","language":"fa","audioBase64":"YOUR_BASE64_AUDIO_DATA","mediaType":"audio/wav"}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptionResponse"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["audio"]}},"/v1/realtime/calls":{"post":{"summary":"ساخت اتصال WebRTC با SDP","description":"Required scope: audio:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_realtime_calls","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeCreate"},"example":{"sdp":"YOUR_WEBRTC_OFFER_SDP"}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["realtime"]},"delete":{"summary":"پایان اتصال صوتی متعلق به حساب","description":"Required scope: audio:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"delete__v1_realtime_calls","security":[{"BearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeEnd"}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["realtime"]}},"/v1/agents":{"get":{"summary":"عامل‌های پروژه","description":"Required scope: agents:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_agents","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["agents"]},"post":{"summary":"ذخیرهٔ عامل","description":"Required scope: agents:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_agents","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"},"example":{"name":"دستیار پشتیبانی","kind":"chat","model":"z-ai/glm-5.3-flash","instructions":"به فارسی پاسخ بده. اگر اطلاعات کافی نیست، یک پرسش روشن بپرس."}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["agents"]}},"/v1/agents/{id}":{"delete":{"summary":"حذف عامل","description":"Required scope: agents:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"delete__v1_agents_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["agents"]},"patch":{"tags":["agents"],"summary":"Update the saved agent draft","description":"Required scope: agents:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"patch__v1_agents_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPatch"},"example":{"instructions":"Answer from business documents and offer human handoff."}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRecord"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/runs":{"post":{"summary":"اجرای عامل؛ پاسخ مستقیم یا کار ماندگار","description":"Required scope: agents:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_agents_id_runs","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRun"}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Durable Work accepted; poll status_url."},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["agents"]}},"/v1/work":{"post":{"summary":"شروع پژوهش، سند، کد یا تحلیل داده","description":"Required scope: work:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_work","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkRequest"},"example":{"kind":"document","title":"راهنمای شروع فروشگاه","input":"یک راهنمای عملی فارسی برای شروع فروشگاه کوچک اینترنتی بنویس. چک‌لیست مراحل و جدول هزینه‌های نمونه داشته باشد."}}}},"responses":{"202":{"description":"Work accepted. Poll the existing status_url; do not resubmit to check progress.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkAccepted"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["work"]}},"/v1/work/{id}":{"get":{"summary":"دریافت وضعیت، رویدادها و فهرست فایل‌ها","description":"Required scope: files:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_work_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["work"]}},"/v1/work/{id}/cancel":{"post":{"summary":"لغو کار","description":"Required scope: work:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_work_id_cancel","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["work"]}},"/v1/work/{id}/files":{"get":{"summary":"دریافت فایل خروجی یا بستهٔ کامل","description":"Required scope: files:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_work_id_files","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"query","name":"path","schema":{"type":"string"},"description":"Exact artifact manifest file path; required unless bundle=1."},{"in":"query","name":"bundle","schema":{"enum":["1"]}}],"responses":{"200":{"description":"Artifact file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["work"]}},"/v1/knowledge":{"get":{"summary":"پروژه‌های دانشی مشترک حساب","description":"Required scope: knowledge:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_knowledge","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["knowledge"]},"post":{"summary":"ساخت پروژهٔ دانشی در حساب","description":"Required scope: knowledge:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_knowledge","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeCreate"},"example":{"name":"راهنمای محصول","instructions":"پاسخ‌ها را با توجه به راهنمای محصول بنویس."}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["knowledge"]}},"/v1/files/{id}":{"get":{"summary":"دریافت فایل تصویر یا صدای ذخیره‌شدهٔ پروژه","description":"Required scope: files:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_files_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Stored media file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["files"]}},"/v1/balance":{"get":{"summary":"موجودی مشترک حساب","description":"Required scope: usage:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_balance","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"The account balance shared by Sarovi products.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["balance"]}},"/v1/usage":{"get":{"summary":"مصرف پروژه در ۳۰ روز گذشته","description":"Required scope: usage:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_usage","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["usage"]}},"/v1/requests/{id}":{"get":{"summary":"گزارش و وضعیت درخواست پروژه","description":"Required scope: usage:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_requests_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["requests"]}},"/v1/requests/lookup":{"get":{"summary":"Recover a request receipt after lost response headers","description":"Required scope: usage:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_requests_lookup","security":[{"BearerAuth":[]}],"parameters":[{"in":"query","name":"idempotency_key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"description":"The original request key. Only receipts submitted with the current API credential are returned. This does not repeat generation."}],"responses":{"200":{"description":"Billing metadata only. An empty data array means no receipt was found; it does not prove the original request was uncharged.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","maxItems":1,"items":{"type":"object","required":["id","idempotency_key","endpoint","state","credits","pending"],"properties":{"id":{"type":"string","format":"uuid"},"idempotency_key":{"type":"string"},"endpoint":{"type":"string"},"state":{"enum":["running","completed","failed"]},"status_code":{"type":["integer","null"]},"credits":{"type":"integer","minimum":0},"pending":{"type":"boolean"}}}}}}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["requests"]}},"/v1/cloud":{"get":{"summary":"فهرست ابرهای پروژه و بسته‌های آماده","description":"Required scope: cloud:read. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"get__v1_cloud","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]},"post":{"summary":"ساخت Starter رایگان یا ابر اختصاصی","description":"Required scope: cloud:write. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"post__v1_cloud","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudCreate"},"example":{"name":"فروشگاه من","plan":"starter"}}}},"responses":{"201":{"description":"Starter created and ready."},"202":{"description":"Accepted; poll status until terminal completion.","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}":{"delete":{"summary":"حذف دائمی ابر و سایت‌های آن","description":"Required scope: cloud:write. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"delete__v1_cloud_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudDelete"}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]},"get":{"summary":"وضعیت ابر و سلامت سرویس‌ها","description":"Required scope: cloud:read. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"get__v1_cloud_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/sites/{siteId}":{"delete":{"summary":"حذف دائمی سایت و انتشارهای آن","description":"Required scope: cloud:hosting. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"delete__v1_cloud_id_sites_siteId_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudDelete"}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]},"get":{"summary":"وضعیت و URL انتشار سایت","description":"Required scope: cloud:read. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"get__v1_cloud_id_sites_siteId_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/retry":{"post":{"summary":"ادامهٔ آماده‌سازی همان ابر","description":"Required scope: cloud:write. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"post__v1_cloud_id_retry","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"responses":{"202":{"description":"Accepted; poll status until terminal completion.","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/connection":{"get":{"summary":"آدرس سرویس و کلید عمومی برنامه","description":"Required scope: cloud:read. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"get__v1_cloud_id_connection","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/database":{"post":{"summary":"عملیات مجموعه‌های Starter یا SQL اختصاصی","description":"Required scope: cloud:write. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"post__v1_cloud_id_database","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudSql"},"example":{"action":"list","table":"records"}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]},"get":{"summary":"فهرست مجموعه‌های Starter","description":"Required scope: cloud:read. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"get__v1_cloud_id_database","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/auth":{"get":{"summary":"تنظیمات ورود کاربران برنامه","description":"Required scope: cloud:read. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"get__v1_cloud_id_auth","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]},"patch":{"summary":"آدرس برنامه و دسترسی ثبت‌نام","description":"Required scope: cloud:write. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"patch__v1_cloud_id_auth","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudAuth"},"example":{"site_url":"https://your-app.example","disable_signup":false}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/storage":{"get":{"summary":"فهرست مخزن‌های فایل","description":"Required scope: cloud:read. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"get__v1_cloud_id_storage","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]},"post":{"summary":"ساخت مخزن فایل","description":"Required scope: cloud:write. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"post__v1_cloud_id_storage","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudBucket"},"example":{"name":"customer-files","public":false,"file_size_limit":10485760}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/functions":{"get":{"summary":"فهرست تابع‌های سرور","description":"Required scope: cloud:read. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"get__v1_cloud_id_functions","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]},"post":{"summary":"انتشار تابع JavaScript در Starter یا TypeScript اختصاصی","description":"Required scope: cloud:functions. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"post__v1_cloud_id_functions","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudFunction"},"example":{"name":"hello-world","code":"function handler(input) { return { message: 'Hello from Sarovi Cloud', user: input.user }; }","verify_jwt":true}}}},"responses":{"201":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/secrets":{"post":{"summary":"ذخیرهٔ متغیر محرمانه؛ مقدار فقط هنگام ارسال","description":"Required scope: cloud:write. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"post__v1_cloud_id_secrets","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudSecret"},"example":{"name":"MY_SERVICE_TOKEN","value":"SERVER_SECRET_VALUE"}}}},"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/sites":{"get":{"summary":"فهرست وب‌سایت‌های ابر","description":"Required scope: cloud:read. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"get__v1_cloud_id_sites","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]},"post":{"summary":"انتشار عمومی فایل‌های ساخته‌شدهٔ سایت","description":"Required scope: cloud:hosting. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"post__v1_cloud_id_sites","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudSite"},"example":{"name":"My site","confirm_public":true,"files":[{"path":"index.html","content":"<!doctype html><title>My app</title><h1>Hello Sarovi</h1>"}]}}}},"responses":{"202":{"description":"Accepted; poll status until terminal completion.","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/sites/{siteId}/deployments":{"post":{"summary":"انتشار نسخهٔ تازهٔ سایت","description":"Required scope: cloud:hosting. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"post__v1_cloud_id_sites_siteId_deployments","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudRedeploy"},"example":{"confirm_public":true,"files":[{"path":"index.html","content":"<!doctype html><title>My app</title><h1>Version two</h1>"}]}}}},"responses":{"202":{"description":"Accepted; poll status until terminal completion.","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/v1/cloud/{id}/functions/{name}/invoke":{"post":{"summary":"اجرای مدیریتی تابع Starter","description":"Required scope: cloud:functions. Starter has capped free infrastructure. Dedicated infrastructure requires an existing paid package and provider availability; AI credits are separate. See /developers/docs for limits and billing.","operationId":"post__v1_cloud_id_functions_name_invoke","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud"]}},"/api/cloud-runtime/{cloudId}/auth/signup":{"post":{"summary":"Email/password signup; returns a 24-hour opaque app session.","description":"Email/password signup; returns a 24-hour opaque app session. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"post__api_cloud_runtime_cloudId_auth_signup","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["cloud-runtime"]}},"/api/cloud-runtime/{cloudId}/auth/login":{"post":{"summary":"Email/password login; returns a 24-hour opaque app session.","description":"Email/password login; returns a 24-hour opaque app session. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"post__api_cloud_runtime_cloudId_auth_login","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["cloud-runtime"]}},"/api/cloud-runtime/{cloudId}/auth/logout":{"post":{"summary":"Revoke the current app session.","description":"Revoke the current app session. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"post__api_cloud_runtime_cloudId_auth_logout","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["cloud-runtime"]}},"/api/cloud-runtime/{cloudId}/auth/user":{"get":{"summary":"Current authenticated app user.","description":"Current authenticated app user. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"get__api_cloud_runtime_cloudId_auth_user","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud-runtime"]}},"/api/cloud-runtime/{cloudId}/data/{table}":{"get":{"summary":"Owner-scoped JSON rows, or public_read rows. offset pagination, maximum 100 rows.","description":"Owner-scoped JSON rows, or public_read rows. offset pagination, maximum 100 rows. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"get__api_cloud_runtime_cloudId_data_table_","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud-runtime"]},"post":{"summary":"Insert a JSON row owned by the signed-in app user.","description":"Insert a JSON row owned by the signed-in app user. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"post__api_cloud_runtime_cloudId_data_table_","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["cloud-runtime"]}},"/api/cloud-runtime/{cloudId}/data/{table}/{rowId}":{"patch":{"summary":"Replace the JSON data of an owned row.","description":"Replace the JSON data of an owned row. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"patch__api_cloud_runtime_cloudId_data_table_rowId_","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["cloud-runtime"]},"delete":{"summary":"Delete an owned row.","description":"Delete an owned row. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"delete__api_cloud_runtime_cloudId_data_table_rowId_","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"table","in":"path","required":true,"schema":{"type":"string"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud-runtime"]}},"/api/cloud-runtime/{cloudId}/files":{"get":{"summary":"List files owned by the signed-in app user.","description":"List files owned by the signed-in app user. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"get__api_cloud_runtime_cloudId_files","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud-runtime"]},"post":{"summary":"Upload name and content_base64; maximum decoded size 1 MiB.","description":"Upload name and content_base64; maximum decoded size 1 MiB. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"post__api_cloud_runtime_cloudId_files","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["cloud-runtime"]}},"/api/cloud-runtime/{cloudId}/files/{fileId}":{"get":{"summary":"Download an owned file as attachment bytes.","description":"Download an owned file as attachment bytes. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"get__api_cloud_runtime_cloudId_files_fileId_","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Private attachment bytes","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud-runtime"]},"delete":{"summary":"Delete an owned file.","description":"Delete an owned file. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"delete__api_cloud_runtime_cloudId_files_fileId_","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["cloud-runtime"]}},"/api/cloud-runtime/{cloudId}/functions/{name}":{"post":{"summary":"Invoke a synchronous Starter function. A session is required when verify_jwt is enabled.","description":"Invoke a synchronous Starter function. A session is required when verify_jwt is enabled. Send apikey: scpub_... and Authorization: Bearer sct_... for signed-in operations. See /developers/docs/cloud-auth. Capped free Starter operations; no AI credit charge.","operationId":"post__api_cloud_runtime_cloudId_functions_name_","security":[{"AppKey":[]}],"parameters":[{"name":"cloudId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","schema":{"type":"string"},"description":"Bearer sct_... app session; optional for signup/login and public operations."}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Structured error. 400 invalid input; 401 invalid key; 402 balance or budget; 403 scope/plan/account; 404 resource; 409 idempotency conflict; 429 rate/concurrency; 5xx service/provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"tags":["cloud-runtime"]}},"/v1/agent-templates":{"get":{"tags":["agent-templates"],"summary":"Ready-to-use support, sales and receptionist templates","description":"Required scope: agents:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_agent_templates","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTemplates"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches":{"get":{"tags":["batches"],"summary":"List this project’s recent batches","description":"Required scope: usage:read. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_batches","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchList"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["batches"],"summary":"Queue a durable text batch at standard model pricing","description":"Required scope: responses:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"post__v1_batches","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Reuse this value when retrying the identical request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreate"},"example":{"name":"Product descriptions","max_credits":300,"requests":[{"custom_id":"product-1","body":{"model":"z-ai/glm-5.3-flash","input":"Write a short Persian description of a handmade ceramic cup.","max_output_tokens":512}}]}}}},"responses":{"202":{"description":"Durably accepted. Poll until all rows reach a final state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/estimate":{"post":{"tags":["batches"],"summary":"Estimate the maximum batch credit reservation","description":"Required scope: responses:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"post__v1_batches_estimate","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Reuse this value when retrying the identical request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreate"},"example":{"name":"Product descriptions","max_credits":300,"requests":[{"custom_id":"product-1","body":{"model":"z-ai/glm-5.3-flash","input":"Write a short Persian description of a handmade ceramic cup.","max_output_tokens":512}}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchEstimate"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{id}":{"get":{"tags":["batches"],"summary":"Read batch progress and charged or pending credits","description":"Required scope: usage:read. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_batches_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{id}/cancel":{"post":{"tags":["batches"],"summary":"Cancel rows that have not started","description":"Required scope: responses:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"post__v1_batches_id_cancel","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Reuse this value when retrying the identical request."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{id}/retry":{"post":{"tags":["batches"],"summary":"Create a new batch from failed rows only","description":"Required scope: responses:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"post__v1_batches_id_retry","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Reuse this value when retrying the identical request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRetry"},"example":{"max_credits":300,"include_uncertain":false}}}},"responses":{"202":{"description":"Durably accepted. Poll until all rows reach a final state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{id}/results":{"get":{"tags":["batches"],"summary":"Download per-row results, preserving custom_id","description":"Required scope: usage:read. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_batches_id_results","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","required":false,"schema":{"type":"string"},"description":"json, jsonl, or csv"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Optional row status filter"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResults"}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/configuration":{"get":{"tags":["agents"],"summary":"Read draft and published agent configuration","description":"Required scope: agents:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_agents_id_configuration","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfigurationResult"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["agents"],"summary":"Save a business agent draft configuration","description":"Required scope: agents:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"patch__v1_agents_id_configuration","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfiguration"},"example":{"template":"support","knowledge_ids":[],"max_credits":300,"allow_handoff":true}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfigurationResult"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/publish":{"post":{"tags":["agents"],"summary":"Publish an immutable configuration or restore an earlier version","description":"Required scope: agents:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"post__v1_agents_id_publish","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Reuse this value when retrying the identical request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPublish"},"example":{}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentConfigurationResult"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/versions":{"get":{"tags":["agents"],"summary":"List immutable published agent versions","description":"Required scope: agents:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_agents_id_versions","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVersions"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/chat":{"post":{"tags":["agents"],"summary":"Run a published business agent in a customer-scoped conversation","description":"Required scope: agents:run, or agents:write plus responses:write (legacy). draft:true requires agents:write plus responses:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"post__v1_agents_id_chat","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Reuse this value when retrying the identical request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAgentInput"},"example":{"input":"What services do you offer?","customer_id":"customer-123"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedAgentResult"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/history":{"get":{"tags":["agents"],"summary":"Inspect recent runs and business outcomes","description":"Required scope: agents:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_agents_id_history","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentHistory"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/conversations/{id}":{"get":{"tags":["conversations"],"summary":"Read the specified customer conversation","description":"Required scope: agents:run or agents:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_conversations_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"customer_id","in":"query","required":true,"schema":{"type":"string"},"description":"Server-controlled customer identifier"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["conversations"],"summary":"Delete the specified customer conversation","description":"Required scope: agents:run or agents:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"delete__v1_conversations_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"customer_id","in":"query","required":true,"schema":{"type":"string"},"description":"Server-controlled customer identifier"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/knowledge-bases":{"get":{"tags":["knowledge-bases"],"summary":"List knowledge bases owned by this API project","description":"Required scope: knowledge:read. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_knowledge_bases","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseList"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["knowledge-bases"],"summary":"Create project-scoped business knowledge","description":"Required scope: knowledge:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"post__v1_knowledge_bases","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Reuse this value when retrying the identical request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseCreate"},"example":{"name":"Product handbook"}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/knowledge-bases/{id}":{"get":{"tags":["knowledge-bases"],"summary":"Inspect documents and indexing results","description":"Required scope: knowledge:read. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_knowledge_bases_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSnapshot"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["knowledge-bases"],"summary":"Delete a project knowledge base","description":"Required scope: knowledge:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"delete__v1_knowledge_bases_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/knowledge-bases/{id}/documents":{"post":{"tags":["knowledge-bases"],"summary":"Import text, a public HTTPS page, or a base64 document up to 2 MB","description":"Required scope: knowledge:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"post__v1_knowledge_bases_id_documents","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Reuse this value when retrying the identical request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeDocumentCreate"},"example":{"name":"Opening hours","text":"We answer customer questions Sunday–Thursday, 09:00–17:00."}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeDocumentResult"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/knowledge-bases/{id}/documents/{documentId}":{"delete":{"tags":["knowledge-bases"],"summary":"Delete a source document","description":"Required scope: knowledge:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"delete__v1_knowledge_bases_id_documents_documentId_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks":{"get":{"tags":["webhooks"],"summary":"List webhook endpoints without signing secrets","description":"Required scope: webhooks:read. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_webhooks","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["webhooks"],"summary":"Create a signed HTTPS event delivery endpoint","description":"Required scope: webhooks:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"post__v1_webhooks","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"},"description":"Reuse this value when retrying the identical request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"},"example":{"url":"https://your-app.example/events","events":["batch.completed","agent.lead","agent.handoff"],"enabled":true}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}":{"delete":{"tags":["webhooks"],"summary":"Remove a webhook and stop pending delivery","description":"Required scope: webhooks:write. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"delete__v1_webhooks_id_","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/deliveries":{"get":{"tags":["webhooks"],"summary":"Inspect delivery attempts and response status","description":"Required scope: webhooks:read. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_webhooks_deliveries","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveries"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage/budget":{"get":{"tags":["usage"],"summary":"Read the current monthly project budget and alert threshold","description":"Required scope: usage:read. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_usage_budget","security":[{"BearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessBudget"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage/export":{"get":{"tags":["usage"],"summary":"Export customer-labelled usage with stable cursor pagination","description":"Required scope: usage:read. See /developers/docs/business-start. Shared account credits; business budgets and project ownership are enforced.","operationId":"get__v1_usage_export","security":[{"BearerAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"ISO timestamp; default 30 days ago"},{"name":"through","in":"query","required":false,"schema":{"type":"string"},"description":"ISO timestamp; keep fixed while paginating"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor from previous page"},{"name":"customer_id","in":"query","required":false,"schema":{"type":"string"},"description":""},{"name":"format","in":"query","required":false,"schema":{"type":"string"},"description":"json or csv"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageExport"}},"text/csv":{"schema":{"type":"string"}}}},"default":{"description":"Structured API error; no successful completion is implied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/messages":{"post":{"summary":"Anthropic Messages: thinking, caching, media and native tools","description":"Required scope: responses:write. Native Messages preserves thinking signatures, cache controls and counters, PDFs/citations, client tools including computer use, and bounded hosted tools. Capability depends on the selected model. Computer tools execute in your application. Full request limit: 4 MB. See the compatibility guide for supported tool versions and beta headers.","operationId":"post__v1_messages","security":[{"AnthropicKey":[]},{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."},{"name":"anthropic-version","in":"header","required":true,"schema":{"const":"2023-06-01"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicRequest"}}}},"responses":{"200":{"description":"Message JSON or named SSE events ending in message_stop. Mid-stream failures emit error; EOF is not success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicMessage"}},"text/event-stream":{"schema":{"type":"string"}}}},"default":{"description":"Anthropic-shaped error with the Sarovi request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}},"tags":["messages"]}},"/v1/messages/count_tokens":{"post":{"summary":"Exact token count (not configured in this release)","description":"Returns HTTP 503 until a direct Anthropic counting connection is configured. Never generates output or charges credits. No local estimate is substituted.","operationId":"post__v1_messages_count_tokens","security":[{"AnthropicKey":[]},{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."},{"name":"anthropic-version","in":"header","required":true,"schema":{"const":"2023-06-01"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Anthropic-shaped error with the Sarovi request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"messages":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"anyOf":[{"type":"string","maxLength":2000000},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000},"citations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"document"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","const":"application/pdf"},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"media_type":{"type":"string","const":"text/plain"},"data":{"type":"string","maxLength":2000000}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content"},"content":{"anyOf":[{"type":"string","maxLength":2000000},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000},"citations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false}]}}]}},"required":["type","content"],"additionalProperties":false}]},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"context":{"anyOf":[{"type":"string","maxLength":16000},{"type":"null"}]},"citations":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use","server_tool_use"]},"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"caller":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","id","name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_result"},"tool_use_id":{"type":"string","minLength":1,"maxLength":200},"content":{"anyOf":[{"type":"string","maxLength":2000000},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000},"citations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"document"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","const":"application/pdf"},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"media_type":{"type":"string","const":"text/plain"},"data":{"type":"string","maxLength":2000000}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content"},"content":{"anyOf":[{"type":"string","maxLength":2000000},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000},"citations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false}]}}]}},"required":["type","content"],"additionalProperties":false}]},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"context":{"anyOf":[{"type":"string","maxLength":16000},{"type":"null"}]},"citations":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false}]}}]},"is_error":{"type":"boolean"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","tool_use_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_search_tool_result","web_fetch_tool_result","code_execution_tool_result","bash_code_execution_tool_result","text_editor_code_execution_tool_result","bash_tool_result","shell_tool_result","openrouter_bash_tool_result","openrouter_shell_tool_result"]},"tool_use_id":{"type":"string","minLength":1,"maxLength":200},"content":{},"caller":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"container_id":{"type":"string","maxLength":200},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","tool_use_id","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"thinking"},"thinking":{"type":"string","maxLength":2000000},"signature":{"type":"string","maxLength":100000}},"required":["type","thinking","signature"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"redacted_thinking"},"data":{"type":"string","maxLength":2000000}},"required":["type","data"],"additionalProperties":false}]}}]}},"required":["role","content"],"additionalProperties":false}},"system":{"anyOf":[{"type":"string","maxLength":2000000},{"maxItems":100,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000},"citations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false}}]},"tools":{"maxItems":128,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"custom"},"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"description":{"type":"string","maxLength":16000},"input_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["name","input_schema"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_search_20250305","web_search_20260209"]},"name":{"type":"string","const":"web_search"},"max_uses":{"default":1,"type":"integer","minimum":1,"maximum":5},"allowed_domains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},{"type":"null"}]},"blocked_domains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},{"type":"null"}]},"user_location":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"approximate"},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2},"timezone":{"type":"string","maxLength":100}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_fetch_20250910"},"name":{"type":"string","const":"web_fetch"},"max_uses":{"default":1,"type":"integer","minimum":1,"maximum":5},"max_content_tokens":{"default":8000,"type":"integer","minimum":1,"maximum":32000},"allowed_domains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},{"type":"null"}]},"blocked_domains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},{"type":"null"}]},"citations":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["computer_20250124","computer_20251124"]},"name":{"type":"string","const":"computer"},"display_width_px":{"type":"integer","minimum":1,"maximum":8192},"display_height_px":{"type":"integer","minimum":1,"maximum":8192},"display_number":{"type":"integer","minimum":0,"maximum":100},"enable_zoom":{"type":"boolean"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","name","display_width_px","display_height_px"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"bash_20250124"},"name":{"type":"string","const":"bash"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text_editor_20250124","text_editor_20250728"]},"name":{"type":"string","enum":["str_replace_editor","str_replace_based_edit_tool"]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","name"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["openrouter:web_search","openrouter:web_fetch","openrouter:datetime","openrouter:bash"]}},"required":["type"],"additionalProperties":false}]}},"tool_choice":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto","any"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool"},"name":{"type":"string","maxLength":100},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"none"}},"required":["type"],"additionalProperties":false}]},"thinking":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"enabled"},"budget_tokens":{"type":"integer","minimum":1024,"maximum":32767},"display":{"type":"string","enum":["summarized","omitted"]}},"required":["type","budget_tokens"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"adaptive"},"display":{"type":"string","enum":["summarized","omitted"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"disabled"}},"required":["type"],"additionalProperties":false}]},"output_config":{"type":"object","properties":{"effort":{"type":"string","enum":["low","medium","high","max"]},"format":{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","schema"],"additionalProperties":false}},"additionalProperties":false}},"required":["model","messages"],"additionalProperties":false}}}},"tags":["messages"]}},"/v1/messages/batches":{"post":{"summary":"Create durable Messages batch","description":"Up to 1,000 unique custom_id requests, 4 MB total. Each params object must use stream:false or omit stream. Uses the Sarovi durable queue at normal usage prices; no provider batch discount. Results are retained for 7 days.","operationId":"post__v1_messages_batches","security":[{"AnthropicKey":[]},{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."},{"name":"anthropic-version","in":"header","required":true,"schema":{"const":"2023-06-01"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Anthropic-shaped error with the Sarovi request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["requests"],"properties":{"requests":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"object","required":["custom_id","params"],"additionalProperties":false,"properties":{"custom_id":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"params":{"$ref":"#/components/schemas/AnthropicRequest"}}}}}}}}},"tags":["messages"]},"get":{"summary":"List Messages batches","description":"Required scope: usage:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_messages_batches","security":[{"AnthropicKey":[]},{"BearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"after_id","in":"query","description":"A Messages batch ID in this project. Use only one cursor per request.","schema":{"type":"string","pattern":"^msgbatch_[0-9a-f-]{36}$"}},{"name":"before_id","in":"query","description":"A Messages batch ID in this project. Use only one cursor per request.","schema":{"type":"string","pattern":"^msgbatch_[0-9a-f-]{36}$"}},{"name":"anthropic-version","in":"header","required":true,"schema":{"const":"2023-06-01"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Anthropic-shaped error with the Sarovi request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}},"tags":["messages"]}},"/v1/messages/batches/{id}":{"get":{"summary":"Retrieve Messages batch","description":"Required scope: usage:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_messages_batches_id_","security":[{"AnthropicKey":[]},{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^msgbatch_[0-9a-f-]{36}$"}},{"name":"anthropic-version","in":"header","required":true,"schema":{"const":"2023-06-01"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Anthropic-shaped error with the Sarovi request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}},"tags":["messages"]}},"/v1/messages/batches/{id}/cancel":{"post":{"summary":"Cancel queued Messages requests","description":"Required scope: responses:write. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"post__v1_messages_batches_id_cancel","security":[{"AnthropicKey":[]},{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^msgbatch_[0-9a-f-]{36}$"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Stable unique key per logical request. Replays JSON below 1 MB for 24 hours; otherwise returns REQUEST_ALREADY_ACCEPTED."},{"name":"anthropic-version","in":"header","required":true,"schema":{"const":"2023-06-01"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-ID":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Anthropic-shaped error with the Sarovi request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}},"tags":["messages"]}},"/v1/messages/batches/{id}/results":{"get":{"summary":"Messages batch results as JSONL","description":"Required scope: usage:read. Credits are shared with the Sarovi account. See /developers/docs for limits and billing.","operationId":"get__v1_messages_batches_id_results","security":[{"AnthropicKey":[]},{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^msgbatch_[0-9a-f-]{36}$"}},{"name":"anthropic-version","in":"header","required":true,"schema":{"const":"2023-06-01"}}],"responses":{"200":{"description":"One custom_id and result per line. Requires ended processing_status.","content":{"application/x-jsonl":{"schema":{"type":"string"}}}},"default":{"description":"Anthropic-shaped error with the Sarovi request ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}},"tags":["messages"]}}},"components":{"securitySchemes":{"AnthropicKey":{"type":"apiKey","in":"header","name":"x-api-key"},"AppKey":{"type":"apiKey","in":"header","name":"apikey"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"srv_…"}},"schemas":{"CloudDelete":{"type":"object","properties":{"confirm_delete":{"type":"boolean","const":true}},"required":["confirm_delete"],"additionalProperties":false},"CloudCreate":{"anyOf":[{"type":"object","properties":{"plan":{"type":"string","const":"starter"},"name":{"type":"string","minLength":2,"maxLength":80}},"required":["plan","name"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"region":{"default":"emea","type":"string","enum":["emea","apac","americas"]},"instance_size":{"default":"micro","type":"string","enum":["micro","small","medium"]},"confirm_purchase":{"type":"boolean","const":true}},"required":["name","confirm_purchase"],"additionalProperties":false}]},"CloudSql":{"anyOf":[{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":40000},"read_only":{"default":true,"type":"boolean"},"confirm_write":{"default":false,"type":"boolean"}},"required":["query"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["create_collection","list","insert","update","delete"]},"table":{"type":"string"},"name":{"type":"string"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"public_read":{"type":"boolean"},"offset":{"type":"integer","minimum":0,"maximum":2000}},"required":["action"]}]},"CloudFunction":{"type":"object","properties":{"name":{"type":"string","pattern":"^(?:[a-z][a-z0-9\\-]{1,62})$"},"code":{"type":"string","minLength":1,"maxLength":128000},"verify_jwt":{"default":true,"type":"boolean"}},"required":["name","code"],"additionalProperties":false},"CloudAuth":{"type":"object","properties":{"site_url":{"type":"string","format":"uri"},"disable_signup":{"default":false,"type":"boolean"}},"required":["site_url"],"additionalProperties":false},"CloudBucket":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,62}$"},"public":{"default":false,"type":"boolean"},"file_size_limit":{"default":10485760,"type":"integer","minimum":1,"maximum":52428800}},"required":["name"],"additionalProperties":false},"CloudSecret":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{1,99}$"},"value":{"type":"string","minLength":1,"maxLength":10000}},"required":["name","value"],"additionalProperties":false},"CloudSite":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"files":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-zA-Z0-9_./@-]+$"},"content":{"type":"string","maxLength":2000000},"encoding":{"default":"utf8","type":"string","enum":["utf8","base64"]}},"required":["path","content"]}},"confirm_public":{"type":"boolean","const":true}},"required":["name","files","confirm_public"],"additionalProperties":false},"CloudRedeploy":{"type":"object","properties":{"files":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-zA-Z0-9_./@-]+$"},"content":{"type":"string","maxLength":2000000},"encoding":{"default":"utf8","type":"string","enum":["utf8","base64"]}},"required":["path","content"]}},"confirm_public":{"type":"boolean","const":true}},"required":["files","confirm_public"],"additionalProperties":false},"ChatCompletionRequest":{"type":"object","properties":{"model":{"default":"z-ai/glm-5.3-flash","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9._-]+\\/[A-Za-z0-9._:/-]+$"},"messages":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"]},"content":{"anyOf":[{"anyOf":[{"type":"string","maxLength":2000000},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"type":"object","properties":{"url":{"type":"string","maxLength":4000000},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_audio"},"input_audio":{"type":"object","properties":{"data":{"type":"string","minLength":4,"maxLength":2800000},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false}},"required":["type","input_audio"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"video_url"},"video_url":{"type":"object","properties":{"url":{"type":"string","maxLength":2800040}},"required":["url"],"additionalProperties":false}},"required":["type","video_url"],"additionalProperties":false}]}}]},{"type":"null"}]},"refusal":{"anyOf":[{"type":"string","maxLength":2000000},{"type":"null"}]},"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"tool_call_id":{"type":"string","maxLength":200},"tool_calls":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"index":{"type":"integer","minimum":0,"maximum":127},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"arguments":{"type":"string","maxLength":1000000}},"required":["name","arguments"],"additionalProperties":false}},"required":["id","type","function"],"additionalProperties":false}},"reasoning":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}]},"reasoning_content":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}]},"reasoning_details":{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["role"],"additionalProperties":false}},"tools":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"description":{"type":"string","maxLength":16000},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean"}},"required":["name","parameters"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}]},"parallel_tool_calls":{"type":"boolean"},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"json_object"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"json_schema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"description":{"type":"string","maxLength":16000},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"default":true,"type":"boolean"}},"required":["name","schema"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]},"stream":{"default":false,"type":"boolean"},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"max_tokens":{"type":"integer","minimum":1,"maximum":32768},"max_completion_tokens":{"type":"integer","minimum":1,"maximum":32768},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"top_k":{"type":"integer","minimum":0,"maximum":9007199254740991},"repetition_penalty":{"type":"number","minimum":0,"maximum":2},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stop":{"anyOf":[{"type":"string"},{"maxItems":4,"type":"array","items":{"type":"string"}}]},"frequency_penalty":{"type":"number","minimum":-2,"maximum":2},"presence_penalty":{"type":"number","minimum":-2,"maximum":2},"reasoning_effort":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,23}$"},"reasoning":{"type":"object","properties":{"effort":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,23}$"},"max_tokens":{"type":"integer","minimum":1,"maximum":32768},"exclude":{"type":"boolean"},"enabled":{"type":"boolean"}},"additionalProperties":false},"n":{"type":"number","const":1}},"required":["messages"],"additionalProperties":false},"ResponseRequest":{"anyOf":[{"type":"object","properties":{"model":{"default":"z-ai/glm-5.3-flash","type":"string","enum":["google/gemini-4-argon","meta/muse-wonder","inclusionai/ling-3.1-flash","z-ai/glm-5.3-flash","qwen/qwen3.8-flash","anthropic/claude-haiku-5.5","deepseek/deepseek-v4-flash-0731","openai/gpt-5.6-luna","openai/gpt-6-luna","google/gemini-3.7-flash","z-ai/glm-5.3","deepseek/deepseek-v4-pro-0813","qwen/qwen3.8-max","mistralai/mistral-medium-3-5","mistralai/mistral-large-4-0","x-ai/grok-4.6","openai/gpt-5.6-terra","anthropic/claude-sonnet-5","openai/gpt-5.6-sol","openai/gpt-6-sol","anthropic/claude-opus-5","anthropic/claude-opus-5.5","moonshotai/kimi-k3","qwen/qwen3.8-2.4t-a95b","anthropic/claude-fable-5","anthropic/claude-fable-5.1","openai/gpt-5.5-pro","openai/gpt-6-astra","openai/gpt-6-astra-pro"]},"input":{"anyOf":[{"type":"string","minLength":1,"maxLength":96000},{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":32000}},"required":["role","content"]}}]},"instructions":{"type":"string","maxLength":12000},"max_output_tokens":{"default":2048,"type":"integer","minimum":128,"maximum":32768},"reasoning_effort":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,23}$"},"reasoning":{"type":"object","properties":{"effort":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,23}$"}},"required":["effort"],"additionalProperties":false},"include_reasoning":{"default":false,"type":"boolean"},"stream":{"default":false,"type":"boolean"},"web_search":{"default":false,"type":"boolean"}},"required":["input"],"additionalProperties":false},{"type":"object","properties":{"model":{"default":"z-ai/glm-5.3-flash","type":"string","maxLength":200,"pattern":"^[A-Za-z0-9._-]+\\/[A-Za-z0-9._:/-]+$"},"input":{"anyOf":[{"type":"string","minLength":1,"maxLength":96000},{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}]},"instructions":{"type":"string","maxLength":12000},"max_output_tokens":{"default":2048,"type":"integer","minimum":1,"maximum":32768},"tools":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"function"},"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"description":{"type":"string","maxLength":16000},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean"}},"required":["type","name","parameters"],"additionalProperties":false}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"required":["type","name"],"additionalProperties":false}]},"parallel_tool_calls":{"type":"boolean"},"stream":{"default":false,"type":"boolean"},"reasoning_effort":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,23}$"},"text":{"type":"object","properties":{"format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"json_object"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"description":{"type":"string"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"default":true,"type":"boolean"}},"required":["type","name","schema"],"additionalProperties":false}]},"verbosity":{"type":"string","enum":["low","medium","high"]}},"required":["format"],"additionalProperties":false},"reasoning":{"type":"object","properties":{"effort":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,23}$"},"summary":{"type":"string","enum":["auto","concise","detailed"]}},"additionalProperties":false},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"store":{"type":"boolean","const":false}},"required":["input"],"additionalProperties":false},{"type":"object","properties":{"model":{"type":"string","enum":["google/gemini-2.5-flash-image","google/gemini-nano-banana-2.1","tencent/hy-image-v3.5-preview","google/imagen-4.0-fast-generate-001","google/imagen-4.0-generate-001","meta/muse-image","bytedance-seed/seedream-5-0-lite","bytedance-seed/seedream-5-0-pro","qwen/qwen-image-3","krea/krea-2-medium-turbo","google/gemini-3.1-flash-lite-image","google/gemini-3.1-flash-image","google/gemini-3-pro-image","openai/gpt-image-2","openai/gpt-image-2.5-sunburst","openai/gpt-5.4-image-2"]},"input":{"anyOf":[{"type":"string","minLength":3,"maxLength":8000},{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","const":"user"},"content":{"anyOf":[{"type":"string","minLength":3,"maxLength":8000},{"minItems":1,"maxItems":12,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string","minLength":1,"maxLength":8000}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"image_url":{"type":"string","maxLength":3900000,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/]+={0,2}$"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["type","image_url"],"additionalProperties":false}]}}]}},"required":["role","content"],"additionalProperties":false}}]},"instructions":{"type":"string","maxLength":8000},"tools":{"maxItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"image_generation"},"model":{"type":"string","enum":["google/gemini-2.5-flash-image","google/gemini-nano-banana-2.1","tencent/hy-image-v3.5-preview","google/imagen-4.0-fast-generate-001","google/imagen-4.0-generate-001","meta/muse-image","bytedance-seed/seedream-5-0-lite","bytedance-seed/seedream-5-0-pro","qwen/qwen-image-3","krea/krea-2-medium-turbo","google/gemini-3.1-flash-lite-image","google/gemini-3.1-flash-image","google/gemini-3-pro-image","openai/gpt-image-2","openai/gpt-image-2.5-sunburst","openai/gpt-5.4-image-2"]},"quality":{"type":"string","enum":["auto","low","medium","high"]},"output_format":{"type":"string","enum":["png","jpeg","webp"]},"background":{"type":"string","enum":["auto","opaque","transparent"]},"size":{"type":"string","pattern":"^(?:auto|\\d{2,4}x\\d{2,4})$"},"aspect_ratio":{"type":"string","maxLength":24,"pattern":"^(?:auto|\\d{1,4}(?:\\.\\d{1,2})?:\\d{1,4}(?:\\.\\d{1,2})?)$"},"fit":{"type":"string","enum":["pad","crop"]},"action":{"type":"string","enum":["auto","generate","edit"]}},"required":["type"],"additionalProperties":false}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto","required"]},{"type":"object","properties":{"type":{"type":"string","const":"image_generation"}},"required":["type"],"additionalProperties":false}]},"stream":{"default":false,"type":"boolean"},"store":{"type":"boolean","const":false}},"required":["model","input"],"additionalProperties":false}]},"Agent":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"instructions":{"default":"","type":"string","maxLength":12000},"model":{"default":"z-ai/glm-5.3-flash","type":"string","enum":["google/gemini-4-argon","meta/muse-wonder","inclusionai/ling-3.1-flash","z-ai/glm-5.3-flash","qwen/qwen3.8-flash","anthropic/claude-haiku-5.5","deepseek/deepseek-v4-flash-0731","openai/gpt-5.6-luna","openai/gpt-6-luna","google/gemini-3.7-flash","z-ai/glm-5.3","deepseek/deepseek-v4-pro-0813","qwen/qwen3.8-max","mistralai/mistral-medium-3-5","mistralai/mistral-large-4-0","x-ai/grok-4.6","openai/gpt-5.6-terra","anthropic/claude-sonnet-5","openai/gpt-5.6-sol","openai/gpt-6-sol","anthropic/claude-opus-5","anthropic/claude-opus-5.5","moonshotai/kimi-k3","qwen/qwen3.8-2.4t-a95b","anthropic/claude-fable-5","anthropic/claude-fable-5.1","openai/gpt-5.5-pro","openai/gpt-6-astra","openai/gpt-6-astra-pro"]},"kind":{"default":"chat","type":"string","enum":["chat","research","document","code","data"]}},"required":["name"],"additionalProperties":false},"WorkRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["research","document","code","data"]},"input":{"type":"string","minLength":10,"maxLength":12000},"title":{"type":"string","minLength":1,"maxLength":100}},"required":["kind","input"]},"ImageRequest":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"maxLength":8000},"preset":{"default":"balanced","type":"string","enum":["fast","balanced","quality"]},"model":{"type":"string","enum":["google/gemini-2.5-flash-image","google/gemini-nano-banana-2.1","tencent/hy-image-v3.5-preview","google/imagen-4.0-fast-generate-001","google/imagen-4.0-generate-001","meta/muse-image","bytedance-seed/seedream-5-0-lite","bytedance-seed/seedream-5-0-pro","qwen/qwen-image-3","krea/krea-2-medium-turbo","google/gemini-3.1-flash-lite-image","google/gemini-3.1-flash-image","google/gemini-3-pro-image","openai/gpt-image-2","openai/gpt-image-2.5-sunburst","openai/gpt-5.4-image-2"]},"aspectRatio":{"description":"auto follows the prompt or reference. Omitted settings preserve the legacy 1:1 default.","type":"string","maxLength":24,"pattern":"^(?:auto|\\d{1,4}(?:\\.\\d{1,2})?:\\d{1,4}(?:\\.\\d{1,2})?)$"},"size":{"description":"Exact export WIDTHxHEIGHT or auto. Export is resized without distortion; fit defaults to pad.","type":"string","pattern":"^(?:auto|\\d{2,4}x\\d{2,4})$"},"fit":{"description":"pad preserves the full image with borders; crop fills the requested canvas. Applies to custom export sizes and non-native ratios.","type":"string","enum":["pad","crop"]},"quality":{"default":"medium","type":"string","enum":["low","medium","high"]},"outputFormat":{"default":"png","type":"string","enum":["png","jpeg","webp"]},"transparent":{"default":false,"type":"boolean"},"count":{"default":1,"type":"integer","minimum":1,"maximum":4},"reference":{"type":"object","properties":{"dataUrl":{"type":"string","maxLength":12000000,"pattern":"^data:image\\/(?:png|jpeg|webp);base64,[a-zA-Z0-9+/=]+$"}},"required":["dataUrl"]},"references":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"dataUrl":{"type":"string","maxLength":12000000,"pattern":"^data:image\\/(?:png|jpeg|webp);base64,[a-zA-Z0-9+/=]+$"}},"required":["dataUrl"]}}},"required":["prompt"]},"VideoRequest":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"maxLength":8000},"preset":{"default":"balanced","type":"string","enum":["fast","balanced","quality"]},"model":{"type":"string","enum":["google/veo-3.1-lite","google/veo-3.1-fast","kwaivgi/kling-v3.0-std","bytedance/seedance-2.0-mini","bytedance/seedance-2.0-fast","bytedance/seedance-2.0","bytedance/seedance-2.5","alibaba/wan-3.0","runway/gen-4.5","x-ai/grok-imagine-video-1.5","x-ai/grok-imagine-video-1.5-lite","openai/sora-2-pro","google/veo-3.1"]},"aspectRatio":{"default":"16:9","type":"string","enum":["1:1","16:9","9:16","4:3","3:4","3:2","2:3","21:9"]},"duration":{"default":6,"type":"integer","minimum":1,"maximum":30},"resolution":{"default":"720p","type":"string","enum":["480p","720p","1080p"]},"generateAudio":{"default":false,"type":"boolean"},"reference":{"type":"object","properties":{"dataUrl":{"type":"string","maxLength":12000000,"pattern":"^data:image\\/(?:png|jpeg|webp);base64,[a-zA-Z0-9+/=]+$"}},"required":["dataUrl"]},"references":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"dataUrl":{"type":"string","maxLength":12000000,"pattern":"^data:image\\/(?:png|jpeg|webp);base64,[a-zA-Z0-9+/=]+$"}},"required":["dataUrl"]}},"referenceMode":{"type":"string","enum":["guide","frames"]}},"required":["prompt"]},"AudioRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":12000},"preset":{"default":"balanced","type":"string","enum":["fast","balanced","quality"]},"model":{"type":"string","enum":["elevenlabs/eleven-v4","elevenlabs/eleven-v4-turbo","google/lyria-3-clip-preview","google/lyria-3-pro-preview","mistralai/voxtral-mini-tts-2603","google/gemini-3.1-flash-tts-preview","google/gemini-3.8-flash-tts","google/gemini-3.8-flash-lite-tts","openai/gpt-audio-mini","openai/gpt-audio"]},"voice":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9._-]+$"},"format":{"default":"mp3","type":"string","enum":["mp3","wav","pcm"]},"speed":{"type":"number","const":1,"default":1,"description":"Current audio models use natural speed. Gemini pacing is controlled through instructions."},"instructions":{"type":"string","maxLength":2000},"turns":{"minItems":2,"maxItems":40,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":12000},"voice":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-zA-Z0-9._-]+$"},"instructions":{"type":"string","maxLength":1000}},"required":["text","voice"]}},"audioInput":{"type":"object","properties":{"audioBase64":{"type":"string","minLength":16,"maxLength":18666668,"pattern":"^[a-zA-Z0-9+/]+={0,2}$"},"mediaType":{"type":"string","enum":["audio/webm","audio/mp4","audio/mpeg","audio/wav","audio/ogg","audio/flac","audio/aac"]}},"required":["audioBase64","mediaType"]}},"required":[],"anyOf":[{"required":["text"]},{"required":["turns"]}]},"TextRequest":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":12000},"preset":{"default":"balanced","type":"string","enum":["fast","balanced","quality"]},"model":{"type":"string","enum":["google/gemini-4-argon","meta/muse-wonder","anthropic/claude-haiku-5.5","mistralai/mistral-large-4-0","google/gemini-3.1-flash-lite","google/gemini-3.7-flash","google/gemini-3.1-pro-preview","inclusionai/ling-3.1-flash","z-ai/glm-5.3-flash","z-ai/glm-5.3"]},"reasoningEffort":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,23}$"},"maxOutputTokens":{"default":2048,"type":"integer","minimum":128,"maximum":8192}},"required":["prompt"]},"ImageResult":{"type":"object","properties":{"outputs":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"data":{"type":"string","minLength":16,"maxLength":24000000},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sizing":{"type":"object","properties":{"source":{"type":"string","enum":["settings","prompt","reference","default"]},"fit":{"type":"string","enum":["native","pad","crop"]},"sourceWidth":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sourceHeight":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["source","fit","sourceWidth","sourceHeight"]},"mediaType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/svg+xml"]}},"required":["data","mediaType"]}},"execution":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200},"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"type":"number","minimum":0,"maximum":10000},"research":{"type":"object","properties":{"searched":{"type":"boolean","const":true},"sources":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"title":{"type":"string","minLength":1,"maxLength":300}},"required":["url","title"]}}},"required":["searched","sources"]}},"required":["model","inputTokens","outputTokens","totalTokens"]}},"required":["outputs","execution"]},"AudioResult":{"type":"object","properties":{"output":{"type":"object","properties":{"data":{"type":"string","minLength":16,"maxLength":40000000},"mediaType":{"type":"string","enum":["audio/mpeg","audio/wav","audio/pcm"]}},"required":["data","mediaType"]},"execution":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200},"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"type":"number","minimum":0,"maximum":10000},"research":{"type":"object","properties":{"searched":{"type":"boolean","const":true},"sources":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"title":{"type":"string","minLength":1,"maxLength":300}},"required":["url","title"]}}},"required":["searched","sources"]}},"required":["model","inputTokens","outputTokens","totalTokens"]}},"required":["output","execution"]},"TextResult":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":64000},"execution":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200},"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"type":"number","minimum":0,"maximum":10000},"research":{"type":"object","properties":{"searched":{"type":"boolean","const":true},"sources":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"title":{"type":"string","minLength":1,"maxLength":300}},"required":["url","title"]}}},"required":["searched","sources"]}},"required":["model","inputTokens","outputTokens","totalTokens"]}},"required":["text","execution"]},"VideoSubmission":{"type":"object","properties":{"providerJobId":{"type":"string","minLength":1,"maxLength":300},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"execution":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200},"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"type":"number","minimum":0,"maximum":10000},"research":{"type":"object","properties":{"searched":{"type":"boolean","const":true},"sources":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"title":{"type":"string","minLength":1,"maxLength":300}},"required":["url","title"]}}},"required":["searched","sources"]}},"required":["model","inputTokens","outputTokens","totalTokens"]}},"required":["providerJobId","status"]},"VideoStatus":{"type":"object","properties":{"status":{"type":"string","enum":["pending","processing","completed","failed"]},"contentUrl":{"type":"string","maxLength":4096,"format":"uri"},"error":{"type":"string","maxLength":400},"errorCode":{"type":"string","maxLength":80},"retryable":{"type":"boolean"},"execution":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200},"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"type":"number","minimum":0,"maximum":10000},"research":{"type":"object","properties":{"searched":{"type":"boolean","const":true},"sources":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"title":{"type":"string","minLength":1,"maxLength":300}},"required":["url","title"]}}},"required":["searched","sources"]}},"required":["model","inputTokens","outputTokens","totalTokens"]}},"required":["status"]},"TranscriptionRequest":{"type":"object","properties":{"audioBase64":{"type":"string","minLength":16,"maxLength":18666668,"pattern":"^[a-zA-Z0-9+/]+={0,2}$"},"mediaType":{"type":"string","enum":["audio/webm","audio/mp4","audio/mpeg","audio/wav","audio/ogg","audio/flac","audio/aac"]},"model":{"type":"string","enum":["openai/whisper-large-v3","openai/whisper-large-v3-turbo"]},"language":{"type":"string","pattern":"^[a-z]{2,3}$"}},"required":["audioBase64","mediaType"]},"TranscriptionResponse":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":32000},"execution":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":200},"model":{"type":"string","minLength":1,"maxLength":200},"inputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"outputTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalTokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"costUsd":{"type":"number","minimum":0,"maximum":10000},"research":{"type":"object","properties":{"searched":{"type":"boolean","const":true},"sources":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"title":{"type":"string","minLength":1,"maxLength":300}},"required":["url","title"]}}},"required":["searched","sources"]}},"required":["model","inputTokens","outputTokens","totalTokens"]}},"required":["text"]},"VideoJob":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"providerJobId":{"type":"string","minLength":1,"maxLength":300}},"required":["id","providerJobId"]},"AgentRun":{"type":"object","properties":{"input":{"type":"string","minLength":1,"maxLength":12000},"stream":{"type":"boolean"},"include_reasoning":{"type":"boolean"},"reasoning_effort":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,23}$"},"reasoning":{"type":"object","properties":{"effort":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,23}$"}},"required":["effort"],"additionalProperties":false}},"required":["input"]},"RealtimeCreate":{"type":"object","properties":{"sdp":{"type":"string","minLength":20,"maxLength":200000}},"required":["sdp"]},"RealtimeEnd":{"type":"object","properties":{"callId":{"type":"string","minLength":4,"maxLength":160}},"required":["callId"]},"KnowledgeCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"instructions":{"type":"string","maxLength":8000}},"required":["name"]},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string","description":"Safe path of an invalid request field, when known."},"execution_started":{"type":"boolean","const":false,"description":"Present for validation rejected before execution."},"request_id":{"type":"string","format":"uuid"}}}}},"AgentRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"instructions":{"type":"string"},"model":{"type":"string"},"kind":{"enum":["chat","research","document","code","data"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","name","instructions","model","kind"]},"BatchCreate":{"type":"object","properties":{"name":{"default":"پردازش گروهی","type":"string","minLength":1,"maxLength":100},"requests":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"custom_id":{"type":"string","minLength":1,"maxLength":120},"body":{"type":"object","properties":{"model":{"default":"z-ai/glm-5.3-flash","type":"string","minLength":1,"maxLength":200},"input":{"type":"string","minLength":1,"maxLength":32000},"instructions":{"type":"string","maxLength":8000},"max_output_tokens":{"default":512,"type":"integer","minimum":128,"maximum":2048}},"required":["input"],"additionalProperties":false}},"required":["custom_id","body"],"additionalProperties":false}},"max_credits":{"type":"integer","minimum":1,"maximum":10000000},"customer_id":{"type":"string","minLength":1,"maxLength":120}},"required":["requests","max_credits"],"additionalProperties":false},"Batch":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"key_id":{"type":["string","null"]},"name":{"type":"string"},"status":{"enum":["queued","running","completed","cancelled"]},"total":{"type":"integer","minimum":0},"succeeded":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"cancelled":{"type":"integer","minimum":0},"cancel_requested":{"type":"boolean"},"max_credits":{"type":"integer","minimum":0},"credits":{"type":"integer","minimum":0},"customer_id":{"type":["string","null"]},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]},"expires_at":{"type":"string"}},"required":["id","name","status","total","succeeded","failed","cancelled","max_credits","credits"]},"BatchList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Batch"}}},"required":["data"]},"BatchEstimate":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"custom_id":{"type":"string"},"max_credits":{"type":"integer","minimum":0}},"required":["custom_id","max_credits"]}},"total_max_credits":{"type":"integer","minimum":0},"currency":{"const":"sarovi_credits"},"pricing":{"const":"standard"},"discount_percent":{"const":0}},"required":["rows","total_max_credits","currency","pricing"]},"BatchResults":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"custom_id":{"type":"string"},"status":{"enum":["queued","running","succeeded","failed","cancelled"]},"request_id":{"type":"string","format":"uuid"},"result":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"output_text":{"type":"string"},"status":{"type":"string"},"usage":{"type":"object"}}},"error":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"}}},"body":{"type":["object","null"]}},"required":["custom_id","status","request_id"]}}},"required":["data"]},"BatchRetry":{"type":"object","properties":{"max_credits":{"type":"integer","minimum":1,"maximum":10000000},"include_uncertain":{"default":false,"type":"boolean"}},"required":["max_credits"]},"AgentConfiguration":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean"},"max_input_chars":{"default":12000,"type":"integer","minimum":100,"maximum":12000},"max_steps":{"default":4,"type":"integer","minimum":1,"maximum":4},"require_knowledge":{"default":false,"type":"boolean"},"template":{"default":"support","type":"string","enum":["support","sales","receptionist","custom"]},"knowledge_ids":{"default":[],"maxItems":5,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"greeting":{"default":"سلام! چطور می‌توانم کمکتان کنم؟","type":"string","maxLength":500},"max_credits":{"default":300,"type":"integer","minimum":1,"maximum":100000},"max_output_tokens":{"default":512,"type":"integer","minimum":128,"maximum":2048},"collect_leads":{"default":false,"type":"boolean"},"allow_handoff":{"default":true,"type":"boolean"},"retention_days":{"default":7,"anyOf":[{"type":"number","const":7},{"type":"number","const":30}]}},"additionalProperties":false},"AgentConfigurationResult":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid"},"draft":{"$ref":"#/components/schemas/AgentConfiguration"},"published_version":{"type":["integer","null"]},"published":{"type":["object","null"],"properties":{"agent":{"type":"object"},"config":{"$ref":"#/components/schemas/AgentConfiguration"}}}},"required":[]},"AgentPublish":{"type":"object","properties":{"restore_version":{"type":"integer","minimum":1,"maximum":9007199254740991}}},"ManagedAgentInput":{"type":"object","properties":{"input":{"type":"string","minLength":1,"maxLength":12000},"customer_id":{"type":"string","minLength":1,"maxLength":120},"conversation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"draft":{"default":false,"type":"boolean"}},"required":["input","customer_id"],"additionalProperties":false},"ManagedAgentResult":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversation_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"customer_id":{"type":"string"},"version":{"type":["integer","null"]},"status":{"const":"completed"},"output_text":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"index":{"type":"integer","minimum":0}},"required":[]}},"outcomes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"enum":["agent.lead","agent.handoff"]},"status":{"const":"requested"},"name":{"type":"string"},"contact":{"type":"string"},"need":{"type":"string"},"reason":{"type":"string"}},"required":["id","type","status"]}}},"required":["id","conversation_id","agent_id","customer_id","status","output_text","sources","outcomes"]},"AgentTemplates":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"enum":["support","sales","receptionist"]},"name":{"type":"string"},"description":{"type":"string"},"instructions":{"type":"string"},"collect_leads":{"type":"boolean"}},"required":["id","name","description","instructions"]}}},"required":["data"]},"AgentPatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"instructions":{"type":"string","maxLength":12000},"model":{"type":"string","maxLength":200}}},"AgentVersions":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":0},"snapshot":{"type":"object","properties":{"agent":{"type":"object"},"config":{"$ref":"#/components/schemas/AgentConfiguration"}},"required":[]},"created_at":{"type":"string"}},"required":[]}}},"required":["data"]},"AgentHistory":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversation_id":{"type":"string","format":"uuid"},"version":{"type":["integer","null"]},"status":{"type":"string"},"result":{"type":["object","null"],"properties":{"output_text":{"type":"string"},"outcomes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"enum":["agent.lead","agent.handoff"]},"status":{"const":"requested"},"name":{"type":"string"},"contact":{"type":"string"},"need":{"type":"string"},"reason":{"type":"string"}},"required":["id","type","status"]}},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"created_at":{"type":"string"}},"required":[]}}},"required":["data"]},"Conversation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"customer_id":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"enum":["user","assistant"]},"content":{"type":"string"}},"required":[]}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"expires_at":{"type":"string"}},"required":["id","agent_id","customer_id","messages"]},"KnowledgeBaseCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"instructions":{"type":"string","maxLength":8000}},"required":["name"]},"KnowledgeBase":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"instructions":{"type":"string"},"document_count":{"type":"integer","minimum":0},"total_bytes":{"type":"integer","minimum":0},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name"]},"KnowledgeBaseList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBase"}}},"required":["data"]},"KnowledgeDocument":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"media_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":0},"sha256":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","name"]},"KnowledgeSnapshot":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/KnowledgeBase"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeDocument"}},"conversations":{"type":"array","items":{"type":"object"}},"memories":{"type":"array","items":{"type":"object"}},"shared":{"type":"boolean"}},"required":["project","documents"]},"KnowledgeDocumentCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":180},"text":{"type":"string","maxLength":1500000},"url":{"type":"string","format":"uri"},"content_base64":{"type":"string","maxLength":2800000},"media_type":{"type":"string"}},"required":["name"]},"KnowledgeDocumentResult":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/KnowledgeDocument"},"status":{"const":"ready"}},"required":["document","status"]},"WebhookCreate":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"events":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["batch.completed","batch.cancelled","agent.lead","agent.handoff","budget.threshold"]}},"enabled":{"default":true,"type":"boolean"}},"required":["url","events"],"additionalProperties":false},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"secret":{"type":"string","description":"Returned only once on creation. Store on your server."}},"required":["id","url","events","enabled"]},"WebhookList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}},"required":["data"]},"WebhookDeliveries":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"webhook_id":{"type":"string","format":"uuid"},"state":{"enum":["queued","sending","delivered","failed"]},"attempts":{"type":"integer","minimum":0},"last_status":{"type":["integer","null"]},"next_at":{"type":"string"},"created_at":{"type":"string"}},"required":[]}}},"required":["data"]},"UsageExport":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string"},"endpoint":{"type":"string"},"model":{"type":["string","null"]},"key_id":{"type":["string","null"]},"customer_id":{"type":["string","null"]},"reference_id":{"type":["string","null"]},"agent_id":{"type":["string","null"]},"batch_id":{"type":["string","null"]},"state":{"type":"string"},"status_code":{"type":["integer","null"]},"error_code":{"type":["string","null"]},"credits":{"type":"integer","minimum":0},"pending":{"type":"boolean"},"input_tokens":{"type":"integer","minimum":0},"output_tokens":{"type":"integer","minimum":0},"duration_ms":{"type":["integer","null"]}},"required":["id","created_at","endpoint","state","credits","pending"]}},"next_cursor":{"type":["string","null"]},"from":{"type":"string"},"through":{"type":"string"}},"required":["data","next_cursor","from","through"]},"BusinessBudget":{"type":"object","properties":{"monthly_limit":{"type":"integer","minimum":0},"used_credits":{"type":"integer","minimum":0},"remaining_credits":{"type":"integer","minimum":0},"threshold_reached":{"type":"boolean"},"resets_at":{"type":"string"}},"required":["monthly_limit","used_credits","remaining_credits","threshold_reached","resets_at"]},"Deleted":{"type":"object","properties":{"deleted":{"type":"boolean"},"id":{"type":"string","format":"uuid"}},"required":[]},"Empty":{"type":"object","properties":{},"required":[]},"ChatCompletion":{"type":"object","required":["id","object","model","choices","usage"],"properties":{"id":{"type":"string"},"object":{"const":"chat.completion"},"created":{"type":"integer","minimum":0},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","required":["index","message","finish_reason"],"properties":{"index":{"type":"integer","minimum":0},"message":{"type":"object","required":["role"],"properties":{"role":{"const":"assistant"},"content":{"type":["string","null"]},"tool_calls":{"type":"array","items":{"type":"object","required":["id","type","function"],"properties":{"id":{"type":"string"},"type":{"const":"function"},"function":{"type":"object","required":["name","arguments"],"properties":{"name":{"type":"string"},"arguments":{"type":"string"}}}}}},"refusal":{"type":["string","null"]}}},"finish_reason":{"type":["string","null"]}}}},"usage":{"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"properties":{"prompt_tokens":{"type":"integer","minimum":0},"completion_tokens":{"type":"integer","minimum":0},"total_tokens":{"type":"integer","minimum":0}}}}},"WorkAccepted":{"type":"object","required":["id","object","status","status_url","files_url","reserved_credits"],"properties":{"id":{"type":"string","format":"uuid"},"object":{"const":"run"},"status":{"const":"queued"},"status_url":{"type":"string"},"files_url":{"type":"string"},"reserved_credits":{"type":"integer","minimum":0},"request_id":{"type":"string"}}},"Balance":{"type":"object","required":["balance_credits","plan","currency","shared_balance"],"properties":{"balance_credits":{"type":"integer","minimum":0},"plan":{"type":"string"},"currency":{"const":"sarovi_credits"},"shared_balance":{"const":true}}},"AnthropicMessage":{"type":"object","required":["id","type","role","model","content","stop_reason","stop_sequence","usage"],"properties":{"id":{"type":"string"},"type":{"const":"message"},"role":{"const":"assistant"},"model":{"type":"string"},"content":{"type":"array","items":{"oneOf":[{"type":"object","required":["type","text"],"properties":{"type":{"const":"text"},"text":{"type":"string"}}},{"type":"object","required":["type","id","name","input"],"properties":{"type":{"enum":["tool_use","server_tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":true}}},{"type":"object","required":["type"],"properties":{"type":{"enum":["thinking","redacted_thinking","web_search_tool_result","web_fetch_tool_result","bash_tool_result","shell_tool_result","openrouter_bash_tool_result","openrouter_shell_tool_result"]},"thinking":{"type":"string"},"signature":{"type":"string"},"data":{"type":"string"}},"additionalProperties":true}]}},"stop_reason":{"enum":["end_turn","max_tokens","tool_use","stop_sequence","pause_turn","refusal","model_context_window_exceeded"]},"stop_sequence":{"type":["string","null"]},"usage":{"type":"object","required":["input_tokens","output_tokens"],"properties":{"input_tokens":{"type":"integer","minimum":0},"output_tokens":{"type":"integer","minimum":0},"total_tokens":{"type":"integer","minimum":0},"cache_creation_input_tokens":{"type":"integer","minimum":0},"cache_read_input_tokens":{"type":"integer","minimum":0},"server_tool_use":{"type":["object","null"]}}}}},"AnthropicError":{"type":"object","required":["type","error"],"properties":{"type":{"const":"error"},"request_id":{"type":"string"},"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string"},"message":{"type":"string"}}}}},"AnthropicRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"max_tokens":{"type":"integer","minimum":1,"maximum":32768},"messages":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"anyOf":[{"type":"string","maxLength":2000000},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000},"citations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"document"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","const":"application/pdf"},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"media_type":{"type":"string","const":"text/plain"},"data":{"type":"string","maxLength":2000000}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content"},"content":{"anyOf":[{"type":"string","maxLength":2000000},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000},"citations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false}]}}]}},"required":["type","content"],"additionalProperties":false}]},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"context":{"anyOf":[{"type":"string","maxLength":16000},{"type":"null"}]},"citations":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use","server_tool_use"]},"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"caller":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","id","name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_result"},"tool_use_id":{"type":"string","minLength":1,"maxLength":200},"content":{"anyOf":[{"type":"string","maxLength":2000000},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000},"citations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"document"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","const":"application/pdf"},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"media_type":{"type":"string","const":"text/plain"},"data":{"type":"string","maxLength":2000000}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content"},"content":{"anyOf":[{"type":"string","maxLength":2000000},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000},"citations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","maxLength":8000,"format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"data":{"type":"string","minLength":4,"maxLength":2800000}},"required":["type","media_type","data"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false}]}}]}},"required":["type","content"],"additionalProperties":false}]},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"context":{"anyOf":[{"type":"string","maxLength":16000},{"type":"null"}]},"citations":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false}]}}]},"is_error":{"type":"boolean"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","tool_use_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_search_tool_result","web_fetch_tool_result","code_execution_tool_result","bash_code_execution_tool_result","text_editor_code_execution_tool_result","bash_tool_result","shell_tool_result","openrouter_bash_tool_result","openrouter_shell_tool_result"]},"tool_use_id":{"type":"string","minLength":1,"maxLength":200},"content":{},"caller":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"container_id":{"type":"string","maxLength":200},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","tool_use_id","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"thinking"},"thinking":{"type":"string","maxLength":2000000},"signature":{"type":"string","maxLength":100000}},"required":["type","thinking","signature"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"redacted_thinking"},"data":{"type":"string","maxLength":2000000}},"required":["type","data"],"additionalProperties":false}]}}]}},"required":["role","content"],"additionalProperties":false}},"system":{"anyOf":[{"type":"string","maxLength":2000000},{"maxItems":100,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":2000000},"citations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false}}]},"stream":{"default":false,"type":"boolean"},"temperature":{"type":"number","minimum":0,"maximum":1},"top_p":{"type":"number","minimum":0,"maximum":1},"top_k":{"type":"integer","minimum":0,"maximum":9007199254740991},"tools":{"maxItems":128,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"custom"},"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"description":{"type":"string","maxLength":16000},"input_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["name","input_schema"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_search_20250305","web_search_20260209"]},"name":{"type":"string","const":"web_search"},"max_uses":{"default":1,"type":"integer","minimum":1,"maximum":5},"allowed_domains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},{"type":"null"}]},"blocked_domains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},{"type":"null"}]},"user_location":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"approximate"},"city":{"type":"string","maxLength":200},"region":{"type":"string","maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2},"timezone":{"type":"string","maxLength":100}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_fetch_20250910"},"name":{"type":"string","const":"web_fetch"},"max_uses":{"default":1,"type":"integer","minimum":1,"maximum":5},"max_content_tokens":{"default":8000,"type":"integer","minimum":1,"maximum":32000},"allowed_domains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},{"type":"null"}]},"blocked_domains":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}},{"type":"null"}]},"citations":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["computer_20250124","computer_20251124"]},"name":{"type":"string","const":"computer"},"display_width_px":{"type":"integer","minimum":1,"maximum":8192},"display_height_px":{"type":"integer","minimum":1,"maximum":8192},"display_number":{"type":"integer","minimum":0,"maximum":100},"enable_zoom":{"type":"boolean"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","name","display_width_px","display_height_px"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"bash_20250124"},"name":{"type":"string","const":"bash"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text_editor_20250124","text_editor_20250728"]},"name":{"type":"string","enum":["str_replace_editor","str_replace_based_edit_tool"]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","name"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","enum":["openrouter:web_search","openrouter:web_fetch","openrouter:datetime","openrouter:bash"]}},"required":["type"],"additionalProperties":false}]}},"tool_choice":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto","any"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool"},"name":{"type":"string","maxLength":100},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"none"}},"required":["type"],"additionalProperties":false}]},"thinking":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"enabled"},"budget_tokens":{"type":"integer","minimum":1024,"maximum":32767},"display":{"type":"string","enum":["summarized","omitted"]}},"required":["type","budget_tokens"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"adaptive"},"display":{"type":"string","enum":["summarized","omitted"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"disabled"}},"required":["type"],"additionalProperties":false}]},"cache_control":{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},"stop_sequences":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}},"metadata":{"type":"object","properties":{"user_id":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]}},"additionalProperties":false},"output_config":{"type":"object","properties":{"effort":{"type":"string","enum":["low","medium","high","max"]},"format":{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","schema"],"additionalProperties":false}},"additionalProperties":false}},"required":["model","max_tokens","messages"],"additionalProperties":false}}}}