{"openapi":"3.1.0","info":{"title":"Shark AI API","version":"1.0.0","description":"Agent-friendly AI model gateway for language, image, video, audio, and embedding models.\n\nBase URL for SDKs: https://shark.ai/api/v1\n\nLanguage model formats:\n- OpenAI Format: POST /api/v1/chat/completions, protocol openai_chat_completions, broad SDK compatibility.\n- Anthropic Format: POST /api/v1/messages, protocol anthropic_messages, preferred for Claude/Anthropic models when supported.\n- Gemini Format: POST /api/v1/models/{model}:generateContent, protocol gemini_generate_content, preferred for Gemini models when supported.\n\nAgents should inspect GET /api/v1/models, choose by category + supported_protocols, then fetch per-model docs at /docs/{category}/{model-id}/llms.txt when model-specific parameters are needed.\n\nOpenAI Format multi-turn state:\n- Gemini image outputs may encode thought_signature in image_url.url data URIs. Pass returned URLs back unchanged.\n- Anthropic reasoning outputs may include message.reasoning_details with signatures. Preserve reasoning_details on assistant messages in later turns.\n\nAvailable models: bytedance/seedream-v4.5, google/gemini-3.1-flash-image-preview, midjourney/text-to-image, openai/gpt-image-2, x-ai/grok-imagine-image/edit, anthropic/claude-opus-4.6, anthropic/claude-opus-4.7, anthropic/claude-sonnet-4.6, deepseek/deepseek-v4-flash, deepseek/deepseek-v4-pro, google/gemini-3.1-flash-image-preview, google/gemini-3.1-pro-preview, minimax/minimax-m2.7, openai/gpt-4o, openai/gpt-4o-mini, openai/gpt-5.4, x-ai/grok-4-1-fast-non-reasoning, x-ai/grok-4-1-fast-reasoning, alibaba/wan-2.6, alibaba/wan-2.7, bytedance/seedance-2.0\n\nUser-facing Text models use the internal language category in model docs URLs.","contact":{"email":"develop@weshop.com"}},"servers":[{"url":"https://shark.ai","description":"Production origin"}],"security":[{"bearerAuth":[]},{"xApiKeyAuth":[]}],"paths":{"/api/v1/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Create chat completion using OpenAI Format","description":"OpenAI-compatible chat completions. Use for broad SDK compatibility. If the selected model supports anthropic_messages or gemini_generate_content and native semantics matter, prefer the corresponding endpoint.\n\nMulti-turn provider state:\n- Gemini image editing: pass returned image_url.url values unchanged if they contain thought_signature.\n- Anthropic thinking: preserve assistant message.reasoning_details in later turns.\n\nAvailable models: anthropic/claude-opus-4.6, anthropic/claude-opus-4.7, anthropic/claude-sonnet-4.6, deepseek/deepseek-v4-flash, deepseek/deepseek-v4-pro, google/gemini-3.1-flash-image-preview, google/gemini-3.1-pro-preview, minimax/minimax-m2.7, openai/gpt-4o, openai/gpt-4o-mini, openai/gpt-5.4, x-ai/grok-4-1-fast-non-reasoning, x-ai/grok-4-1-fast-reasoning","tags":["Language: OpenAI Format"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"Model ID","enum":["anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6","deepseek/deepseek-v4-flash","deepseek/deepseek-v4-pro","google/gemini-3.1-flash-image-preview","google/gemini-3.1-pro-preview","minimax/minimax-m2.7","openai/gpt-4o","openai/gpt-4o-mini","openai/gpt-5.4","x-ai/grok-4-1-fast-non-reasoning","x-ai/grok-4-1-fast-reasoning"]},"messages":{"type":"array","description":"Array of message objects","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"nullable":true,"oneOf":[{"type":"string","description":"Text content"},{"type":"array","description":"Multimodal content array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url","video_url","audio_url"]},"text":{"type":"string"},"image_url":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}},"video_url":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}},"audio_url":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}}}}}]},"reasoning_details":{"type":"array","description":"Provider reasoning details for multi-turn continuity. Preserve unchanged on assistant messages when returned, especially Anthropic thinking signatures.","items":{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string","description":"Provider signature that must be preserved across turns"}}}},"images":{"type":"array","description":"Generated images returned by multimodal text models. Preserve image_url.url unchanged across Gemini image-edit turns.","items":{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or data URI. Gemini may include thought_signature in the data URI prefix; preserve unchanged."}}}}}}}}},"stream":{"type":"boolean","default":false,"description":"Enable SSE streaming"},"stream_options":{"type":"object","additionalProperties":true},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"Sampling temperature"},"max_tokens":{"type":"integer","description":"Maximum output tokens"},"top_p":{"type":"number","minimum":0,"maximum":1,"description":"Nucleus sampling"},"stop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Stop sequences"},"presence_penalty":{"type":"number"},"frequency_penalty":{"type":"number"},"tools":{"type":"array","items":{"type":"object"},"description":"OpenAI-compatible tool definitions"},"tool_choice":{"oneOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object"}]},"reasoning":{"type":"object","description":"Reasoning config for supported providers"},"modalities":{"type":"array","items":{"type":"string","enum":["text","image"]},"description":"Output modalities"},"image_config":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"Chat completion response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat.completion"},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string","nullable":true},"images":{"type":"array","description":"Optional generated images for multimodal text models","items":{"type":"object","properties":{"type":{"type":"string"},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Image URL or base64 data URI, depending on the text model protocol"}}}}}},"reasoning_details":{"type":"array","description":"Optional provider reasoning details. Preserve unchanged in later turns when present.","items":{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"}}}}}},"finish_reason":{"type":"string","enum":["stop","length","content_filter","tool_calls","error"]}}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}},"credit":{"type":"number","description":"Cost in credits (1 USD = 10,000 credits)"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientCredits"},"429":{"$ref":"#/components/responses/RateLimit"}}}},"/api/v1/messages":{"post":{"operationId":"createAnthropicMessage","summary":"Create response using Anthropic Format","description":"Anthropic Messages-compatible endpoint. Prefer this for Claude/Anthropic models when supported, especially for native content blocks, tool use, thinking blocks, and thinking signatures.\n\nAvailable models: anthropic/claude-opus-4.6, anthropic/claude-opus-4.7, anthropic/claude-sonnet-4.6","tags":["Language: Anthropic Format"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","max_tokens","messages"],"properties":{"model":{"type":"string","description":"Model ID","enum":["anthropic/claude-opus-4.6","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6"]},"max_tokens":{"type":"integer","description":"Maximum output tokens"},"system":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}],"description":"System prompt"},"messages":{"type":"array","description":"Anthropic user/assistant messages","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]}}}},"stream":{"type":"boolean","default":false,"description":"Enable Anthropic SSE streaming"},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"top_k":{"type":"integer"},"stop_sequences":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"object"}},"tool_choice":{"type":"object"},"thinking":{"type":"object","description":"Extended thinking config for supported models"}}}}}},"responses":{"200":{"description":"Anthropic message response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"message"},"role":{"type":"string","const":"assistant"},"model":{"type":"string"},"content":{"type":"array","items":{"type":"object"}},"stop_reason":{"type":"string","nullable":true},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}}},"credit":{"type":"number","description":"Cost in credits"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientCredits"},"429":{"$ref":"#/components/responses/RateLimit"}}}},"/api/v1/models/{model}:generateContent":{"post":{"operationId":"generateGeminiContent","summary":"Generate content using Gemini Format","description":"Gemini Generate Content-compatible endpoint. Prefer this for Gemini-family models when supported, especially for native contents, parts, multimodal files, and generationConfig.\n\nAvailable models: google/gemini-3.1-flash-image-preview, google/gemini-3.1-pro-preview","tags":["Language: Gemini Format"],"parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string","enum":["google/gemini-3.1-flash-image-preview","google/gemini-3.1-pro-preview"]},"description":"Model ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contents"],"properties":{"contents":{"type":"array","items":{"type":"object"},"description":"Gemini content turns"},"systemInstruction":{"type":"object"},"generationConfig":{"type":"object","additionalProperties":true},"tools":{"type":"array","items":{"type":"object"}}}}}}},"responses":{"200":{"description":"Gemini generateContent response with optional credit field","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientCredits"},"429":{"$ref":"#/components/responses/RateLimit"}}}},"/api/v1/images/generations":{"post":{"operationId":"createImage","summary":"Generate image","description":"Image generation supporting both sync (default) and async modes. Returns Shark AI signed image URLs. Download returned URLs as soon as possible; signed URLs are short-lived. This URL normalization only applies to the Image category endpoint; text models that output images through chat/messages keep their protocol-native response shape.\n\nSet async=true to receive a 202 with a task ID for polling. Default is synchronous (waits for result).\n\nAvailable models: bytedance/seedream-v4.5, google/gemini-3.1-flash-image-preview, midjourney/text-to-image, openai/gpt-image-2, x-ai/grok-imagine-image/edit\n\nParameters vary by model. See model-specific schemas in the request body.","tags":["Images"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","description":"Model ID","enum":["bytedance/seedream-v4.5","google/gemini-3.1-flash-image-preview","midjourney/text-to-image","openai/gpt-image-2","x-ai/grok-imagine-image/edit"]},"prompt":{"type":"string","description":"Text description of the image"},"async":{"type":"boolean","default":false,"description":"If true, returns 202 with task ID for polling instead of waiting for result"},"timeout":{"type":"integer","default":300,"minimum":30,"maximum":1800,"description":"Maximum time in seconds to wait for generation (async mode)"},"size":{"description":"Image size in pixels (width*height)","default":"2048*2048","type":"string","enum":["512*512","768*768","1024*1024","1536*1536","2048*2048","1024*768","768*1024","1536*1024","1024*1536"]},"n":{"description":"Number of images","default":1,"type":"number","minimum":1,"maximum":4},"seed":{"description":"Random seed (-1 for random)","default":-1,"type":"number"},"image":{"description":"Optional reference image URLs or base64 images for editing","type":"array"},"image_size":{"description":"Image size","default":"1K","type":"string","enum":["1K","2K","4K"]},"aspect_ratio":{"description":"Aspect ratio","default":"1:1","type":"string","enum":["1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"]},"response_format":{"description":"Response format","default":"b64_json","type":"string","enum":["b64_json","url"]},"niji":{"description":"Niji mode for anime/Eastern aesthetics","default":"close","type":"string","enum":["close","0","5","6"]},"sref":{"description":"URL of a reference image for style guidance","type":"string","format":"uri"},"chaos":{"description":"Variety in results (0-100)","default":0,"type":"number","minimum":0,"maximum":100},"weird":{"description":"Unconventional aesthetics (0-3000)","default":0,"type":"number","minimum":0,"maximum":3000},"quality":{"description":"Image detail and processing time (0.25=draft, 1=standard, 2=high)","default":"1","type":"string","enum":["0.25","0.5","1","2"]},"stylize":{"description":"Artistic style intensity (0-1000)","default":100,"type":"number","minimum":0,"maximum":1000},"version":{"description":"Midjourney model version","default":"7","type":"string","enum":["6","6.1","7"]},"mask":{"description":"Mask image for partial editing (PNG with alpha channel)","type":"string","format":"uri"},"background":{"description":"Background type (gpt-image-2 does not support transparent)","default":"auto","type":"string","enum":["opaque","auto"]},"output_format":{"description":"Output file format","default":"png","type":"string","enum":["png","jpeg","webp"]}}}}}},"responses":{"200":{"description":"Generated image(s)","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Short-lived signed image URL"}}}},"usage":{"type":"object","description":"Optional provider token usage","additionalProperties":true},"credit":{"type":"number","description":"Cost in credits"}}}}}},"202":{"description":"Task accepted (async mode)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Task ID"},"object":{"type":"string","const":"image_generation.task"},"status":{"type":"string","const":"pending"},"created":{"type":"integer","description":"Unix timestamp of task creation"},"timeout":{"type":"integer","description":"Timeout in seconds"},"polling_url":{"type":"string","description":"URL to poll for task status"},"cancel_url":{"type":"string","description":"URL to cancel the task"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientCredits"},"429":{"$ref":"#/components/responses/RateLimit"}}}},"/api/v1/images/generations/{id}":{"get":{"operationId":"getImageTask","summary":"Get image task status","description":"Poll an async image generation task. Returns current status and result when completed.","tags":["Images"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Task ID"}],"responses":{"200":{"description":"Task status","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Task ID"},"object":{"type":"string","const":"image_generation.task"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"]},"created":{"type":"integer","description":"Unix timestamp of task creation"},"completed_at":{"type":"integer","nullable":true,"description":"Unix timestamp of completion"},"started_at":{"type":"integer","nullable":true,"description":"Unix timestamp when processing started"},"data":{"type":"array","description":"Generated images (present when completed)","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Short-lived signed image URL"}}}},"usage":{"type":"object","description":"Optional provider token usage (present when completed)","additionalProperties":true},"credit":{"type":"number","description":"Cost in credits (present when completed)"},"polling_url":{"type":"string","description":"URL to poll for task status"},"error":{"type":"string","nullable":true,"description":"Error message (present when failed)"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Task not found"}}}},"/api/v1/images/generations/{id}/cancel":{"post":{"operationId":"cancelImageTask","summary":"Cancel image task","description":"Cancel a pending image generation task. Only tasks in pending status can be cancelled.","tags":["Images"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Task ID"}],"responses":{"200":{"description":"Task cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Task ID"},"object":{"type":"string","const":"image_generation.task"},"status":{"type":"string","const":"cancelled"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Task not found"},"409":{"description":"Task already started and cannot be cancelled"}}}},"/api/v1/videos":{"post":{"operationId":"createVideoTask","summary":"Create video generation task","description":"Async video generation with timeout support. Returns task ID — poll GET /api/v1/videos/:id for result. Use timeout to control maximum generation time.\n\nAvailable models: alibaba/wan-2.6, alibaba/wan-2.7, bytedance/seedance-2.0","tags":["Videos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string","description":"Model ID","enum":["alibaba/wan-2.6","alibaba/wan-2.7","bytedance/seedance-2.0"]},"prompt":{"type":"string","description":"Video description"},"timeout":{"type":"integer","default":600,"minimum":60,"maximum":3600,"description":"Maximum time in seconds to wait for generation"},"seed":{"description":"Random seed (-1 for random)","default":-1,"type":"number","minimum":-1,"maximum":2147483647},"duration":{"description":"Duration in seconds","default":"5","type":"string","enum":["5","10","15"]},"shot_type":{"description":"Single shot or multi-shot","default":"single","type":"string","enum":["single","multi"]},"resolution":{"description":"Video resolution","default":"720p","type":"string","enum":["480p","720p","1080p"]},"aspect_ratio":{"description":"Aspect ratio (text-to-video only)","default":"16:9","type":"string","enum":["16:9","9:16"]},"frame_images":{"description":"Reference images for image-to-video (omit for text-to-video)","type":"array","items":{"type":"string"}},"negative_prompt":{"description":"Things to avoid in the video","type":"string"},"enable_prompt_expansion":{"description":"Enable AI prompt expansion","default":false,"type":"boolean"},"input_references":{"description":"Reference images for style/content guidance (text-to-video only)","type":"array","items":{"type":"string"}},"reference_audios":{"description":"Reference audio for audio-driven generation (text-to-video only)","type":"array","items":{"type":"string"}},"reference_videos":{"description":"Reference videos for motion/style guidance (text-to-video only)","type":"array","items":{"type":"string"}}}}}}},"responses":{"202":{"description":"Task created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Task ID"},"status":{"type":"string","const":"pending"},"polling_url":{"type":"string","description":"URL to poll for status"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientCredits"}}}},"/api/v1/videos/{id}":{"get":{"operationId":"getVideoTask","summary":"Get video task status","description":"Poll every 3-5 seconds until status is completed, failed, or cancelled. Polling is a pure DB read and returns instantly.","tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Task ID"}],"responses":{"200":{"description":"Task status","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","running","in_progress","completed","failed","cancelled"]},"output":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string","format":"uri"}}},"description":"Present when status is completed"},"error":{"type":"string","description":"Present when status is failed"},"credit":{"type":"number","description":"Cost in credits (present when completed)"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Task not found"}}}},"/api/v1/videos/{id}/cancel":{"post":{"operationId":"cancelVideoTask","summary":"Cancel video task","description":"Cancel a pending video generation task. Only tasks in pending status can be cancelled.","tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Task ID"}],"responses":{"200":{"description":"Task cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Task ID"},"status":{"type":"string","const":"cancelled"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Task not found"},"409":{"description":"Task already started and cannot be cancelled"}}}},"/api/v1/models":{"get":{"operationId":"listModels","summary":"List available models","description":"Returns all enabled models with their capabilities.","tags":["Models"],"responses":{"200":{"description":"Model list","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Model ID"},"unique_id":{"type":"string","description":"Category-qualified ID, e.g. language/vendor/model"},"object":{"type":"string","const":"model"},"category":{"type":"string","enum":["language","image","video","audio","embedding"],"description":"Internal category. Display \"language\" as Text in user-facing UI."},"display_name":{"type":"string"},"vendor":{"type":"string"},"supported_protocols":{"type":"array","items":{"type":"string"}},"input_modalities":{"type":"array","items":{"type":"string"}},"output_modalities":{"type":"array","items":{"type":"string"}},"total_context":{"type":"integer","nullable":true},"max_output":{"type":"integer","nullable":true},"parameter_schema":{"type":"object","additionalProperties":true},"documentation_url":{"type":"string","format":"uri"}}}}}}}}}}}},"/api/v1/models/{model}":{"get":{"operationId":"retrieveModel","summary":"Retrieve model","description":"Returns one enabled model. If the same model ID exists in multiple categories, pass the category query parameter.","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string"},"description":"Model ID, e.g. vendor/model-name"},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["language","image","video","audio","embedding"]},"description":"Internal category. Use language for user-facing Text models."}],"responses":{"200":{"description":"Model","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Model ID"},"unique_id":{"type":"string","description":"Category-qualified ID, e.g. language/vendor/model"},"object":{"type":"string","const":"model"},"category":{"type":"string","enum":["language","image","video","audio","embedding"]},"display_name":{"type":"string"},"vendor":{"type":"string"},"supported_protocols":{"type":"array","items":{"type":"string"}},"input_modalities":{"type":"array","items":{"type":"string"}},"output_modalities":{"type":"array","items":{"type":"string"}},"total_context":{"type":"integer","nullable":true},"max_output":{"type":"integer","nullable":true},"parameter_schema":{"type":"object","additionalProperties":true},"documentation_url":{"type":"string","format":"uri"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Model not found"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key (sk-...)"},"xApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key header used by Anthropic-compatible clients"}},"responses":{"BadRequest":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","enum":["invalid_request_error","content_moderation","input_too_large"]}}}}}}}},"Unauthorized":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"auth_error"}}}}}}}},"InsufficientCredits":{"description":"Not enough credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"insufficient_credits"}}}}}}}},"RateLimit":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","const":"rate_limit_error"}}}}}}}}}},"tags":[{"name":"Language: OpenAI Format","description":"OpenAI-compatible chat completions for broad SDK compatibility"},{"name":"Language: Anthropic Format","description":"Anthropic-compatible messages for selected language models"},{"name":"Language: Gemini Format","description":"Gemini Generate Content-compatible API for selected language models"},{"name":"Images","description":"Sync and async image generation from text prompts"},{"name":"Videos","description":"Async video generation with task polling and cancellation support"},{"name":"Models","description":"Model discovery and capabilities"}]}