{"openapi":"3.1.0","info":{"title":"Eden AI API V3","version":"3.0.0"},"paths":{"/v3/info":{"get":{"tags":["info"],"summary":"List Features","description":"List all available features and their subfeatures.\n\nReturns features that exist in both the registry (technically supported)\nand database (have available providers).","operationId":"list_features_v3_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeaturesListResponse"}}}}}}},"/v3/info/{feature}":{"get":{"tags":["info"],"summary":"List Subfeatures","description":"List all subfeatures for a specific feature.\n\nArgs:\n feature: Feature name (e.g., 'text', 'image', 'ocr', 'translation')\n\nReturns:\n Feature info with display names and list of subfeatures.","operationId":"list_subfeatures_v3_info__feature__get","parameters":[{"name":"feature","in":"path","required":true,"schema":{"type":"string","title":"Feature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/info/{feature}/{subfeature}":{"get":{"tags":["info"],"summary":"Get Feature Info","description":"Get detailed information for a specific feature/subfeature.\n\nArgs:\n feature: Feature name (e.g., 'text', 'image', 'ocr', 'translation')\n subfeature: Subfeature name (e.g., 'ai_detection', 'ocr', 'generation')\n format: Schema output format (simplified or json_schema)\n\nReturns:\n - Feature and subfeature display names\n - Input schema\n - Output schema\n - Available providers and their models","operationId":"get_feature_info_v3_info__feature___subfeature__get","parameters":[{"name":"feature","in":"path","required":true,"schema":{"type":"string","title":"Feature"}},{"name":"subfeature","in":"path","required":true,"schema":{"type":"string","title":"Subfeature"}},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SchemaFormat","description":"Schema format: 'simplified' for flat readable format, 'json_schema' for full Pydantic JSON Schema","default":"simplified"},"description":"Schema format: 'simplified' for flat readable format, 'json_schema' for full Pydantic JSON Schema"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubfeatureDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/chat/completions":{"post":{"tags":["Chat"],"summary":"Chat Completions","description":"OpenAI-compatible chat completions endpoint (v3).","operationId":"chat_completions_v3_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmCompletionBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/responses":{"post":{"tags":["Responses"],"summary":"Create Response","description":"Create a model response.","operationId":"create_response_v3_responses_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMResponseObject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/responses/{response_id}":{"get":{"tags":["Responses"],"summary":"Retrieve Response","description":"Retrieve a stored model response by ID.","operationId":"retrieve_response_v3_responses__response_id__get","security":[{"AuthBearer":[]}],"parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string","title":"Response Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMResponseObject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Responses"],"summary":"Delete Response","description":"Delete a stored model response by ID.","operationId":"delete_response_v3_responses__response_id__delete","security":[{"AuthBearer":[]}],"parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string","title":"Response Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponseObject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/moderations":{"post":{"tags":["Moderations"],"summary":"Create Moderation","description":"OpenAI-compatible content moderation endpoint.","operationId":"create_moderation_v3_moderations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/moderations/models":{"get":{"tags":["Moderations"],"summary":"List Moderation Models","description":"List available moderation models.","operationId":"list_moderation_models_v3_moderations_models_get","parameters":[{"name":"view","in":"query","required":false,"schema":{"enum":["endpoints","models"],"type":"string","description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider.","default":"endpoints","title":"View"},"description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ListModelsResponse"},{"$ref":"#/components/schemas/ListModelsWithEndpointsResponse"}],"title":"Response List Moderation Models V3 Moderations Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/embeddings":{"post":{"tags":["Embeddings"],"summary":"Create Embeddings","description":"OpenAI-compatible embeddings endpoint.","operationId":"create_embeddings_v3_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/embeddings/models":{"get":{"tags":["Embeddings"],"summary":"List Embeddings Models","description":"List available embeddings models.","operationId":"list_embeddings_models_v3_embeddings_models_get","parameters":[{"name":"view","in":"query","required":false,"schema":{"enum":["endpoints","models"],"type":"string","description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider.","default":"endpoints","title":"View"},"description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ListModelsResponse"},{"$ref":"#/components/schemas/ListModelsWithEndpointsResponse"}],"title":"Response List Embeddings Models V3 Embeddings Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/v1/messages":{"post":{"tags":["Anthropic Messages"],"summary":"Create Anthropic Message","description":"Anthropic Messages API — native pass-through via litellm.","operationId":"create_anthropic_message_v3_v1_messages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicMessagesBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicMessagesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/v1/messages/count_tokens":{"post":{"tags":["Anthropic Messages"],"summary":"Count Anthropic Tokens","description":"Count input tokens for an Anthropic-format request without running the model.","operationId":"count_anthropic_tokens_v3_v1_messages_count_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicCountTokensBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicCountTokensResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/images/generations":{"post":{"tags":["Images"],"summary":"Image Generations","description":"OpenAI-compatible image generation endpoint.","operationId":"image_generations_v3_images_generations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/images/edits":{"post":{"tags":["Images"],"summary":"Image Edits","description":"OpenAI-compatible image-edit endpoint.\n\nAccepts either ``application/json`` (gpt-image-style ``images: [{file_id|image_url}]``)\nor ``multipart/form-data`` (OpenAI SDK classic shape: ``image[]`` UploadFile,\noptional ``mask`` UploadFile, plus text fields). Content-Type drives dispatch.","operationId":"image_edits_v3_images_edits_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"routing":{"anyOf":[{"$ref":"#/components/schemas/ProviderRoutingPreferences"},{"type":"null"}],"description":"How to pick between the providers that serve the requested model. Applies when `model` is a model name with no provider prefix (e.g. 'gpt-5.5'); ignored for a concrete 'provider/model' id, which already names its provider. With model='@edenai' the platform chooses the model too: `quality_cost` steers that choice, and the provider fields apply whenever the chosen model is a provider-less name."},"model":{"type":"string","title":"Model","description":"provider/model, e.g. 'openai/gpt-image-2'"},"prompt":{"type":"string","maxLength":32000,"minLength":1,"title":"Prompt"},"n":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"N"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size","description":"Provider-specific size string. OpenAI accepts '1024x1024', '1536x1024', '1024x1536', 'auto'. Vertex Imagen accepts square or aspect-ratio strings. Validation is delegated to the provider."},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"End-user identifier for abuse tracking."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Arbitrary metadata attached to the request."},"extra_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Extra Headers","description":"Additional HTTP headers forwarded to the provider API. Credential headers (Authorization, x-api-key, ...) are rejected."},"images":{"items":{"$ref":"#/components/schemas/ImageRef"},"type":"array","maxItems":16,"minItems":1,"title":"Images","description":"One or more input images. Each entry references one image via exactly one of `file_id` (an Eden upload id) or `image_url` (https URL or base64 data URL). The first image is the canvas; subsequent images are inpaint references."},"mask":{"anyOf":[{"$ref":"#/components/schemas/ImageRef"},{"type":"null"}],"description":"Optional mask image (PNG with transparent pixels marking the regions to edit). Same shape as an `images[]` entry."}},"additionalProperties":true,"type":"object","required":["model","prompt","images"],"title":"ImageEditJsonBody","description":"OpenAI-compatible ``POST /v1/images/edits`` JSON request body.\n\nReferences:\n- OpenAI's current /v1/images/edits JSON form for gpt-image-* takes\n ``images: [{file_id | image_url}, ...]`` and an optional ``mask:\n {file_id | image_url}``.\n- ``image_url`` accepts an https URL or a ``data:image/...;base64,...`` URL."}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/images/models":{"get":{"tags":["Images"],"summary":"List Image Models","description":"List image-generation / image-edit models available in the caller's region.","operationId":"list_image_models_v3_images_models_get","parameters":[{"name":"view","in":"query","required":false,"schema":{"enum":["endpoints","models"],"type":"string","description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider.","default":"endpoints","title":"View"},"description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ListModelsResponse"},{"$ref":"#/components/schemas/ListModelsWithEndpointsResponse"}],"title":"Response List Image Models V3 Images Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/audio/transcriptions":{"post":{"tags":["Audio"],"summary":"Audio Transcriptions","description":"OpenAI-compatible speech-to-text endpoint.\n\nAccepts either ``multipart/form-data`` (OpenAI SDK shape: a ``file`` upload\nplus text fields) or ``application/json`` (``file_id`` / ``file_url`` plus\ntext fields). Content-Type drives dispatch.","operationId":"audio_transcriptions_v3_audio_transcriptions_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"routing":{"anyOf":[{"$ref":"#/components/schemas/ProviderRoutingPreferences"},{"type":"null"}],"description":"How to pick between the providers that serve the requested model. Applies when `model` is a model name with no provider prefix (e.g. 'gpt-5.5'); ignored for a concrete 'provider/model' id, which already names its provider. With model='@edenai' the platform chooses the model too: `quality_cost` steers that choice, and the provider fields apply whenever the chosen model is a provider-less name."},"model":{"type":"string","title":"Model","description":"provider/model, e.g. 'openai/whisper-1'"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"ISO-639-1 language code of the input audio (e.g. 'en'). Omit to let the provider auto-detect where supported."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Optional text to guide the model's style or continue a prior audio segment's context."},"response_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Format","description":"Transcript format: 'json', 'text', 'srt', 'verbose_json', or 'vtt'. Provider support varies; forwarded as-is."},"timestamp_granularities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Timestamp Granularities","description":"Timestamp granularities to populate with 'verbose_json' (['word'] and/or ['segment'])."},"temperature":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"Sampling temperature between 0 and 1."},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"End-user identifier for abuse tracking."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"Id of a file previously uploaded to Eden AI."},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url","description":"An https URL or a base64 data URL pointing at the audio."}},"type":"object","required":["model"],"title":"TranscriptionJsonBody","description":"JSON request body, references the audio by ``file_id`` or ``file_url``.\n\nExactly one of ``file_id`` (an Eden upload id) or ``file_url`` (an https URL\nor a ``data:audio/...;base64,...`` URL) must be set."}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptionResponse"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/audio/transcriptions/models":{"get":{"tags":["Audio"],"summary":"List Transcription Models","description":"List speech-to-text models available in the caller's region.","operationId":"list_transcription_models_v3_audio_transcriptions_models_get","parameters":[{"name":"view","in":"query","required":false,"schema":{"enum":["endpoints","models"],"type":"string","description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider.","default":"endpoints","title":"View"},"description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ListModelsResponse"},{"$ref":"#/components/schemas/ListModelsWithEndpointsResponse"}],"title":"Response List Transcription Models V3 Audio Transcriptions Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/audio/speech":{"post":{"tags":["Audio"],"summary":"Audio Speech","description":"OpenAI-compatible text-to-speech endpoint.\n\nAccepts a JSON body (``model``, ``input``, ``voice`` plus optional\n``response_format`` / ``speed`` / ``instructions``) and returns raw audio\nbytes; ``cost`` and ``provider`` are returned in the ``x-edenai-*`` response\nheaders.","operationId":"audio_speech_v3_audio_speech_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}},"audio/mpeg":{"schema":{"type":"string","format":"binary"}},"audio/ogg":{"schema":{"type":"string","format":"binary"}},"audio/aac":{"schema":{"type":"string","format":"binary"}},"audio/flac":{"schema":{"type":"string","format":"binary"}},"audio/wav":{"schema":{"type":"string","format":"binary"}},"audio/pcm":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/audio/speech/models":{"get":{"tags":["Audio"],"summary":"List Speech Models","description":"List text-to-speech models available in the caller's region.","operationId":"list_speech_models_v3_audio_speech_models_get","parameters":[{"name":"view","in":"query","required":false,"schema":{"enum":["endpoints","models"],"type":"string","description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider.","default":"endpoints","title":"View"},"description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ListModelsResponse"},{"$ref":"#/components/schemas/ListModelsWithEndpointsResponse"}],"title":"Response List Speech Models V3 Audio Speech Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/models":{"get":{"tags":["Models"],"summary":"List Models","description":"List available LLM models with extended metadata.\n\nThe default is deliberately today's payload: routing by model name is additive, so a client\nthat has never heard of `view` must keep getting exactly what it got before.","operationId":"list_models_v3_models_get","parameters":[{"name":"view","in":"query","required":false,"schema":{"enum":["endpoints","models"],"type":"string","description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider.","default":"endpoints","title":"View"},"description":"How to group the listing. 'endpoints' (default) is one entry per provider/model id, unchanged. 'models' is one entry per routable model name with its provider endpoints nested underneath — send that name as `model` to let Eden AI choose the provider."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ListModelsResponse"},{"$ref":"#/components/schemas/ListModelsWithEndpointsResponse"}],"title":"Response List Models V3 Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/universal-ai":{"post":{"tags":["universal-ai"],"summary":"Universal Ai","description":"Universal AI endpoint for synchronous non-LLM AI features.\n\nModel format: feature/subfeature/provider[/model]\n\nSupported features:\n- text/ai_detection, text/moderation, etc.\n- ocr/ocr, ocr/identity_parser, etc.\n- image/generation, image/background_removal, etc.\n\nFor async features (e.g., audio/speech_to_text_async), use POST /v3/universal-ai/async.\n\nRequest body:\n- model: Model string in format feature/subfeature/provider[/model]\n- input: Feature-specific input parameters\n- fallbacks: Optional list of fallback provider strings (max 3)\n- provider_params: Optional provider-specific parameters\n- show_original_response: Include raw provider response (default: false)\n\nExample:\n```json\n{\n \"model\": \"text/ai_detection/openai/gpt-4\",\n \"input\": {\"text\": \"Analyze this text\"}\n}\n```","operationId":"universal_ai_v3_universal_ai_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniversalAIBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniversalAIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AuthBearer":[]}]}},"/v3/universal-ai/async":{"post":{"tags":["universal-ai","universal-ai"],"summary":"Create Async Job","description":"Create an async job for long-running AI operations.\n\nModel format: feature/subfeature/provider[/model]\n\nSupported async features:\n- audio/speech_to_text_async\n\nRequest body:\n- model: Model string in format feature/subfeature/provider[/model]\n- input: Feature-specific input parameters\n- fallbacks: Optional list of fallback provider strings (max 3)\n- webhook_receiver: Optional URL to receive job completion notification\n- user_webhook_parameters: Optional custom parameters for webhook payload\n\nReturns 202 Accepted with job info for polling.","operationId":"create_async_job_v3_universal_ai_async_post","security":[{"AuthBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniversalAIAsyncBody"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniversalAIAsyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["universal-ai","universal-ai"],"summary":"List Async Jobs","description":"List async jobs for the authenticated user.","operationId":"list_async_jobs_v3_universal_ai_async_get","security":[{"AuthBearer":[]}],"parameters":[{"name":"feature","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by feature","title":"Feature"},"description":"Filter by feature"},{"name":"subfeature","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by subfeature","title":"Subfeature"},"description":"Filter by subfeature"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of items per page","default":100,"title":"Limit"},"description":"Maximum number of items per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniversalAIAsyncJobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/universal-ai/async/{job_id}":{"get":{"tags":["universal-ai","universal-ai"],"summary":"Get Async Job","description":"Get details for a specific async job.","operationId":"get_async_job_v3_universal_ai_async__job_id__get","security":[{"AuthBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniversalAIAsyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["universal-ai","universal-ai"],"summary":"Delete Async Job","description":"Delete an async job. Users can only delete their own jobs.\n\nA job that is still ``processing`` cannot be deleted (409): it has a charged\nprovider job in flight that must complete — settling or refunding — first;\nhard-deleting it would orphan that charge. Terminal jobs delete normally.","operationId":"delete_async_job_v3_universal_ai_async__job_id__delete","security":[{"AuthBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Async Job V3 Universal Ai Async Job Id Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/universal-ai/collections":{"post":{"tags":["collections"],"summary":"Create Collection","description":"Create a collection on a provider.\n\nThe model string is fixed at creation: items added here and\n/v3/universal-ai calls against this collection all run on its provider.\nReturns the collection id to use in item operations and inference calls.","operationId":"create_collection_v3_universal_ai_collections_post","security":[{"AuthBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCollectionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["collections"],"summary":"List Collections","description":"List the user's collections.\n\nServed from the gateway's ownership store, never from a provider scan\n(the provider listing is cross-tenant on shared accounts). Free, and —\nlike the other gateway resource reads — not registered in the request\nhistory.","operationId":"list_collections_v3_universal_ai_collections_get","security":[{"AuthBearer":[]}],"parameters":[{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by 'feature/subfeature' or 'feature/subfeature/provider'","title":"Model"},"description":"Filter by 'feature/subfeature' or 'feature/subfeature/provider'"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of items per page","default":100,"title":"Limit"},"description":"Maximum number of items per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCollectionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/universal-ai/collections/{collection_id}":{"get":{"tags":["collections"],"summary":"Get Collection","description":"Get one of the user's collections. Free, gateway-side only, and — like\nthe other gateway resource reads — not registered in the request history.","operationId":"get_collection_v3_universal_ai_collections__collection_id__get","security":[{"AuthBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collections"],"summary":"Delete Collection","description":"Delete a collection.\n\nDeletes it on the provider first, then removes the gateway ownership row.\nA collection already gone on the provider still gets its row removed, so\ndelete is idempotent and half-failed deletes can always be cleaned up.","operationId":"delete_collection_v3_universal_ai_collections__collection_id__delete","security":[{"AuthBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/universal-ai/collections/{collection_id}/items":{"post":{"tags":["collections"],"summary":"Add Item","description":"Add an item to a collection.\n\nThe file runs on the collection's provider. Returns the provider-side\nids of the indexed items (one image can yield several, e.g. faces).","operationId":"add_item_v3_universal_ai_collections__collection_id__items_post","security":[{"AuthBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddItemRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["collections"],"summary":"List Items","description":"List the item ids stored in a collection (live from the provider).","operationId":"list_items_v3_universal_ai_collections__collection_id__items_get","security":[{"AuthBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/universal-ai/collections/{collection_id}/items/{item_id}":{"delete":{"tags":["collections"],"summary":"Delete Item","description":"Delete one item from a collection (by its provider-side item id).","operationId":"delete_item_v3_universal_ai_collections__collection_id__items__item_id__delete","security":[{"AuthBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v3/upload":{"post":{"tags":["files management"],"summary":"Upload File","description":"Upload a file for persistent storage.\n\nReturns a file_id that can be used in subsequent API calls to /v3/universal-ai.\n\nFiles are stored securely and only accessible by the file owner.\nDefault expiration is 30 days, maximum 30 days.","operationId":"upload_file_v3_upload_post","security":[{"AuthBearer":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_v3_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["files management"],"summary":"List Files","description":"List uploaded files for the authenticated user.\n\nOptionally filter by purpose. Only returns non-expired files.\nResults are ordered by creation date (newest first).","operationId":"list_files_v3_upload_get","security":[{"AuthBearer":[]}],"parameters":[{"name":"purpose","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Filter by purpose","title":"Purpose"},"description":"Filter by purpose"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of items per page","default":100,"title":"Limit"},"description":"Maximum number of items per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["files management"],"summary":"Delete All Files","description":"Delete all uploaded files for the authenticated user.\n\nThis permanently deletes all files from storage.\nThis action cannot be undone.","operationId":"delete_all_files_v3_upload_delete","security":[{"AuthBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFilesResponse"}}}}}}},"/v3/upload/delete":{"post":{"tags":["files management"],"summary":"Delete Files By Ids","description":"Delete specific files by their IDs.\n\nOnly files owned by the authenticated user will be deleted.\nFiles that don't exist or aren't owned by the user are silently ignored.\nThis action cannot be undone.","operationId":"delete_files_by_ids_v3_upload_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFilesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"AuthBearer":[]}]}}},"components":{"schemas":{"AddItemRequest":{"properties":{"file":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string"}],"title":"File","description":"File to add, as a file id from /v3/upload or a URL. Accepted MIME types depend on the collection's subfeature (images for image/face_recognition)."}},"type":"object","required":["file"],"title":"AddItemRequest","description":"Body for adding an item to a collection."},"AnthropicContentBlock":{"properties":{"type":{"type":"string","title":"Type"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input"},"tool_use_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Use Id"},"content":{"anyOf":[{"type":"string"},{"items":{},"type":"array"},{"type":"null"}],"title":"Content"},"is_error":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Error"},"source":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source"},"thinking":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thinking"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"}},"additionalProperties":true,"type":"object","required":["type"],"title":"AnthropicContentBlock"},"AnthropicCountTokensBody":{"properties":{"model":{"type":"string","title":"Model"},"messages":{"items":{"$ref":"#/components/schemas/AnthropicMessage"},"type":"array","title":"Messages"},"system":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"System"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"tool_choice":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice"}},"additionalProperties":true,"type":"object","required":["model","messages"],"title":"AnthropicCountTokensBody","description":"Body for /v1/messages/count_tokens — same fields as messages but max_tokens is optional."},"AnthropicCountTokensResponse":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Number of input tokens the request would consume."}},"type":"object","required":["input_tokens"],"title":"AnthropicCountTokensResponse","description":"Response body for POST /v1/messages/count_tokens."},"AnthropicMessage":{"properties":{"role":{"type":"string","enum":["user","assistant","system"],"title":"Role"},"content":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/AnthropicContentBlock"},"type":"array"}],"title":"Content"},"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}],"description":"Optional prompt-cache marker. When set, this message becomes a cache boundary: prefix content is stored and reused on subsequent requests to reduce latency and cost. Silently ignored by providers that don't support prompt caching."}},"additionalProperties":true,"type":"object","required":["role","content"],"title":"AnthropicMessage"},"AnthropicMessagesBody":{"properties":{"routing":{"anyOf":[{"$ref":"#/components/schemas/ProviderRoutingPreferences"},{"type":"null"}],"description":"How to pick between the providers that serve the requested model. Applies when `model` is a model name with no provider prefix (e.g. 'gpt-5.5'); ignored for a concrete 'provider/model' id, which already names its provider. With model='@edenai' the platform chooses the model too: `quality_cost` steers that choice, and the provider fields apply whenever the chosen model is a provider-less name."},"fallbacks":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":3},{"type":"null"}],"title":"Fallbacks","description":"List of fallback model IDs to try if the primary model fails. Models are tried in order. Example: ['anthropic/claude-3-opus', 'openai/gpt-4o']"},"session_id":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Session Id","description":"Identifies a conversation, so its requests keep reaching the provider that holds its prompt cache. Any stable string you choose — a thread id, a ticket number, an agent run. Also accepted as the `x-session-id` header, for clients that cannot add body fields; the body field wins if both are sent. Without one, a conversation is recognised from its opening messages instead."},"router_candidates":{"anyOf":[{"items":{"type":"string","maxLength":128},"type":"array","maxItems":64},{"type":"null"}],"title":"Router Candidates","description":"Models the '@edenai' router may choose BETWEEN — it picks the model, whereas `routing` picks the provider for a model you already named. Used only when model='@edenai'. Each entry is a bare model name (e.g. 'gpt-5.5' — the winner's provider is then picked like any provider-less request) or a 'provider/model' id (e.g. 'openai/gpt-5-nano' — the winner is served by that exact provider). Entries the router cannot rank are skipped and listed under `edenai_metadata.routing.auto.dropped`; entries naming a model already in the list collapse into its earliest spelling, which decides how the winner is returned. The request fails only when no entry is left. If not provided, the router chooses from a default pool of eligible catalog models. At most 64 entries of up to 128 characters each."},"model":{"type":"string","title":"Model"},"messages":{"items":{"$ref":"#/components/schemas/AnthropicMessage"},"type":"array","title":"Messages"},"max_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Tokens","default":1024},"system":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"System"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature"},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top P"},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","default":false},"stop_sequences":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop Sequences"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"tool_choice":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"thinking":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Thinking"},"extra_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Extra Headers"}},"additionalProperties":true,"type":"object","required":["model","messages"],"title":"AnthropicMessagesBody"},"AnthropicMessagesResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the message."},"type":{"type":"string","const":"message","title":"Type","description":"Object type. Always 'message' for this endpoint.","default":"message"},"role":{"type":"string","const":"assistant","title":"Role","description":"Conversational role of the response.","default":"assistant"},"model":{"type":"string","title":"Model","description":"Model that generated the message."},"content":{"items":{"$ref":"#/components/schemas/AnthropicContentBlock"},"type":"array","title":"Content","description":"Ordered list of content blocks produced by the model."},"stop_reason":{"anyOf":[{"type":"string","enum":["end_turn","max_tokens","stop_sequence","tool_use"]},{"type":"null"}],"title":"Stop Reason","description":"Reason generation stopped, if known."},"stop_sequence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Sequence","description":"Custom stop sequence that triggered the stop, if any."},"usage":{"$ref":"#/components/schemas/AnthropicUsage","description":"Token usage for the request."}},"additionalProperties":true,"type":"object","required":["id","model","content","usage"],"title":"AnthropicMessagesResponse","description":"Response body for POST /v1/messages (non-streaming)."},"AnthropicUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens","description":"Number of input tokens consumed."},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Number of output tokens generated."},"cache_creation_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Creation Input Tokens","description":"Tokens written to the prompt cache (when prompt caching is used)."},"cache_read_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Read Input Tokens","description":"Tokens read from the prompt cache (when prompt caching is used)."}},"additionalProperties":true,"type":"object","required":["input_tokens","output_tokens"],"title":"AnthropicUsage","description":"Token usage block returned by the Anthropic Messages API."},"Body_upload_file_v3_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"File to upload"},"expires_in_days":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Expires In Days","description":"Expiration in days (1-30)","default":30},"purpose":{"type":"string","maxLength":50,"minLength":1,"title":"Purpose","description":"Purpose of the file","default":"general"}},"type":"object","required":["file"],"title":"Body_upload_file_v3_upload_post"},"CacheControl":{"properties":{"type":{"type":"string","const":"ephemeral","title":"Type","description":"Cache type. Currently only 'ephemeral' is supported."},"ttl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ttl","description":"Optional cache time-to-live, e.g. '3600s'. Provider-dependent."}},"type":"object","required":["type"],"title":"CacheControl","description":"Prompt-cache marker.\n\nMarks a message (or content part) as a cache boundary so that the prefix\nup to that point is stored and reused on subsequent requests, reducing\nlatency and cost. Only a single contiguous cache-marked block is stored\nper request, and providers enforce a minimum token count below which\ncaching is silently skipped. Silently ignored by providers that don't\nsupport prompt caching."},"Capabilities":{"properties":{"input_modalities":{"items":{"type":"string"},"type":"array","title":"Input Modalities"},"output_modalities":{"items":{"type":"string"},"type":"array","title":"Output Modalities"},"supports_reasoning":{"type":"boolean","title":"Supports Reasoning","default":false},"supports_web_search":{"type":"boolean","title":"Supports Web Search","default":false},"supports_tool_choice":{"type":"boolean","title":"Supports Tool Choice","default":false},"supports_computer_use":{"type":"boolean","title":"Supports Computer Use","default":false},"supports_prompt_caching":{"type":"boolean","title":"Supports Prompt Caching","default":false},"supports_response_schema":{"type":"boolean","title":"Supports Response Schema","default":false},"supports_system_messages":{"type":"boolean","title":"Supports System Messages","default":false},"supports_function_calling":{"type":"boolean","title":"Supports Function Calling","default":false},"supports_native_streaming":{"type":"boolean","title":"Supports Native Streaming","default":false},"supports_assistant_prefill":{"type":"boolean","title":"Supports Assistant Prefill","default":false},"supports_embedding_image_input":{"type":"boolean","title":"Supports Embedding Image Input","default":false},"supports_parallel_function_calling":{"type":"boolean","title":"Supports Parallel Function Calling","default":false}},"additionalProperties":true,"type":"object","title":"Capabilities","description":"Model capability flags. Unknown flags are preserved so consumers keep working when\nnew capabilities are introduced without a coordinated release."},"ChatCompletionChoice":{"properties":{"index":{"type":"integer","title":"Index","description":"Position of the choice in the list."},"message":{"$ref":"#/components/schemas/ChatCompletionMessage","description":"Message produced by the model for this choice."},"finish_reason":{"anyOf":[{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"]},{"type":"null"}],"title":"Finish Reason","description":"Reason the model stopped generating tokens."},"logprobs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Logprobs","description":"Log probability information for the choice, if requested."}},"additionalProperties":true,"type":"object","required":["index","message"],"title":"ChatCompletionChoice","description":"A single choice in a chat completion response."},"ChatCompletionMessage":{"properties":{"role":{"type":"string","const":"assistant","title":"Role","description":"Role of the message author.","default":"assistant"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content","description":"Content of the message."},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"Tool calls produced by the model, if any."},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal","description":"Refusal message from the model, if any."},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content","description":"Reasoning trace from the model, when supported by the provider."}},"additionalProperties":true,"type":"object","title":"ChatCompletionMessage","description":"Message returned in a chat completion choice."},"ChatCompletionResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the chat completion."},"object":{"type":"string","const":"chat.completion","title":"Object","description":"Object type. Always 'chat.completion' for this endpoint.","default":"chat.completion"},"created":{"type":"integer","title":"Created","description":"Unix timestamp (seconds) when the completion was created."},"model":{"type":"string","title":"Model","description":"Model that produced the completion."},"choices":{"items":{"$ref":"#/components/schemas/ChatCompletionChoice"},"type":"array","title":"Choices","description":"List of completion choices generated for the request."},"usage":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionUsage"},{"type":"null"}],"description":"Token usage statistics for the request."},"system_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Fingerprint","description":"Backend configuration fingerprint that produced the response."},"service_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Tier","description":"Service tier that processed the request."}},"additionalProperties":true,"type":"object","required":["id","created","model","choices"],"title":"ChatCompletionResponse","description":"Response body for POST /chat/completions (non-streaming)."},"ChatCompletionUsage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","description":"Tokens in the prompt."},"completion_tokens":{"type":"integer","title":"Completion Tokens","description":"Tokens in the generated completion."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Total tokens consumed by the request."},"prompt_tokens_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Prompt Tokens Details","description":"Breakdown of prompt tokens (e.g. cached_tokens, audio_tokens)."},"completion_tokens_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Completion Tokens Details","description":"Breakdown of completion tokens (e.g. reasoning_tokens)."}},"additionalProperties":true,"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"title":"ChatCompletionUsage","description":"Token usage block returned by the OpenAI-compatible chat completion API."},"CollectionResponse":{"properties":{"collection_id":{"type":"string","format":"uuid","title":"Collection Id","description":"Client-facing collection id; use it in item operations and in /v3/universal-ai calls that take a collection_id input."},"model":{"type":"string","title":"Model","description":"'feature/subfeature/provider' string the collection is bound to."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Collection name, if any."}},"type":"object","required":["collection_id","model"],"title":"CollectionResponse","description":"A collection owned by the authenticated user."},"CreateCollectionRequest":{"properties":{"model":{"type":"string","minLength":1,"title":"Model","description":"Model string the collection binds to, as 'feature/subfeature/provider' (e.g. 'image/face_recognition/amazon'). Fixed at creation: item operations and /v3/universal-ai calls against this collection all run on that provider."},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name","description":"Optional human-readable name for the collection."}},"type":"object","required":["model"],"title":"CreateCollectionRequest","description":"Body for creating a collection."},"DeleteCollectionResponse":{"properties":{"collection_id":{"type":"string","format":"uuid","title":"Collection Id"},"deleted":{"type":"boolean","title":"Deleted"}},"type":"object","required":["collection_id","deleted"],"title":"DeleteCollectionResponse","description":"Result of deleting a collection."},"DeleteFilesRequest":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"File Ids","description":"List of file IDs to delete (1-100)"}},"type":"object","required":["file_ids"],"title":"DeleteFilesRequest","description":"Request body for deleting multiple files.","example":{"file_ids":["550e8400-e29b-41d4-a716-446655440000","550e8400-e29b-41d4-a716-446655440001"]}},"DeleteFilesResponse":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count","description":"Number of files deleted"}},"type":"object","required":["deleted_count"],"title":"DeleteFilesResponse","description":"Response for file deletion.","example":{"deleted_count":5}},"DeleteItemResponse":{"properties":{"collection_id":{"type":"string","format":"uuid","title":"Collection Id"},"item_id":{"type":"string","title":"Item Id"},"deleted":{"type":"boolean","title":"Deleted"}},"type":"object","required":["collection_id","item_id","deleted"],"title":"DeleteItemResponse","description":"Result of deleting an item from a collection."},"DeleteResponseObject":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"response.deleted","title":"Object","default":"response.deleted"},"deleted":{"type":"boolean","title":"Deleted"}},"type":"object","required":["id","deleted"],"title":"DeleteResponseObject"},"EasyInputMessage":{"properties":{"role":{"type":"string","enum":["user","assistant","system","developer"],"title":"Role"},"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/ResponseInputText"},{"$ref":"#/components/schemas/ResponseInputImage"},{"$ref":"#/components/schemas/ResponseInputFile"},{"additionalProperties":true,"type":"object"}]},"type":"array"}],"title":"Content"},"type":{"type":"string","const":"message","title":"Type","default":"message"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}],"description":"Optional prompt-cache marker. When set, this message becomes a cache boundary: prefix content is stored and reused on subsequent requests to reduce latency and cost. Silently ignored by providers that don't support prompt caching."}},"additionalProperties":true,"type":"object","required":["role","content"],"title":"EasyInputMessage"},"EmbeddingItem":{"properties":{"embedding":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"string"}],"title":"Embedding"},"index":{"type":"integer","title":"Index"},"object":{"type":"string","const":"embedding","title":"Object"}},"additionalProperties":true,"type":"object","required":["embedding","index","object"],"title":"EmbeddingItem","description":"OpenAI embedding item with the wire-format quirk made explicit.\n\nThe OpenAI SDK types ``embedding`` as ``list[float]`` only because the SDK\ntransparently decodes base64 before populating the model. The actual API\n*wire* response returns a base64 string when ``encoding_format='base64'``.\nEden is a passthrough for OpenAI-compatible callers who explicitly want the\nsmaller base64 payload, so we must allow both shapes."},"EmbeddingsBody":{"properties":{"input":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"integer"},"type":"array"},{"items":{"items":{"type":"integer"},"type":"array"},"type":"array"}],"title":"Input","description":"Input to embed: string, list of strings, pre-tokenized list of ints, or pre-tokenized batch (list of int lists). Max 2048 items for OpenAI."},"model":{"type":"string","title":"Model","description":"Model identifier in 'provider/model' format, e.g. 'openai/text-embedding-3-small'."},"encoding_format":{"anyOf":[{"type":"string","enum":["float","base64"]},{"type":"null"}],"title":"Encoding Format","description":"Output encoding: 'float' (default) or 'base64'.","default":"float"},"dimensions":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Dimensions","description":"Reduce output vector size. 3-series models only."},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"End-user identifier for abuse tracking."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Arbitrary metadata attached to the request."},"extra_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Extra Headers","description":"Additional HTTP headers forwarded to the provider API."}},"additionalProperties":true,"type":"object","required":["input","model"],"title":"EmbeddingsBody","description":"OpenAI-compatible `POST /v1/embeddings` request body, plus minimal Eden extensions.\n\nUnknown top-level fields are forwarded to the underlying provider\n(``extra=\"allow\"`` via the base mixin, which also rejects connection keys)."},"EmbeddingsResponse":{"properties":{"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"data":{"items":{"$ref":"#/components/schemas/EmbeddingItem"},"type":"array","title":"Data"},"model":{"type":"string","title":"Model"},"object":{"type":"string","const":"list","title":"Object"},"usage":{"$ref":"#/components/schemas/Usage"}},"additionalProperties":true,"type":"object","required":["data","model","object","usage"],"title":"EmbeddingsResponse","description":"OpenAI-compatible embeddings response + Eden `cost` and `provider` fields.\n\n`EmbeddingsDataClass` (from edenai-apis) already widens\n``data[].embedding`` to ``list[float] | str`` so the base64 wire format\nvalidates here too."},"FeatureInfo":{"properties":{"name":{"type":"string","title":"Name"},"fullname":{"type":"string","title":"Fullname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"subfeatures":{"items":{"$ref":"#/components/schemas/SubfeatureInfo"},"type":"array","title":"Subfeatures"}},"type":"object","required":["name","fullname","subfeatures"],"title":"FeatureInfo","description":"Info about a feature and its subfeatures."},"FeaturesListResponse":{"properties":{"features":{"items":{"$ref":"#/components/schemas/FeatureInfo"},"type":"array","title":"Features"}},"type":"object","required":["features"],"title":"FeaturesListResponse","description":"Response for listing all features."},"FileResponse":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id","description":"Unique file identifier for use in API calls"},"file_name":{"type":"string","title":"File Name","description":"Original filename"},"file_size":{"type":"integer","title":"File Size","description":"File size in bytes"},"file_mimetype":{"type":"string","title":"File Mimetype","description":"Detected MIME type"},"purpose":{"type":"string","title":"Purpose","description":"Purpose of the file (e.g., 'general', 'assistants')"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"File metadata (e.g., page_count for PDFs/documents)"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Upload timestamp"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Expiration timestamp"}},"type":"object","required":["file_id","file_name","file_size","file_mimetype","purpose","created_at"],"title":"FileResponse","description":"Response for a file."},"GeminiImageConfig":{"properties":{"aspect_ratio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspect Ratio","description":"Output aspect ratio. Examples: '1:1', '16:9', '9:16', '4:3', '3:4', '21:9'. Allowed set varies by model; see Gemini docs."},"image_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Size","description":"Output resolution. Examples: '1K', '2K', '4K'. '512' is valid on Gemini 3.1 Flash Image only."}},"additionalProperties":false,"type":"object","title":"GeminiImageConfig","description":"Image generation config for Gemini image models (google/gemini-2.5-flash-image).\n\nValues are passed through to Gemini's generationConfig.imageConfig. Allowed\nvalues may vary by model — see\nhttps://ai.google.dev/gemini-api/docs/image-generation."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageDataItem":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"b64_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B64 Json"},"revised_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revised Prompt"}},"additionalProperties":true,"type":"object","title":"ImageDataItem","description":"Single image entry inside the OpenAI-shaped ``data: [...]`` array.\n\nProviders return either ``url`` (most non-OpenAI providers) or\n``b64_json`` (gpt-image-*); ``revised_prompt`` is OpenAI-specific."},"ImageGenerationBody":{"properties":{"routing":{"anyOf":[{"$ref":"#/components/schemas/ProviderRoutingPreferences"},{"type":"null"}],"description":"How to pick between the providers that serve the requested model. Applies when `model` is a model name with no provider prefix (e.g. 'gpt-5.5'); ignored for a concrete 'provider/model' id, which already names its provider. With model='@edenai' the platform chooses the model too: `quality_cost` steers that choice, and the provider fields apply whenever the chosen model is a provider-less name."},"model":{"type":"string","title":"Model","description":"provider/model, e.g. 'openai/gpt-image-2'"},"prompt":{"type":"string","maxLength":32000,"minLength":1,"title":"Prompt"},"n":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"N"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size","description":"Provider-specific size string. OpenAI accepts '1024x1024', '1536x1024', '1024x1536', 'auto'. Vertex Imagen accepts square or aspect-ratio strings. Validation is delegated to the provider."},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"End-user identifier for abuse tracking."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Arbitrary metadata attached to the request."},"extra_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Extra Headers","description":"Additional HTTP headers forwarded to the provider API. Credential headers (Authorization, x-api-key, ...) are rejected."},"quality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality","description":"Provider-specific quality string (e.g. 'low', 'medium', 'high', 'standard', 'hd', 'auto'). Accepted values depend on the model."},"response_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Format","description":"Legacy DALL-E parameter. Ignored by gpt-image-* and forwarded to the provider for any model that still honors it."}},"additionalProperties":true,"type":"object","required":["model","prompt"],"title":"ImageGenerationBody","description":"OpenAI-compatible ``POST /v1/images/generations`` request body."},"ImageResponse":{"properties":{"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created"},"data":{"items":{"$ref":"#/components/schemas/ImageDataItem"},"type":"array","title":"Data"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage"}},"additionalProperties":true,"type":"object","title":"ImageResponse","description":"OpenAI-compatible image response + Eden ``cost`` / ``provider`` fields.\n\nShared by ``POST /v3/images/generations`` and ``POST /v3/images/edits`` —\nthe wire shape is identical."},"ItemsResponse":{"properties":{"collection_id":{"type":"string","format":"uuid","title":"Collection Id"},"item_ids":{"items":{"type":"string"},"type":"array","title":"Item Ids","description":"Provider-side item ids (face ids for image/face_recognition)."}},"type":"object","required":["collection_id","item_ids"],"title":"ItemsResponse","description":"Item ids stored in a collection (provider-side ids, passed through)."},"LLMResponseObject":{"properties":{"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"response","title":"Object","default":"response"},"created_at":{"type":"integer","title":"Created At"},"model":{"type":"string","title":"Model"},"status":{"type":"string","title":"Status"},"output":{"items":{"anyOf":[{"$ref":"#/components/schemas/ResponseOutputMessage"},{"additionalProperties":true,"type":"object"}]},"type":"array","title":"Output"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"previous_response_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Response Id"},"usage":{"anyOf":[{"$ref":"#/components/schemas/ResponseUsage"},{"type":"null"}]},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","created_at","model","status","output"],"title":"LLMResponseObject"},"ListCollectionsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CollectionResponse"},"type":"array","title":"Items","description":"List of items"},"total":{"type":"integer","title":"Total","description":"Total number of items"},"page":{"type":"integer","title":"Page","description":"Current page number"},"limit":{"type":"integer","title":"Limit","description":"Items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","limit","total_pages"],"title":"ListCollectionsResponse","description":"Paginated list of the user's collections."},"ListFilesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FileResponse"},"type":"array","title":"Items","description":"List of items"},"total":{"type":"integer","title":"Total","description":"Total number of items"},"page":{"type":"integer","title":"Page","description":"Current page number"},"limit":{"type":"integer","title":"Limit","description":"Items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","limit","total_pages"],"title":"ListFilesResponse","description":"Response for listing files with pagination.","example":{"items":[{"created_at":"2025-12-08T10:30:00Z","expires_at":"2026-01-07T10:30:00Z","file_id":"550e8400-e29b-41d4-a716-446655440000","file_mimetype":"application/pdf","file_name":"invoice.pdf","file_size":1048576,"metadata":{"page_count":5},"purpose":"general"}],"limit":100,"page":1,"total":25,"total_pages":1}},"ListModelsResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Object type","default":"list"},"data":{"items":{"$ref":"#/components/schemas/ModelObject"},"type":"array","title":"Data","description":"List of models"}},"type":"object","required":["data"],"title":"ListModelsResponse","description":"List models response."},"ListModelsWithEndpointsResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Object type","default":"list"},"data":{"items":{"$ref":"#/components/schemas/ModelWithEndpoints"},"type":"array","title":"Data","description":"List of routable models"}},"type":"object","required":["data"],"title":"ListModelsWithEndpointsResponse","description":"`?view=models` response: routable names, each with its provider endpoints.\n\nNamed for the public vocabulary rather than the internal one: Pydantic class names become\nOpenAPI schema titles and generated SDK classes, and a caller never needs the word\n\"canonical\" -- to them these are simply models, and the rows behind them endpoints."},"LlmCompletionBody":{"properties":{"routing":{"anyOf":[{"$ref":"#/components/schemas/ProviderRoutingPreferences"},{"type":"null"}],"description":"How to pick between the providers that serve the requested model. Applies when `model` is a model name with no provider prefix (e.g. 'gpt-5.5'); ignored for a concrete 'provider/model' id, which already names its provider. With model='@edenai' the platform chooses the model too: `quality_cost` steers that choice, and the provider fields apply whenever the chosen model is a provider-less name."},"fallbacks":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":3},{"type":"null"}],"title":"Fallbacks","description":"List of fallback model IDs to try if the primary model fails. Models are tried in order. Example: ['anthropic/claude-3-opus', 'openai/gpt-4o']"},"session_id":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Session Id","description":"Identifies a conversation, so its requests keep reaching the provider that holds its prompt cache. Any stable string you choose — a thread id, a ticket number, an agent run. Also accepted as the `x-session-id` header, for clients that cannot add body fields; the body field wins if both are sent. Without one, a conversation is recognised from its opening messages instead."},"router_candidates":{"anyOf":[{"items":{"type":"string","maxLength":128},"type":"array","maxItems":64},{"type":"null"}],"title":"Router Candidates","description":"Models the '@edenai' router may choose BETWEEN — it picks the model, whereas `routing` picks the provider for a model you already named. Used only when model='@edenai'. Each entry is a bare model name (e.g. 'gpt-5.5' — the winner's provider is then picked like any provider-less request) or a 'provider/model' id (e.g. 'openai/gpt-5-nano' — the winner is served by that exact provider). Entries the router cannot rank are skipped and listed under `edenai_metadata.routing.auto.dropped`; entries naming a model already in the list collapse into its earliest spelling, which decides how the winner is returned. The request fails only when no entry is left. If not provided, the router chooses from a default pool of eligible catalog models. At most 64 entries of up to 128 characters each."},"pre_hooks":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Pre Hooks","description":"List of hooks to run before the LLM provider call. Each entry must have an 'action' key and optional 'params'. Example: [{'action': 'pdf_text_extract', 'params': {'method': 'default'}}]"},"post_hooks":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Post Hooks","description":"List of hooks to run after the LLM provider call. Each entry must have an 'action' key and optional 'params'. Example: [{'action': 'json_heal', 'params': {'json_schema': {...}}}]"},"model":{"type":"string","title":"Model","description":"The name of the LLM model to use."},"messages":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Messages","description":"The messages to send to the LLM model."},"n":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"N","description":"The number of completions to generate for each prompt. Defaults to 1.","default":1},"reasoning_effort":{"anyOf":[{"type":"string","enum":["minimal","low","medium","high","max","xhigh","disable","none"]},{"type":"null"}],"title":"Reasoning Effort","description":"The reasoning effort level for the LLM model."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Object of metadata associated with the chat request. Can be used to provide additional context or tracking information."},"frequency_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}],"title":"Frequency Penalty","description":"Penalty for repeated tokens in the output."},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias","description":"Logit bias to influence token generation."},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Logprobs","description":"Whether to include log probabilities of tokens in the output. Defaults to False.","default":false},"top_logprobs":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":0.0},{"type":"null"}],"title":"Top Logprobs","description":"Number of top log probabilities to return with each token. An integer between 0 and 20."},"max_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Tokens","description":"The maximum number of tokens to generate in the chat completion"},"max_completion_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Completion Tokens","description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens."},"modalities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Modalities","description":"List of supported input/output modalities for the chat."},"prediction":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Prediction","description":"field for storing prediction-related information."},"audio":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Audio","description":"dictionary for audio-related parameters or metadata."},"presence_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}],"title":"Presence Penalty","description":"Penalty for new tokens based on their presence in the text so far."},"response_format":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Format","description":"Specify the desired response format for the completion."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Seed for random number generation."},"service_tier":{"anyOf":[{"type":"string","enum":["auto","default","flex","scale","priority"]},{"type":"null"}],"title":"Service Tier","description":"'auto': Automatically select appropriate tier\n'default': Use the default service tier\n'flex': 50% cheaper processing with increased latency (OpenAI o3/o4-mini)\n'scale' / 'priority': OpenAI scale and priority processing tiers"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop","description":"Stop sequence(s) that end generation: a single string or a list of up to 4 strings."},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"Whether to stream the response in real-time. Defaults to False.","default":false},"stream_options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Stream Options","description":"Options for streaming responses, such as chunk size or format."},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"Sampling temperature for controlling randomness in output."},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top P","description":"Nucleus sampling parameter for controlling diversity in output. Defaults to 1.0.","default":1.0},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"List of tools that can be used by the model to assist in generating responses."},"tool_choice":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice","description":"Specify how tools should be used. Can be 'auto', 'required', 'none', or an object to force a specific tool."},"parallel_tool_calls":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Parallel Tool Calls","description":"Whether to allow parallel tool calls in the completion."},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"User identifier for tracking or personalization purposes."},"function_call":{"anyOf":[{"type":"string","enum":["none","auto"]},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Function Call","description":"Controls function calling (legacy). The string 'none' or 'auto', or an object forcing a specific function, e.g. {'name': 'my_function'}."},"functions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Functions","description":"List of functions that can be called by the model to assist in generating responses."},"thinking":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Thinking","description":"Parameters related to the model's reasoning or thinking process."},"web_search_options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Web Search Options","description":"Options for web search integration. Example: json web_search_options={ \"search_context_size\": \"medium\" # Options: \"low\", \"medium\", \"high\" }"},"verbosity":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}],"title":"Verbosity","description":"Hint the model to be more or less expansive in its replies. Values: \"low\", \"medium\", \"high\". low (gpt5 models)"},"prompt_cache_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Cache Key","description":"Prompt-cache routing hint (OpenAI): requests sharing a key and a common prompt prefix are routed to the same cache shard, improving hit rates for high-volume shared prefixes. Forwarded to providers that support it, dropped elsewhere. Also read for provider stickiness when no `session_id` or `x-session-id` is given."},"prompt_cache_retention":{"anyOf":[{"type":"string","enum":["in_memory","24h"]},{"type":"string"},{"type":"null"}],"title":"Prompt Cache Retention","description":"How long the provider retains the prompt cache — OpenAI currently accepts \"in_memory\" (provider default, typically 5-10 minutes) and \"24h\" (extended retention, supported on gpt-5.x and gpt-4.1). The known values are advertised in the schema but not enforced: the value is passed through verbatim for the provider to validate, so new provider values work without an Eden AI release. Dropped for providers that don't support it."},"prompt_cache_options":{"anyOf":[{"$ref":"#/components/schemas/PromptCacheOptions"},{"type":"null"}],"description":"Request-level prompt-cache settings (mode and ttl) for OpenAI GPT-5.6 and newer models. Ignored by models that don't support prompt caching."},"extra_body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Body","description":"Additional parameters to pass in the request body to the provider API."},"image_config":{"anyOf":[{"$ref":"#/components/schemas/GeminiImageConfig"},{"type":"null"}],"description":"Image generation configuration for Google Gemini image models (e.g. google/gemini-2.5-flash-image)."},"extra_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Extra Headers","description":"Additional HTTP headers to pass to the provider API."}},"type":"object","required":["model","messages"],"title":"LlmCompletionBody"},"Message":{"properties":{"role":{"type":"string","enum":["user","assistant","system","tool","developer","function"],"title":"Role","description":"The role of the message sender (e.g., 'user', 'assistant')."},"content":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/MessageTextContent"},{"$ref":"#/components/schemas/MessageImageContent"},{"$ref":"#/components/schemas/MessageAudioContent"},{"$ref":"#/components/schemas/MessageFileContent"},{"$ref":"#/components/schemas/MessageRefusalContent"}]},"type":"array"},{"type":"null"}],"title":"Content","description":"The content of the message: a string, or a list of content parts (text, image_url, input_audio, file, refusal)."},"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}],"description":"Optional prompt-cache marker. When set, this message becomes a cache boundary: prefix content is stored and reused on subsequent requests to reduce latency and cost. Silently ignored by providers that don't support prompt caching."}},"additionalProperties":true,"type":"object","required":["role"],"title":"Message"},"MessageAudioContent":{"properties":{"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"$ref":"#/components/schemas/PromptCacheBreakpoint"},{"type":"null"}]},"type":{"type":"string","const":"input_audio","title":"Type"},"input_audio":{"$ref":"#/components/schemas/MessageAudioInput"}},"type":"object","required":["type","input_audio"],"title":"MessageAudioContent"},"MessageAudioInput":{"properties":{"data":{"type":"string","title":"Data","description":"The audio data in base64 format or Http(s) link."},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"The format of the audio file (e.g., 'mp3', 'wav')."}},"type":"object","required":["data"],"title":"MessageAudioInput"},"MessageFileB64Input":{"properties":{"file_data":{"type":"string","title":"File Data","description":"The file data in base64 format."}},"type":"object","required":["file_data"],"title":"MessageFileB64Input"},"MessageFileContent":{"properties":{"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"$ref":"#/components/schemas/PromptCacheBreakpoint"},{"type":"null"}]},"type":{"type":"string","const":"file","title":"Type"},"file":{"anyOf":[{"$ref":"#/components/schemas/MessageFileUrlInput"},{"$ref":"#/components/schemas/MessageFileB64Input"}],"title":"File"}},"type":"object","required":["type","file"],"title":"MessageFileContent"},"MessageFileUrlInput":{"properties":{"file_id":{"type":"string","title":"File Id","description":"File identifier: either a UUID from /v3/upload endpoint or an HTTP(S) URL."}},"type":"object","required":["file_id"],"title":"MessageFileUrlInput"},"MessageImageContent":{"properties":{"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"$ref":"#/components/schemas/PromptCacheBreakpoint"},{"type":"null"}]},"type":{"type":"string","const":"image_url","title":"Type"},"image_url":{"$ref":"#/components/schemas/MessageImageUrl"}},"type":"object","required":["type","image_url"],"title":"MessageImageContent"},"MessageImageUrl":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"MessageImageUrl"},"MessageRefusalContent":{"properties":{"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"$ref":"#/components/schemas/PromptCacheBreakpoint"},{"type":"null"}]},"type":{"type":"string","const":"refusal","title":"Type"},"refusal":{"type":"string","title":"Refusal","description":"The refusal message generated by the model."}},"type":"object","required":["type","refusal"],"title":"MessageRefusalContent"},"MessageTextContent":{"properties":{"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"$ref":"#/components/schemas/PromptCacheBreakpoint"},{"type":"null"}]},"type":{"type":"string","const":"text","title":"Type"},"text":{"type":"string","title":"Text","description":"The text content of the message."}},"type":"object","required":["type","text"],"title":"MessageTextContent"},"ModelObject":{"properties":{"id":{"type":"string","title":"Id","description":"Model identifier (e.g., 'openai/gpt-4')"},"object":{"type":"string","const":"model","title":"Object","description":"Object type","default":"model"},"created":{"type":"integer","title":"Created","description":"Unix timestamp of model creation/release"},"owned_by":{"type":"string","title":"Owned By","description":"Provider/organization that owns the model"},"model_name":{"type":"string","title":"Model Name","description":"Model name without provider prefix"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length","description":"Maximum context length in tokens"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Model description"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Model source URL"},"capabilities":{"$ref":"#/components/schemas/Capabilities","description":"Model capabilities"},"pricing":{"additionalProperties":true,"type":"object","title":"Pricing","description":"Pricing information after any applicable discounts have been applied"},"list_pricing":{"additionalProperties":true,"type":"object","title":"List Pricing","description":"Provider list pricing, before any discounts are applied"},"discount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount","description":"Discount applied to the model (0-1 range)"},"regions":{"items":{"$ref":"#/components/schemas/RegionObject"},"type":"array","title":"Regions","description":"Regions where this model is available"},"alias_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias Of","description":"Set when this entry is an alias (e.g. 'gemini-pro-latest'): the real model_id it currently resolves to. None for concrete models."}},"type":"object","required":["id","created","owned_by","model_name"],"title":"ModelObject","description":"Extended model object with full metadata."},"ModelWithEndpoints":{"properties":{"id":{"type":"string","title":"Id","description":"The routable model name, with no provider prefix (e.g. 'gpt-oss-120b'). Send this as `model` to let Eden AI choose which provider serves it."},"object":{"type":"string","const":"model","title":"Object","description":"Object type","default":"model"},"created":{"type":"integer","title":"Created","description":"Unix timestamp of the newest endpoint serving this model","default":0},"owned_by":{"type":"string","title":"Owned By","description":"Who authored the model, independent of who sells it","default":""},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"What the model does: 'chat', 'embedding', 'stt', 'tts' or 'image_generation'. Lets a caller tell an LLM from a voice."},"endpoints":{"items":{"$ref":"#/components/schemas/ModelObject"},"type":"array","title":"Endpoints","description":"Every provider endpoint serving this model, each with its own pricing, context length, capabilities and regions."},"endpoint_count":{"type":"integer","title":"Endpoint Count","description":"How many provider endpoints serve this model","readOnly":true}},"type":"object","required":["id","endpoints","endpoint_count"],"title":"ModelWithEndpoints","description":"One routable model name and the provider endpoints behind it.\n\nDeliberately carries NO pricing, context window or capability of its own. Those vary between\nthe sellers of one model — `gpt-oss-120b` spans a 9.5x input-price range, two context lengths\nand six distinct capability sets across ten sellers — so a value here would be wrong for most\nof the group. Each endpoint keeps its own, unchanged.\n\n``endpoints`` entries are the same :class:`ModelObject` the flat listing returns, field for\nfield, which is what makes this view a pure regrouping: a caller reading\n``data[].endpoints[]`` sees exactly what it reads from ``data[]`` today."},"ModerationBody":{"properties":{"input":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"items":{"oneOf":[{"$ref":"#/components/schemas/ModerationTextInput"},{"$ref":"#/components/schemas/ModerationImageInput"}],"discriminator":{"propertyName":"type","mapping":{"image_url":"#/components/schemas/ModerationImageInput","text":"#/components/schemas/ModerationTextInput"}}},"type":"array"}],"title":"Input","description":"Text or multimodal content to classify."},"model":{"type":"string","title":"Model","description":"Model identifier in 'provider/model' format, e.g. 'openai/omni-moderation-latest'.","default":"openai/omni-moderation-latest"}},"type":"object","required":["input"],"title":"ModerationBody"},"ModerationImageInput":{"properties":{"type":{"type":"string","const":"image_url","title":"Type"},"image_url":{"$ref":"#/components/schemas/ModerationImageUrl"}},"type":"object","required":["type","image_url"],"title":"ModerationImageInput"},"ModerationImageUrl":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"ModerationImageUrl"},"ModerationResponse":{"properties":{"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"id":{"type":"string","title":"Id"},"model":{"type":"string","title":"Model"},"results":{"items":{"$ref":"#/components/schemas/OpenAIModerationResult"},"type":"array","title":"Results"}},"additionalProperties":true,"type":"object","required":["id","model","results"],"title":"ModerationResponse"},"ModerationTextInput":{"properties":{"type":{"type":"string","const":"text","title":"Type"},"text":{"type":"string","title":"Text"}},"type":"object","required":["type","text"],"title":"ModerationTextInput"},"OpenAIModerationResult":{"properties":{"categories":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Categories"},"category_applied_input_types":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Category Applied Input Types"},"category_scores":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Category Scores"},"flagged":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Flagged"}},"additionalProperties":true,"type":"object","required":["categories","category_applied_input_types","category_scores","flagged"],"title":"OpenAIModerationResult"},"PromptCacheBreakpoint":{"properties":{"mode":{"anyOf":[{"type":"string","const":"explicit"},{"type":"string"},{"type":"null"}],"title":"Mode","description":"Breakpoint mode. Currently only \"explicit\" is defined; the known value is advertised in the schema but not enforced, so a new provider value works without an Eden AI release. Leave unset for the provider default."}},"additionalProperties":true,"type":"object","title":"PromptCacheBreakpoint","description":"Marks the end of a reusable prompt prefix (OpenAI GPT-5.6 and newer).\n\nSet it on the last content part of the stable prefix you want cached: the prompt\nup to and including that part is stored and reused on later requests that share it,\nreducing latency and cost. Providers enforce a minimum token count below which\ncaching is skipped. Ignored by models that don't support explicit cache breakpoints."},"PromptCacheOptions":{"properties":{"mode":{"anyOf":[{"type":"string","enum":["implicit","explicit"]},{"type":"string"},{"type":"null"}],"title":"Mode","description":"\"implicit\" (default) caches automatically and also honors any prompt_cache_breakpoint you set; \"explicit\" caches only the blocks you mark with prompt_cache_breakpoint. Known values are advertised in the schema but not enforced."},"ttl":{"anyOf":[{"type":"string","const":"30m"},{"type":"string"},{"type":"null"}],"title":"Ttl","description":"How long to keep the prompt cache, e.g. \"30m\". Leave unset for the provider default. Known values are advertised in the schema but not enforced."}},"additionalProperties":true,"type":"object","title":"PromptCacheOptions","description":"Request-level prompt-cache settings (OpenAI GPT-5.6 and newer).\n\nControls how this request's prompt cache behaves — whether caching happens\nautomatically or only on the blocks you mark with ``prompt_cache_breakpoint``, and\nhow long the cache is kept. Ignored by models that don't support prompt caching."},"ProviderRoutingPreferences":{"properties":{"sort":{"anyOf":[{"type":"string","enum":["cost","speed","latency","exact"]},{"type":"null"}],"title":"Sort","description":"What to optimise for when several providers serve the requested model. 'cost' (default) picks the cheapest for this request's shape; 'speed' the highest tokens/second; 'latency' the fastest to first token; 'exact' the most reliable at producing well-formed tool calls / structured output. Health is always a filter first — no mode will route you to a failing provider. Can also be written as a model suffix, e.g. 'gpt-5.5:speed'."},"sticky":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sticky","description":"Keep a conversation on the provider holding its prompt cache. On by default, and only ever active for models whose providers discount cache reads. Set false to route every request independently on price instead. Naming an explicit `sort` also takes priority over cache affinity."},"allow_fallbacks":{"type":"boolean","title":"Allow Fallbacks","description":"Whether other providers of the same model may be tried when the chosen one fails. Set false to pin the request to the single best provider: it then fails rather than silently moving to another seller. useful when a cache-warm prompt would cold-miss elsewhere. This governs PROVIDERS of the requested model only; models you list in `fallbacks` are your own choice and are always kept.","default":true},"quality_cost":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":0.0},{"type":"null"}],"title":"Quality Cost","description":"Only with model='@edenai': how far to trade answer quality for cost when the platform chooses the MODEL. 0 asks for the best model for the request, 10 for the cheapest model that can still handle it, values in between blend the two; omit it to leave the choice to the platform (quality first). This is the one `routing` field that steers the model rather than the provider — `sort` never changes which model is chosen."},"allowed_providers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Providers","description":"Restrict routing to these providers, e.g. ['openai', 'anthropic']. Only providers that serve the requested model are considered, so an entry that does not sell it is simply inert. If none of them do, the request fails rather than falling back to a provider you excluded. Case-insensitive. Applies to routed providers only. a concrete 'provider/model' you named in `fallbacks` is your own choice and is kept."}},"type":"object","title":"ProviderRoutingPreferences","description":"How to choose between SELLERS of one model — and, with ``@edenai``, how far to trade\nquality for cost when the platform chooses the model.\n\nThe seller fields are only meaningful when `model` is a canonical name (`gpt-5.5`) rather than a concrete\n`provider/model` — with a concrete id there is nothing to choose between. For choosing the\nMODEL itself see ``router_candidates`` and ``model=\"@edenai\"``, which is a different router;\n``quality_cost`` below is the one field here that speaks to it."},"RegionObject":{"properties":{"code":{"type":"string","title":"Code","description":"Region code (e.g., 'us-east-1')"},"name":{"type":"string","title":"Name","description":"Region display name"}},"type":"object","required":["code","name"],"title":"RegionObject","description":"Region where a model is available."},"ResponseInputFile":{"properties":{"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"$ref":"#/components/schemas/PromptCacheBreakpoint"},{"type":"null"}]},"type":{"type":"string","const":"input_file","title":"Type"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Url"},"file_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Data"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},"type":"object","required":["type"],"title":"ResponseInputFile"},"ResponseInputImage":{"properties":{"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"$ref":"#/components/schemas/PromptCacheBreakpoint"},{"type":"null"}]},"type":{"type":"string","const":"input_image","title":"Type"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"detail":{"type":"string","enum":["low","high","auto"],"title":"Detail","default":"auto"}},"type":"object","required":["type"],"title":"ResponseInputImage"},"ResponseInputItem":{"properties":{"type":{"type":"string","title":"Type"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"additionalProperties":true,"type":"object","required":["type"],"title":"ResponseInputItem","description":"Non-message input item forwarded to the provider as-is (reasoning, function_call, etc.)."},"ResponseInputText":{"properties":{"cache_control":{"anyOf":[{"$ref":"#/components/schemas/CacheControl"},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"$ref":"#/components/schemas/PromptCacheBreakpoint"},{"type":"null"}]},"type":{"type":"string","const":"input_text","title":"Type"},"text":{"type":"string","title":"Text"}},"type":"object","required":["type","text"],"title":"ResponseInputText"},"ResponseOutputMessage":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"message","title":"Type"},"role":{"type":"string","const":"assistant","title":"Role"},"status":{"type":"string","title":"Status"},"content":{"items":{"anyOf":[{"$ref":"#/components/schemas/ResponseOutputText"},{"$ref":"#/components/schemas/ResponseOutputRefusal"},{"additionalProperties":true,"type":"object"}]},"type":"array","title":"Content"}},"type":"object","required":["id","type","role","status","content"],"title":"ResponseOutputMessage"},"ResponseOutputRefusal":{"properties":{"type":{"type":"string","const":"refusal","title":"Type"},"refusal":{"type":"string","title":"Refusal"}},"type":"object","required":["type","refusal"],"title":"ResponseOutputRefusal"},"ResponseOutputText":{"properties":{"type":{"type":"string","const":"output_text","title":"Type"},"text":{"type":"string","title":"Text"},"annotations":{"items":{},"type":"array","title":"Annotations","default":[]}},"type":"object","required":["type","text"],"title":"ResponseOutputText"},"ResponseUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"},"input_tokens_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Tokens Details"},"output_tokens_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Tokens Details"}},"type":"object","required":["input_tokens","output_tokens","total_tokens"],"title":"ResponseUsage"},"ResponsesBody":{"properties":{"routing":{"anyOf":[{"$ref":"#/components/schemas/ProviderRoutingPreferences"},{"type":"null"}],"description":"How to pick between the providers that serve the requested model. Applies when `model` is a model name with no provider prefix (e.g. 'gpt-5.5'); ignored for a concrete 'provider/model' id, which already names its provider. With model='@edenai' the platform chooses the model too: `quality_cost` steers that choice, and the provider fields apply whenever the chosen model is a provider-less name."},"fallbacks":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":3},{"type":"null"}],"title":"Fallbacks","description":"List of fallback model IDs to try if the primary model fails. Models are tried in order. Example: ['anthropic/claude-3-opus', 'openai/gpt-4o']"},"session_id":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Session Id","description":"Identifies a conversation, so its requests keep reaching the provider that holds its prompt cache. Any stable string you choose — a thread id, a ticket number, an agent run. Also accepted as the `x-session-id` header, for clients that cannot add body fields; the body field wins if both are sent. Without one, a conversation is recognised from its opening messages instead."},"router_candidates":{"anyOf":[{"items":{"type":"string","maxLength":128},"type":"array","maxItems":64},{"type":"null"}],"title":"Router Candidates","description":"Models the '@edenai' router may choose BETWEEN — it picks the model, whereas `routing` picks the provider for a model you already named. Used only when model='@edenai'. Each entry is a bare model name (e.g. 'gpt-5.5' — the winner's provider is then picked like any provider-less request) or a 'provider/model' id (e.g. 'openai/gpt-5-nano' — the winner is served by that exact provider). Entries the router cannot rank are skipped and listed under `edenai_metadata.routing.auto.dropped`; entries naming a model already in the list collapse into its earliest spelling, which decides how the winner is returned. The request fails only when no entry is left. If not provided, the router chooses from a default pool of eligible catalog models. At most 64 entries of up to 128 characters each."},"model":{"type":"string","title":"Model","description":"Model identifier, e.g. 'openai/gpt-4o'"},"input":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/ResponseInputItem"}]},"type":"array"},{"type":"null"}],"title":"Input","description":"Text, image, or file inputs to the model. Optional when continuing a conversation via previous_response_id."},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"System/developer instructions prepended to input. Not carried over when using previous_response_id."},"previous_response_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Response Id","description":"ID of a prior response to continue a multi-turn conversation. The provider manages conversation state server-side."},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"Whether to stream the response via server-sent events.","default":false},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"List of tools the model may call (function, web_search, file_search, etc.)."},"tool_choice":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice","description":"Controls which tool is called. 'auto', 'required', 'none', or a specific tool object."},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature"},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top P"},"max_output_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Output Tokens"},"reasoning":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reasoning","description":"Reasoning configuration, e.g. {'effort': 'low'|'medium'|'high'}."},"truncation":{"anyOf":[{"type":"string","enum":["auto","disabled"]},{"type":"null"}],"title":"Truncation","description":"How to handle context that exceeds the model's context window."},"store":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Store","description":"Whether the provider should store the response server-side for later retrieval.","default":true},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Up to 16 key-value pairs for tagging."},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"Stable end-user identifier for abuse detection."},"prompt_cache_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Cache Key","description":"Prompt-cache routing hint (OpenAI): requests sharing a key and a common prompt prefix are routed to the same cache shard, improving hit rates for high-volume shared prefixes. Forwarded to providers that support it, dropped elsewhere. Also read for provider stickiness when no `session_id` or `x-session-id` is given."},"prompt_cache_retention":{"anyOf":[{"type":"string","enum":["in_memory","24h"]},{"type":"string"},{"type":"null"}],"title":"Prompt Cache Retention","description":"How long the provider retains the prompt cache — OpenAI currently accepts \"in_memory\" (provider default, typically 5-10 minutes) and \"24h\" (extended retention, supported on gpt-5.x and gpt-4.1). The known values are advertised in the schema but not enforced: the value is passed through verbatim for the provider to validate, so new provider values work without an Eden AI release. Dropped for providers that don't support it."},"prompt_cache_options":{"anyOf":[{"$ref":"#/components/schemas/PromptCacheOptions"},{"type":"null"}],"description":"Request-level prompt-cache settings (mode and ttl) for OpenAI GPT-5.6 and newer models. Ignored by models that don't support prompt caching."},"parallel_tool_calls":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Parallel Tool Calls"},"text":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Text","description":"Text output configuration, e.g. {'format': {'type': 'json_schema', ...}}."},"include":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Include","description":"Additional output data to include, e.g. 'file_search_call.results'."},"background":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Background","description":"Whether to run the model response in the background."}},"type":"object","required":["model"],"title":"ResponsesBody"},"SchemaFormat":{"type":"string","enum":["simplified","json_schema"],"title":"SchemaFormat","description":"Output format for schema information."},"SpeechBody":{"properties":{"routing":{"anyOf":[{"$ref":"#/components/schemas/ProviderRoutingPreferences"},{"type":"null"}],"description":"How to pick between the providers that serve the requested model. Applies when `model` is a model name with no provider prefix (e.g. 'gpt-5.5'); ignored for a concrete 'provider/model' id, which already names its provider. With model='@edenai' the platform chooses the model too: `quality_cost` steers that choice, and the provider fields apply whenever the chosen model is a provider-less name."},"model":{"type":"string","title":"Model","description":"provider/model, e.g. 'openai/tts-1'"},"input":{"type":"string","title":"Input","description":"The text to synthesize into audio."},"voice":{"type":"string","title":"Voice","description":"Voice preset, e.g. 'alloy'."},"response_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Format","description":"Audio format: 'mp3', 'opus', 'aac', 'flac', 'wav', or 'pcm'. Defaults to 'mp3'. Note: Gemini TTS models always return WAV and ignore this field."},"speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Speed","description":"Playback speed. OpenAI/Azure TTS accept 0.25-4.0; other providers may use a different range or ignore it."},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"Optional guidance for voice and delivery style."}},"type":"object","required":["model","input","voice"],"title":"SpeechBody","description":"OpenAI-compatible text-to-speech request.\n\nSynthesizes ``input`` text into audio with the given ``voice``. Unknown\ntop-level fields are dropped."},"SubfeatureDetailResponse":{"properties":{"feature":{"type":"string","title":"Feature"},"feature_fullname":{"type":"string","title":"Feature Fullname"},"subfeature":{"type":"string","title":"Subfeature"},"subfeature_fullname":{"type":"string","title":"Subfeature Fullname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"mode":{"type":"string","enum":["sync","async"],"title":"Mode"},"endpoints":{"additionalProperties":true,"type":"object","title":"Endpoints"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"output_schema":{"additionalProperties":true,"type":"object","title":"Output Schema"},"models":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Models"}},"type":"object","required":["feature","feature_fullname","subfeature","subfeature_fullname","mode","endpoints","input_schema","output_schema","models"],"title":"SubfeatureDetailResponse","description":"Detailed response for a specific subfeature."},"SubfeatureInfo":{"properties":{"name":{"type":"string","title":"Name"},"fullname":{"type":"string","title":"Fullname"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"mode":{"type":"string","enum":["sync","async"],"title":"Mode"},"models":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Models","default":[]}},"type":"object","required":["name","fullname","mode"],"title":"SubfeatureInfo","description":"Info about a subfeature."},"TranscriptionResponse":{"properties":{"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage"}},"additionalProperties":true,"type":"object","title":"TranscriptionResponse","description":"OpenAI-compatible transcription response, plus Eden ``cost`` / ``provider``.\n\nThe provider's full transcript payload passes through — ``text`` plus any\n``language``, ``duration``, ``words``, and ``segments`` the provider returns\n— alongside the Eden-added ``cost`` and ``provider`` fields."},"UniversalAIAsyncBody":{"properties":{"model":{"type":"string","title":"Model","description":"Model in format: feature/subfeature/provider[/model]","examples":["text/ai_detection/openai/gpt-4","ocr/ocr/amazon","image/generation/google/imagen-3"]},"provider_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Params","description":"Provider-specific parameters"},"input":{"additionalProperties":true,"type":"object","title":"Input","description":"Feature-specific input parameters. Required fields depend on the feature/subfeature specified in provider. Examples:\n- text/ai_detection: {'text': 'content to analyze'}\n- text/embeddings: {'texts': ['text1', 'text2']}\n- ocr/ocr: {'file_id': 'abc123', 'language': 'en'}\n- image/generation: {'text': 'prompt', 'resolution': '1024x1024'}\n- translation/document_translation: {'file_id': 'abc123', 'target_language': 'fr'}","examples":[{"text":"Analyze this text for AI detection"},{"dimensions":512,"texts":["text1","text2"]},{"file_id":"abc123","language":"en"}]},"fallbacks":{"items":{"type":"string"},"type":"array","maxItems":3,"title":"Fallbacks","description":"Fallback providers to try if the primary provider fails, in order. Accepted formats:\n - 'provider' or 'provider/model' (e.g. 'amazon', 'openai/gpt-4')\n - full model id (e.g 'text/moderation/google', 'image/generation/minimax/image-01')"},"show_original_response":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Original Response","description":"Include raw provider response in the output","default":false},"webhook_receiver":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Webhook Receiver","description":"Webhook URL to receive job completion notification"},"user_webhook_parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"User Webhook Parameters","description":"Custom parameters to include in webhook payload"}},"type":"object","required":["model","input"],"title":"UniversalAIAsyncBody","description":"Universal AI async request body.\n\nExtends UniversalAIBody with webhook parameters for async notifications."},"UniversalAIAsyncJobListItem":{"properties":{"public_id":{"type":"string","title":"Public Id","description":"Job ID"},"status":{"type":"string","enum":["success","fail","processing"],"title":"Status","description":"Job status"},"feature":{"type":"string","title":"Feature","description":"Feature name"},"subfeature":{"type":"string","title":"Subfeature","description":"Subfeature name"},"provider":{"type":"string","title":"Provider","description":"Provider name"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model name"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Job creation timestamp"}},"type":"object","required":["public_id","status","feature","subfeature","provider","created_at"],"title":"UniversalAIAsyncJobListItem","description":"Summary item for job list."},"UniversalAIAsyncJobListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UniversalAIAsyncJobListItem"},"type":"array","title":"Items","description":"List of items"},"total":{"type":"integer","title":"Total","description":"Total number of items"},"page":{"type":"integer","title":"Page","description":"Current page number"},"limit":{"type":"integer","title":"Limit","description":"Items per page"},"total_pages":{"type":"integer","title":"Total Pages","description":"Total number of pages"}},"type":"object","required":["items","total","page","limit","total_pages"],"title":"UniversalAIAsyncJobListResponse","description":"Response for listing async jobs."},"UniversalAIAsyncResponse":{"properties":{"status":{"type":"string","enum":["success","fail","processing"],"title":"Status","description":"Request status: success, fail, or processing (async only)"},"cost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Cost","description":"Cost in credits for this request"},"provider":{"type":"string","title":"Provider","description":"Provider name that processed the request"},"feature":{"type":"string","title":"Feature","description":"Feature category (e.g., text, ocr, image)"},"subfeature":{"type":"string","title":"Subfeature","description":"Specific subfeature (e.g., ai_detection, sentiment)"},"output":{"anyOf":[{},{"type":"null"}],"title":"Output","description":"Normalized output from the provider"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error","description":"Error details from the provider (only present when status is 'fail')"},"original_response":{"anyOf":[{},{"type":"null"}],"title":"Original Response","description":"Raw response from the provider (if show_original_response=true)"},"public_id":{"type":"string","title":"Public Id","description":"Job ID for polling status"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model name if specified in the request"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Job creation timestamp"}},"type":"object","required":["status","cost","provider","feature","subfeature","public_id","created_at"],"title":"UniversalAIAsyncResponse","description":"Async response from universal-ai/async endpoint.\n\nInherits base fields and adds job-specific fields for tracking async operations.\nUsed for both job creation (202 Accepted) and job detail (GET) responses."},"UniversalAIBody":{"properties":{"model":{"type":"string","title":"Model","description":"Model in format: feature/subfeature/provider[/model]","examples":["text/ai_detection/openai/gpt-4","ocr/ocr/amazon","image/generation/google/imagen-3"]},"provider_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Params","description":"Provider-specific parameters"},"input":{"additionalProperties":true,"type":"object","title":"Input","description":"Feature-specific input parameters. Required fields depend on the feature/subfeature specified in provider. Examples:\n- text/ai_detection: {'text': 'content to analyze'}\n- text/embeddings: {'texts': ['text1', 'text2']}\n- ocr/ocr: {'file_id': 'abc123', 'language': 'en'}\n- image/generation: {'text': 'prompt', 'resolution': '1024x1024'}\n- translation/document_translation: {'file_id': 'abc123', 'target_language': 'fr'}","examples":[{"text":"Analyze this text for AI detection"},{"dimensions":512,"texts":["text1","text2"]},{"file_id":"abc123","language":"en"}]},"fallbacks":{"items":{"type":"string"},"type":"array","maxItems":3,"title":"Fallbacks","description":"Fallback providers to try if the primary provider fails, in order. Accepted formats:\n - 'provider' or 'provider/model' (e.g. 'amazon', 'openai/gpt-4')\n - full model id (e.g 'text/moderation/google', 'image/generation/minimax/image-01')"},"show_original_response":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Original Response","description":"Include raw provider response in the output","default":false}},"type":"object","required":["model","input"],"title":"UniversalAIBody","description":"Universal AI request body.\n\nModel format: feature/subfeature/provider[/model]\n\nExamples:\n - text/ai_detection/openai/gpt-4\n - ocr/ocr/amazon\n - image/generation/google/imagen-3\n\nThe `input` dict contains feature-specific parameters that are\nvalidated at runtime based on the parsed feature/subfeature."},"UniversalAIResponse":{"properties":{"status":{"type":"string","enum":["success","fail"],"title":"Status","description":"Whether the request succeeded or failed"},"cost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Cost","description":"Cost in credits for this request"},"provider":{"type":"string","title":"Provider","description":"Provider name that processed the request"},"feature":{"type":"string","title":"Feature","description":"Feature category (e.g., text, ocr, image)"},"subfeature":{"type":"string","title":"Subfeature","description":"Specific subfeature (e.g., ai_detection, sentiment)"},"output":{"title":"Output","description":"Normalized output from the provider"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error","description":"Error details from the provider (only present when status is 'fail')"},"original_response":{"anyOf":[{},{"type":"null"}],"title":"Original Response","description":"Raw response from the provider (if show_original_response=true)"}},"type":"object","required":["status","cost","provider","feature","subfeature","output"],"title":"UniversalAIResponse","description":"Sync response from universal-ai endpoint.\n\nInherits all fields from base, with status restricted to success/fail."},"UploadResponse":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id","description":"Unique file identifier for use in API calls"},"file_name":{"type":"string","title":"File Name","description":"Original filename"},"file_size":{"type":"integer","title":"File Size","description":"File size in bytes"},"file_mimetype":{"type":"string","title":"File Mimetype","description":"Detected MIME type"},"purpose":{"type":"string","title":"Purpose","description":"Purpose of the file (e.g., 'general', 'assistants')"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"File metadata (e.g., page_count for PDFs/documents)"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Upload timestamp"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Expiration timestamp"}},"type":"object","required":["file_id","file_name","file_size","file_mimetype","purpose","created_at"],"title":"UploadResponse","description":"Response for a successful file upload.","example":{"created_at":"2025-12-08T10:30:00Z","expires_at":"2026-01-07T10:30:00Z","file_id":"550e8400-e29b-41d4-a716-446655440000","file_mimetype":"application/pdf","file_name":"invoice.pdf","file_size":1048576,"metadata":{"page_count":5},"purpose":"general"}},"Usage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"additionalProperties":true,"type":"object","required":["prompt_tokens","total_tokens"],"title":"Usage","description":"The usage information for the request."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ImageRef":{"properties":{"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"}},"additionalProperties":false,"type":"object","title":"ImageRef","description":"One entry in ``images[]`` (or the ``mask`` value).\n\nExactly one of ``file_id`` or ``image_url`` must be set."}},"securitySchemes":{"AuthBearer":{"type":"http","scheme":"bearer"}}},"servers":[{"url":"https://api.edenai.run","description":"Production server"}]}