{"openapi":"3.1.0","info":{"title":"Orkas public API","description":"Orkas official LLM, web search, speech, image, video, and connector services, callable from\nyour own application with an Orkas API key and your account's shared credit\nbalance.\n\nAuthentication: `Authorization: Bearer <ORKAS_API_KEY>`. Keys passed in the query\nstring are rejected. Each key carries scopes (`llm`, `search`, `speech`,\n`images`, `videos`, `connectors`); a request outside its key's scope is refused.\n\nUse `/v1/responses` for new integrations and reasoning with tools. Chat\nCompletions remains available. For `orkas-llm-1.5` Chat tool calls, Server sets\n`reasoning_effort: \"none\"` automatically; callers do not need to set it.\n\nFor `orkas-llm-1.5-pro` Responses calls, Sol attempts normalize explicit\n`reasoning.effort` values `off` and `none` to `low`, which may use reasoning\ntokens. Omitted effort retains the default `high`; other models keep their\nown controls.\n\nImage and video generation are asynchronous: the POST returns a task id, and the\nmatching GET reports the task's status and result. Human-readable guides and\nrunnable examples: https://orkas.ai/api-docs/\n","version":"1.0.0"},"servers":[{"url":"https://orkas.ai"}],"paths":{"/v1/openapi.json":{"get":{"summary":"Openapi Document","description":"Machine-readable contract for the public surface.\n\nGenerated from the live router, so it cannot drift from the handlers the way\na hand-maintained spec would. The server origin comes from deployment config\nrather than the request Host header, so a forged Host cannot poison the\npublished document or its cache. Unauthenticated on purpose: an agent must be\nable to read the contract before it can hold a key.","operationId":"openapi_document_v1_openapi_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/chat/completions":{"post":{"summary":"Chat Completions","description":"Chat Completions compatibility. Server disables reasoning for standard\nLuna tool calls automatically. Use /v1/responses for reasoning with tools.","operationId":"chat_completions_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/responses":{"post":{"summary":"Responses","description":"Recommended native reasoning/tool protocol with the same API-key scope and ledger.","operationId":"responses_v1_responses_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/search":{"post":{"summary":"Search","operationId":"search_v1_search_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/audio/voices":{"get":{"summary":"Audio Voices","operationId":"audio_voices_v1_audio_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/audio/speech":{"post":{"summary":"Audio Speech","operationId":"audio_speech_v1_audio_speech_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/audio/transcription_sessions":{"post":{"summary":"Audio Transcription Session","description":"Exchange a speech-scoped key for one 30-second ASR connection ticket.\n\nConnect to `/api/voice/asr_ws?ticket=<ticket>&encoding=raw` (or gzip).\nAudio is mono 16 kHz signed 16-bit PCM; send `__END__` to finalize.\nTicket creation does not start recognition or charge credits.","operationId":"audio_transcription_session_v1_audio_transcription_sessions_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/images/generations":{"post":{"summary":"Image Generations","operationId":"image_generations_v1_images_generations_post","requestBody":{"content":{"application/json":{"schema":{"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/images/generations/{task_id}":{"get":{"summary":"Image Generation","operationId":"image_generation_v1_images_generations__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/videos":{"post":{"summary":"Videos","operationId":"videos_v1_videos_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreateRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoTask"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"202":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoTask"}}}}},"security":[{"ApiKeyAuth":[]}],"description":"Always asynchronous: a 202 receipt is acceptance, not completion. Poll the original task. Explicit model requires an unexpired quote and Idempotency-Key; same key and normalized input return the original task.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Required when model is specified and optional for automatic selection. Scoped to the account. Different input with the same key returns 409. Terminal-task deduplication is retained for seven days.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}}]}},"/v1/videos/models":{"get":{"summary":"Video Models","operationId":"video_models_v1_videos_models_get","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoModelCatalog"}}}},"304":{"description":"Catalog unchanged; no response body."}},"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"},"description":"Previously returned account-scoped ETag."}]}},"/v1/videos/estimate":{"post":{"summary":"Video Estimate","operationId":"video_estimate_v1_videos_estimate_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoEstimateRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoEstimate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v1/videos/{task_id}/content":{"get":{"summary":"Video Content","operationId":"video_content_v1_videos__task_id__content_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"307":{"description":"Redirect to the settled result. The location is temporary.","headers":{"Location":{"schema":{"type":"string","format":"uri"}}}},"409":{"description":"Result delivery or settlement is not complete."}},"security":[{"ApiKeyAuth":[]}]}},"/v1/videos/{task_id}":{"get":{"summary":"Video","operationId":"video_v1_videos__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoTask"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"202":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoTask"}}}}},"security":[{"ApiKeyAuth":[]}]}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoCreateRequest":{"oneOf":[{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":20000},"operation":{"type":"string","enum":["generate","edit"],"default":"generate"},"duration":{"type":"integer","description":"Omit for the automatic route default. With no output or reference constraints, Orkas prefers a 4-second MiniMax H3 Lite clip."},"resolution":{"type":"string","description":"Omit to let Orkas choose a compatible resolution. With no output or reference constraints, Orkas prefers 480p."},"ratio":{"type":"string","default":"16:9","description":"Catalog ratio, including adaptive only in supported reference modes."},"generate_audio":{"type":"boolean","default":true,"description":"False requests silent output only where the model exposes that control."},"watermark":{"type":"boolean","default":false,"description":"True is accepted only for models advertising this control."},"seed":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Only models advertising seed accept this field."},"reference_image_urls":{"type":"array","items":{"type":"string","format":"uri","pattern":"^https://","maxLength":8192}},"reference_video_urls":{"type":"array","items":{"type":"string","format":"uri","pattern":"^https://","maxLength":8192}},"quality":{"type":"string","enum":["economy","balanced","quality"],"description":"Legacy compatibility field. Current routing uses the selected model or the requested output and reference media."},"quote_id":{"type":"string","maxLength":64,"description":"Same-account estimate receipt; required for new explicit-model creation, valid for five minutes."}},"additionalProperties":false,"required":["prompt"]},{"type":"object","properties":{"model":{"type":"string","examples":["seedance-2.5"],"description":"Stable short model ID returned by GET /v1/videos/models. Omit for automatic selection."},"prompt":{"type":"string","minLength":1,"maxLength":20000},"operation":{"type":"string","enum":["generate","edit"],"default":"generate"},"duration":{"type":"integer","description":"Seconds allowed by the selected model. -1 requests automatic duration only where supported. Omit for Omni; null is not accepted. Model defaults and combination constraints are in the catalog."},"resolution":{"type":"string","description":"Use the selected model catalog enum and default; there is no global resolution default."},"ratio":{"type":"string","default":"16:9","description":"Catalog ratio, including adaptive only in supported reference modes."},"generate_audio":{"type":"boolean","default":true,"description":"False requests silent output only where the model exposes that control."},"watermark":{"type":"boolean","default":false,"description":"True is accepted only for models advertising this control."},"seed":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Only models advertising seed accept this field."},"reference_image_urls":{"type":"array","items":{"type":"string","format":"uri","pattern":"^https://","maxLength":8192}},"reference_video_urls":{"type":"array","items":{"type":"string","format":"uri","pattern":"^https://","maxLength":8192}},"quality":{"type":"string","enum":["economy","balanced","quality"],"description":"Legacy compatibility field. Current routing uses the selected model or the requested output and reference media."},"quote_id":{"type":"string","maxLength":64,"description":"Same-account estimate receipt; required for new explicit-model creation, valid for five minutes."}},"additionalProperties":false,"required":["model","prompt","quote_id"]}],"description":"Model-specific capabilities, limits and defaults come from GET /v1/videos/models. Estimate and creation use identical generation parameters."},"VideoEstimateRequest":{"oneOf":[{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":20000},"operation":{"type":"string","enum":["generate","edit"],"default":"generate"},"duration":{"type":"integer","description":"Omit for the automatic route default. With no output or reference constraints, Orkas prefers a 4-second MiniMax H3 Lite clip."},"resolution":{"type":"string","description":"Omit to let Orkas choose a compatible resolution. With no output or reference constraints, Orkas prefers 480p."},"ratio":{"type":"string","default":"16:9","description":"Catalog ratio, including adaptive only in supported reference modes."},"generate_audio":{"type":"boolean","default":true,"description":"False requests silent output only where the model exposes that control."},"watermark":{"type":"boolean","default":false,"description":"True is accepted only for models advertising this control."},"seed":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Only models advertising seed accept this field."},"reference_image_urls":{"type":"array","items":{"type":"string","format":"uri","pattern":"^https://","maxLength":8192}},"reference_video_urls":{"type":"array","items":{"type":"string","format":"uri","pattern":"^https://","maxLength":8192}},"quality":{"type":"string","enum":["economy","balanced","quality"],"description":"Legacy compatibility field. Current routing uses the selected model or the requested output and reference media."},"quote_id":{"type":"string","maxLength":64,"description":"Same-account estimate receipt; required for new explicit-model creation, valid for five minutes."}},"additionalProperties":false,"required":[]},{"type":"object","properties":{"model":{"type":"string","examples":["seedance-2.5"],"description":"Stable short model ID returned by GET /v1/videos/models. Omit for automatic selection."},"prompt":{"type":"string","minLength":1,"maxLength":20000},"operation":{"type":"string","enum":["generate","edit"],"default":"generate"},"duration":{"type":"integer","description":"Seconds allowed by the selected model. -1 requests automatic duration only where supported. Omit for Omni; null is not accepted. Model defaults and combination constraints are in the catalog."},"resolution":{"type":"string","description":"Use the selected model catalog enum and default; there is no global resolution default."},"ratio":{"type":"string","default":"16:9","description":"Catalog ratio, including adaptive only in supported reference modes."},"generate_audio":{"type":"boolean","default":true,"description":"False requests silent output only where the model exposes that control."},"watermark":{"type":"boolean","default":false,"description":"True is accepted only for models advertising this control."},"seed":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Only models advertising seed accept this field."},"reference_image_urls":{"type":"array","items":{"type":"string","format":"uri","pattern":"^https://","maxLength":8192}},"reference_video_urls":{"type":"array","items":{"type":"string","format":"uri","pattern":"^https://","maxLength":8192}},"quality":{"type":"string","enum":["economy","balanced","quality"],"description":"Legacy compatibility field. Current routing uses the selected model or the requested output and reference media."},"quote_id":{"type":"string","maxLength":64,"description":"Same-account estimate receipt; required for new explicit-model creation, valid for five minutes."}},"additionalProperties":false,"required":["model"]}],"description":"Model-specific capabilities, limits and defaults come from GET /v1/videos/models. Estimate and creation use identical generation parameters."},"VideoTask":{"type":"object","required":["id","object","status","usage"],"properties":{"id":{"type":"string"},"object":{"const":"video"},"created":{"type":"integer"},"status":{"type":"string"},"model":{"type":"string","examples":["seedance-2.5"],"description":"Stable short model ID returned by GET /v1/videos/models."},"model_name":{"type":"string"},"stage":{"type":"string"},"operation":{"type":"string"},"ratio":{"type":"string"},"quote_type":{"enum":["fixed_request","estimated_usage"]},"resolution":{"type":"string"},"duration":{"type":"integer","description":"Compatibility field: explicit requested seconds, or 0 when automatic/unknown. Not measured output duration."},"parameters":{"type":"object","description":"Frozen normalized request parameters; duration retains -1 for automatic or null for prompt-controlled generation."},"actual_parameters":{"type":"object","description":"Provider-reported output duration when available; null when unknown. Kling billing duration is separate from actual file duration."},"usage":{"type":"object","properties":{"credits_milli":{"type":"integer","minimum":0,"description":"1000 milli credits equal one credit. A queued task amount is its reserved quote, not proof of payment."}}},"url":{"type":"string","format":"uri","description":"Available after successful delivery and settlement only."},"error":{"type":"object"}}},"VideoEstimate":{"type":"object","properties":{"provider":{"const":"orkas-video"},"model":{"type":"string","examples":["seedance-2.5"],"description":"Stable short model ID returned by GET /v1/videos/models."},"quote_id":{"type":"string"},"expires_at":{"type":"integer","description":"Unix seconds."},"price_version":{"type":"string"},"quote_type":{"enum":["fixed_request","estimated_usage"],"description":"New supplier-unit tariffs reserve an estimate and settle actual usage against frozen rates. The estimate is not a price cap."},"usage":{"type":"object","properties":{"credits_milli":{"type":"integer","minimum":0,"description":"1000 milli credits equal one credit. A queued task amount is its reserved quote, not proof of payment."}}},"actual_parameters":{"type":"object","description":"Effective generation parameters used for the quote. Prompt-controlled models omit duration. Keep the original prompt and references when you create the task. For automatic quotes, model may be omitted or match the quoted model."}}},"VideoModelCatalog":{"type":"object","properties":{"provider":{"const":"orkas-video"},"catalog_version":{"type":"string"},"models":{"type":"array","items":{"type":"object","properties":{"model_id":{"type":"string","examples":["seedance-2.5"],"description":"Stable short model ID to send as model in video requests."},"display_name_en":{"type":"string"},"display_name_zh":{"type":"string"},"availability":{"enum":["available","disabled","unconfigured"]},"capability_version":{"type":"string"},"release_stage":{"enum":["ga","preview"]},"operations":{"type":"array","items":{"enum":["generate","edit"]}},"parameters_schema":{"type":"object","description":"JSON Schema for the model-specific public request controls. Apply allOf along with the individual fields and the base video request schema. The public schema excludes first_frame_url and last_frame_url."},"defaults":{"type":"object"},"reference_roles":{"type":"object"},"billing":{"type":"object"}}}}}}},"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","description":"Orkas API key, sent as `Authorization: Bearer <key>`. Create one in the Orkas account settings."}}}}