{
  "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",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListModelsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/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",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListModelsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/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": {
                  "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,
                        "minimum": 1
                      },
                      {
                        "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",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListModelsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v3/models": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "List Models",
        "description": "List available LLM models with extended metadata.",
        "operationId": "list_models_v3_models_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListModelsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v3/router/cache": {
      "delete": {
        "tags": [
          "Models"
        ],
        "summary": "Invalidate Router Cache",
        "description": "Invalidate router default-models cache. Staff only.",
        "operationId": "invalidate_router_cache_v3_router_cache_delete",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Invalidate Router Cache V3 Router Cache Delete"
                }
              }
            }
          }
        },
        "security": [
          {
            "AuthBearer": []
          }
        ]
      }
    },
    "/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.",
        "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/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": {
      "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"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "AnthropicMessage"
      },
      "AnthropicMessagesBody": {
        "properties": {
          "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']"
          },
          "router_candidates": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Router Candidates",
            "description": "List of model candidates for dynamic routing when using model='@edenai'. Each entry should be 'provider/model', e.g. ['openai/gpt-4o', 'anthropic/claude-3-5-sonnet-20241022']. If not provided, defaults to all available models."
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/AnthropicMessage"
            },
            "type": "array",
            "title": "Messages"
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "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,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 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,
            "minimum": 1,
            "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": "Anthropic-style cache marker placed on a message content part.\n\nLiteLLM translates this into native provider context caching (e.g. Gemini\n``cachedContents``, Anthropic prompt caching). Only a single contiguous\nblock of cache-marked content is cached per request, and providers enforce\na minimum token count below which caching is silently skipped."
      },
      "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."
      },
      "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
        }
      },
      "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"
          }
        },
        "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
              },
              {
                "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."
      },
      "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": {
          "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,
                "minimum": 1
              },
              {
                "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."
      },
      "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"
      },
      "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."
      },
      "LlmCompletionBody": {
        "properties": {
          "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']"
          },
          "router_candidates": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Router Candidates",
            "description": "List of model candidates for dynamic routing when using model='@edenai'. Each entry should be 'provider/model', e.g. ['openai/gpt-4o', 'anthropic/claude-3-5-sonnet-20241022']. If not provided, defaults to all available models."
          },
          "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
              },
              {
                "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,
                "minimum": -2
              },
              {
                "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,
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Logprobs",
            "description": "Number of top log probabilities to return with each token."
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "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
              },
              {
                "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,
                "minimum": -2
              },
              {
                "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"
                ]
              },
              {
                "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)"
          },
          "stop": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop",
            "description": "List of stop sequences to end the generation."
          },
          "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,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature",
            "description": "Sampling temperature for controlling randomness in output."
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P",
            "description": "Nucleus sampling parameter for controlling diversity in output. Defaults to 1.0.",
            "default": 1
          },
          "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": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Function Call",
            "description": "Function call parameters for invoking specific functions during the chat."
          },
          "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)"
          },
          "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"
            ],
            "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/MessageFileContent"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content",
            "description": "The content of the message, either text or image."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "role"
        ],
        "title": "Message"
      },
      "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"
              }
            ]
          },
          "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"
              }
            ]
          },
          "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"
      },
      "MessageTextContent": {
        "properties": {
          "cache_control": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CacheControl"
              },
              {
                "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": {
            "additionalProperties": true,
            "type": "object",
            "title": "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"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created",
          "owned_by",
          "model_name"
        ],
        "title": "ModelObject",
        "description": "Extended model object with full metadata."
      },
      "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"
      },
      "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"
              }
            ]
          },
          "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"
              }
            ]
          },
          "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"
              }
            ]
          },
          "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": {
          "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']"
          },
          "router_candidates": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Router Candidates",
            "description": "List of model candidates for dynamic routing when using model='@edenai'. Each entry should be 'provider/model', e.g. ['openai/gpt-4o', 'anthropic/claude-3-5-sonnet-20241022']. If not provided, defaults to all available models."
          },
          "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"
              }
            ],
            "title": "Input",
            "description": "Text, image, or file inputs to the model"
          },
          "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,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "max_output_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "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."
          },
          "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",
          "input"
        ],
        "title": "ResponsesBody"
      },
      "SchemaFormat": {
        "type": "string",
        "enum": [
          "simplified",
          "json_schema"
        ],
        "title": "SchemaFormat",
        "description": "Output format for schema information."
      },
      "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."
      },
      "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"
    }
  ]
}