{
  "openapi": "3.2.0",
  "info": {
    "title": "Nebul API",
    "description": "The Nebul Inference API: an OpenAI-compatible (plus Anthropic Messages-compatible) proxy surface over the models your API key's project is authorized to use. Authenticate with `X-API-Key: <key>` or `Authorization: Bearer <key>`. Please see https://docs.nebul.io for more details.",
    "version": "1.0.0",
    "license": {
      "name": "Nebul API License",
      "url": "https://nebul.com/legal-information/"
    },
    "termsOfService": "https://nebul.com/legal-information/",
    "contact": {
      "name": "Nebul Support",
      "url": "https://portal.nebul.com/"
    }
  },
  "servers": [
    {
      "url": "https://api.inference.nebul.io",
      "description": "Production API"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Audio",
      "description": "Turn audio into text or text into audio."
    },
    {
      "name": "Chat",
      "description": "Given a list of messages comprising a conversation, the model will return a response."
    },
    {
      "name": "Completions",
      "description": "The Chat Completions API endpoint will generate a model response from a list of messages comprising a conversation."
    },
    {
      "name": "Embeddings",
      "description": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms."
    },
    {
      "name": "Models",
      "description": "List and describe the various models available in the API."
    },
    {
      "name": "Images",
      "description": "Given a prompt and/or an input image, the model will generate or edit an image."
    },
    {
      "name": "Responses",
      "description": "Create and manage responses using OpenAI's Responses API. Supports structured outputs, function calling, and stateful conversations."
    },
    {
      "name": "Rerank",
      "description": "Rerank documents based on their relevance to a given query."
    },
    {
      "name": "OCR",
      "description": "Extract text from documents using OCR. Supports PDF documents via URL or base64 content."
    }
  ],
  "paths": {
    "/v1/models": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Model List",
        "description": "Return a list of models available for the given API key.",
        "operationId": "model_list_v1_models_get",
        "parameters": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ModelListResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/model/info": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Model Info",
        "description": "Model metadata for agents and tooling: token pricing (decimal EUR per 1M tokens), model version (the HuggingFace repo sha the deployment serves), reasoning efforts, and deprecation info. An optional API key scopes the results to the key's project; without one, all catalog-visible models are returned. CORS-enabled for browser use.",
        "operationId": "model_info_v1_model_info_get",
        "parameters": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ModelInfoListResponse"
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "Chat Completion",
        "description": "Follows the exact same API spec as `OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat`\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/chat/completions \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer sk-1234\" \n-d '{\n    \"model\": \"openai/gpt-oss-120b\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": \"Hello!\"\n        }\n    ]\n}'\n```",
        "operationId": "chat_completion_v1_chat_completions_post",
        "parameters": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessfulResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "messages"
                ],
                "properties": {
                  "model": {
                    "title": "Model",
                    "type": "string",
                    "minLength": 1
                  },
                  "messages": {
                    "items": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/ChatCompletionUserMessage"
                        },
                        {
                          "$ref": "#/components/schemas/ChatCompletionAssistantMessage"
                        },
                        {
                          "$ref": "#/components/schemas/ChatCompletionToolMessage"
                        },
                        {
                          "$ref": "#/components/schemas/ChatCompletionSystemMessage"
                        },
                        {
                          "$ref": "#/components/schemas/ChatCompletionFunctionMessage"
                        },
                        {
                          "$ref": "#/components/schemas/ChatCompletionDeveloperMessage"
                        }
                      ]
                    },
                    "title": "Messages",
                    "type": "array",
                    "example": [
                      {
                        "role": "user",
                        "content": "Hello, how are you?"
                      }
                    ]
                  },
                  "frequency_penalty": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Frequency Penalty"
                  },
                  "logit_bias": {
                    "anyOf": [
                      {
                        "additionalProperties": {
                          "type": "number"
                        },
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Logit Bias"
                  },
                  "logprobs": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Logprobs"
                  },
                  "top_logprobs": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Top Logprobs"
                  },
                  "max_tokens": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Max Tokens"
                  },
                  "n": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "N"
                  },
                  "presence_penalty": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": -2,
                        "maximum": 2
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Presence Penalty"
                  },
                  "response_format": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Response Format"
                  },
                  "seed": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Seed"
                  },
                  "service_tier": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Service Tier"
                  },
                  "stop": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Stop"
                  },
                  "stream_options": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Stream Options"
                  },
                  "temperature": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Temperature"
                  },
                  "top_p": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Top P"
                  },
                  "tools": {
                    "anyOf": [
                      {
                        "items": {
                          "type": "object"
                        },
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Tools"
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Tool Choice"
                  },
                  "parallel_tool_calls": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Parallel Tool Calls"
                  },
                  "function_call": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Function Call"
                  },
                  "functions": {
                    "anyOf": [
                      {
                        "items": {
                          "type": "object"
                        },
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Functions"
                  },
                  "user": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "User"
                  },
                  "stream": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Stream"
                  },
                  "metadata": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Metadata"
                  },
                  "guardrails": {
                    "anyOf": [
                      {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Guardrails"
                  },
                  "caching": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Caching"
                  },
                  "num_retries": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Num Retries"
                  },
                  "context_window_fallback_dict": {
                    "anyOf": [
                      {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Context Window Fallback Dict"
                  },
                  "fallbacks": {
                    "anyOf": [
                      {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Fallbacks"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/completions": {
      "post": {
        "tags": [
          "Completions"
        ],
        "summary": "Completion",
        "description": "Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions`\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/completions \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer sk-1234\" \n-d '{\n    \"model\": \"openai/gpt-oss-120b\",\n    \"prompt\": \"Once upon a time\",\n    \"max_tokens\": 50,\n    \"temperature\": 0.7\n}'\n```",
        "operationId": "completion_v1_completions_post",
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessfulResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/embeddings": {
      "post": {
        "tags": [
          "Embeddings"
        ],
        "summary": "Embeddings",
        "description": "Follows the exact same API spec as `OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings`\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/embeddings \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer sk-1234\" \n-d '{\n    \"model\": \"sentence-transformers/all-MiniLM-L6-v2\",\n    \"input\": \"The quick brown fox jumps over the lazy dog\"\n}'\n```",
        "operationId": "embeddings_v1_embeddings_post",
        "parameters": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessfulResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model"
                ],
                "properties": {
                  "model": {
                    "title": "Model",
                    "type": "string",
                    "minLength": 1
                  },
                  "input": {
                    "default": [],
                    "items": {
                      "type": "string"
                    },
                    "title": "Input",
                    "type": "array"
                  },
                  "timeout": {
                    "default": 600,
                    "title": "Timeout",
                    "type": "integer"
                  },
                  "api_base": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Api Base"
                  },
                  "api_version": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Api Version"
                  },
                  "api_key": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Api Key"
                  },
                  "api_type": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Api Type"
                  },
                  "caching": {
                    "default": false,
                    "title": "Caching",
                    "type": "boolean"
                  },
                  "user": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "User"
                  },
                  "custom_llm_provider": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Custom Llm Provider"
                  },
                  "litellm_call_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Litellm Call Id"
                  },
                  "litellm_logging_obj": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Litellm Logging Obj"
                  },
                  "logger_fn": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Logger Fn"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/generations": {
      "post": {
        "tags": [
          "Images"
        ],
        "summary": "Create Image",
        "description": "Generate an image from a text prompt using the specified model.",
        "operationId": "create_image_v1_images_generations_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/images/edits": {
      "post": {
        "tags": [
          "Images"
        ],
        "summary": "Edit Image",
        "description": "Edit an image based on a text prompt and optional mask using the specified model.",
        "operationId": "edit_image_v1_images_edits_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_edit_image_v1_images_edits_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/images/variations": {
      "post": {
        "tags": [
          "Images"
        ],
        "summary": "Create Variation",
        "description": "Create variations of an image using the specified model.",
        "operationId": "create_variation_v1_images_variations_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_variation_v1_images_variations_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/audio/transcriptions": {
      "post": {
        "tags": [
          "Audio"
        ],
        "summary": "Create Transcription",
        "description": "Transcribes audio into the input language. Follows the OpenAI Audio API spec: https://platform.openai.com/docs/api-reference/audio/create-transcription\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/audio/transcriptions \\\n-H \"Authorization: Bearer sk-1234\" \\\n-F \"file=@audio.mp3\" \\\n-F \"model=nvidia/parakeet-tdt-0.6b-v3\" \\\n-F \"language=en\" \\\n-F \"response_format=json\"\n```",
        "operationId": "create_transcription_v1_audio_transcriptions_post",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_transcription_v1_audio_transcriptions_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessfulResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/audio/speech": {
      "post": {
        "tags": [
          "Audio"
        ],
        "summary": "Create Speech",
        "description": "Generates audio from the input text. Follows the OpenAI Audio API spec: https://platform.openai.com/docs/api-reference/audio/createSpeech\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/audio/speech \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer sk-1234\" \\\n-d '{\n    \"model\": \"resemble-ai/chatterbox-multilingual\",\n    \"input\": \"Hello, this is a test.\",\n    \"voice\": \"alloy\"\n}'\n```",
        "operationId": "create_speech_v1_audio_speech_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpeechRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessfulResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/audio/generations": {
      "post": {
        "tags": [
          "Audio"
        ],
        "summary": "Audio Generations",
        "description": "Generates audio from the input text (alias for /v1/audio/speech).\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/audio/generations \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer sk-1234\" \\\n-d '{\n    \"model\": \"resemble-ai/chatterbox-multilingual\",\n    \"input\": \"Hello, this is a test.\",\n    \"voice\": \"alloy\"\n}'\n```",
        "operationId": "audio_generations_v1_audio_generations_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpeechRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessfulResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/ocr": {
      "post": {
        "tags": [
          "OCR"
        ],
        "summary": "OCR Document",
        "description": "Extract text from documents using OCR. Supports PDF documents via URL or base64 content.\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/ocr \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer sk-1234\" \\\n-d '{\n    \"model\": \"DeepSeek/DeepSeek-OCR\",\n    \"document\": {\n        \"type\": \"document_url\",\n        \"document_url\": \"https://example.com/document.pdf\"\n    }\n}'\n```",
        "operationId": "ocr_v1_ocr_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MistralOCRRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MistralOCRResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/responses": {
      "post": {
        "tags": [
          "Responses"
        ],
        "summary": "Create Response",
        "description": "Create a response using OpenAI's Responses API. Supports structured outputs, function calling, and stateful conversations.\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/responses \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer sk-1234\" \\\n-d '{\n    \"model\": \"openai/gpt-oss-120b\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": \"Hello!\"\n        }\n    ]\n}'\n```",
        "operationId": "create_response_v1_responses_post",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid or missing required parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            }
                          ]
                        },
                        "param": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "message",
                        "type",
                        "code"
                      ]
                    }
                  }
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid authorization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            }
                          ]
                        },
                        "param": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "message",
                        "type",
                        "code"
                      ]
                    }
                  }
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "messages"
                ],
                "properties": {
                  "model": {
                    "title": "Model",
                    "type": "string",
                    "minLength": 1
                  },
                  "messages": {
                    "items": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/ChatCompletionUserMessage"
                        },
                        {
                          "$ref": "#/components/schemas/ChatCompletionAssistantMessage"
                        },
                        {
                          "$ref": "#/components/schemas/ChatCompletionToolMessage"
                        },
                        {
                          "$ref": "#/components/schemas/ChatCompletionSystemMessage"
                        },
                        {
                          "$ref": "#/components/schemas/ChatCompletionFunctionMessage"
                        },
                        {
                          "$ref": "#/components/schemas/ChatCompletionDeveloperMessage"
                        }
                      ]
                    },
                    "title": "Messages",
                    "type": "array",
                    "example": [
                      {
                        "role": "user",
                        "content": "Hello, how are you?"
                      }
                    ]
                  },
                  "response_format": {
                    "anyOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Response Format",
                    "description": "Specify a structured output format (JSON schema) for the response"
                  },
                  "tools": {
                    "anyOf": [
                      {
                        "items": {
                          "type": "object"
                        },
                        "type": "array"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Tools",
                    "description": "A list of tools the model may call"
                  },
                  "tool_choice": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Tool Choice",
                    "description": "Controls which tool the model calls, if any"
                  },
                  "temperature": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Temperature"
                  },
                  "max_tokens": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Max Tokens"
                  },
                  "stream": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "Stream"
                  },
                  "user": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "title": "User"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/rerank": {
      "post": {
        "tags": [
          "Rerank"
        ],
        "summary": "Rerank Documents",
        "description": "Rerank a list of documents based on their relevance to a query.\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/rerank \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer sk-1234\" \\\n-d '{\n    \"model\": \"BAAI/bge-reranker-v2-m3\",\n    \"query\": \"What is machine learning?\",\n    \"documents\": [\n        \"Document 1 text...\",\n        \"Document 2 text...\"\n    ],\n    \"top_n\": 3\n}'\n```",
        "operationId": "rerank_v1_rerank_post",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RerankResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid or missing required parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            }
                          ]
                        },
                        "param": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "message",
                        "type",
                        "code"
                      ]
                    }
                  }
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid authorization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            }
                          ]
                        },
                        "param": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "message",
                        "type",
                        "code"
                      ]
                    }
                  }
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RerankRequest"
              }
            }
          }
        }
      }
    },
    "/v1/messages": {
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "Create a Message (Anthropic-compatible)",
        "description": "Anthropic Messages API-compatible endpoint. Point Anthropic SDKs at `https://api.inference.nebul.io` as the base URL. The `model` in the body selects and authorizes the target model; prompts pass the platform guardrails.",
        "operationId": "create_message_v1_messages_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/messages/count_tokens": {
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "Count Message Tokens",
        "description": "Count input tokens for an Anthropic Messages request without generating a completion.",
        "operationId": "count_tokens_v1_messages_count_tokens_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountTokensRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "input_tokens": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/classify": {
      "post": {
        "tags": [
          "Models"
        ],
        "summary": "Classify",
        "description": "Classify text against a classification model. The `model` in the body selects and authorizes the target model.",
        "operationId": "classify_v1_classify_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClassifyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClassifyResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/transcribe": {
      "post": {
        "tags": [
          "Audio"
        ],
        "summary": "Transcribe Audio",
        "description": "Transcribes audio into the input language. Follows the OpenAI Audio API spec: https://platform.openai.com/docs/api-reference/audio/create-transcription\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/audio/transcriptions \\\n-H \"Authorization: Bearer sk-1234\" \\\n-F \"file=@audio.mp3\" \\\n-F \"model=nvidia/parakeet-tdt-0.6b-v3\" \\\n-F \"language=en\" \\\n-F \"response_format=json\"\n```",
        "operationId": "transcribe_transcribe_post",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_transcription_v1_audio_transcriptions_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessfulResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/audio/transcriptions/stream": {
      "post": {
        "tags": [
          "Audio"
        ],
        "summary": "Create Transcription (streaming)",
        "description": "Transcribes audio into the input language. Follows the OpenAI Audio API spec: https://platform.openai.com/docs/api-reference/audio/create-transcription\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/audio/transcriptions \\\n-H \"Authorization: Bearer sk-1234\" \\\n-F \"file=@audio.mp3\" \\\n-F \"model=nvidia/parakeet-tdt-0.6b-v3\" \\\n-F \"language=en\" \\\n-F \"response_format=json\"\n```",
        "operationId": "v1_audio_transcriptions_stream_post",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_transcription_v1_audio_transcriptions_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessfulResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/audio/transcriptions/stream_input": {
      "post": {
        "tags": [
          "Audio"
        ],
        "summary": "Create Transcription (stream input)",
        "description": "Transcribes audio into the input language. Follows the OpenAI Audio API spec: https://platform.openai.com/docs/api-reference/audio/create-transcription\n\n```bash\ncurl -X POST https://api.inference.nebul.io/v1/audio/transcriptions \\\n-H \"Authorization: Bearer sk-1234\" \\\n-F \"file=@audio.mp3\" \\\n-F \"model=nvidia/parakeet-tdt-0.6b-v3\" \\\n-F \"language=en\" \\\n-F \"response_format=json\"\n```",
        "operationId": "v1_audio_transcriptions_stream_input_post",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_transcription_v1_audio_transcriptions_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessfulResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/model_info": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Model Info",
        "description": "Model metadata for agents and tooling: token pricing (decimal EUR per 1M tokens), model version (the HuggingFace repo sha the deployment serves), reasoning efforts, and deprecation info. An optional API key scopes the results to the key's project; without one, all catalog-visible models are returned. CORS-enabled for browser use.",
        "operationId": "model_info_model_info_get",
        "parameters": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ModelInfoListResponse"
          }
        }
      }
    },
    "/v1/models/{model}": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Get Model",
        "description": "Return a list of models available for the given API key.",
        "operationId": "get_model_v1_models_get",
        "parameters": [],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ModelListResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/v1/files": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List Files",
        "description": "List files owned by the API key's project.",
        "operationId": "list_files_files_v1_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Upload File",
        "description": "Upload a file for the API key's project (multipart/form-data: `file` binary + `purpose` string).",
        "operationId": "upload_file_files_v1_post",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "purpose": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileObject"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/files/{file_id}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get File",
        "description": "Get file metadata.",
        "operationId": "get_file_files_v1_file_id_get",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The file ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileObject"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "Delete File",
        "description": "Delete a file.",
        "operationId": "delete_file_files_v1_file_id_delete",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The file ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/files/{file_id}/content": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get File Content",
        "description": "Download the file's content.",
        "operationId": "get_file_content_files_v1_file_id_content_get",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The file ID."
          }
        ],
        "responses": {
          "200": {
            "description": "The file's raw content."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/changelog/entries": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "List Changelog Entries",
        "description": "Public platform changelog. Authentication optional.",
        "operationId": "list_changelog_entries_changelog_entries_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Model": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The model identifier"
          },
          "object": {
            "type": "string",
            "description": "The object type, always 'model'",
            "default": "model"
          },
          "created": {
            "type": "integer",
            "description": "Unix timestamp of when the model was created"
          },
          "owned_by": {
            "type": "string",
            "description": "The organization that owns the model"
          }
        },
        "required": [
          "id",
          "object",
          "created",
          "owned_by"
        ]
      },
      "ModelListResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Model"
            },
            "description": "Array of model objects"
          },
          "object": {
            "type": "string",
            "description": "The object type, always 'list'",
            "default": "list"
          }
        },
        "required": [
          "data",
          "object"
        ]
      },
      "ModelInfoDetails": {
        "type": "object",
        "required": [
          "id",
          "key",
          "model_type",
          "mode",
          "supports_reasoning"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Catalog model ID"
          },
          "key": {
            "type": "string",
            "nullable": true,
            "description": "Alias of model_name"
          },
          "mode": {
            "type": "string",
            "nullable": true,
            "description": "chat, embedding, rerank, image_generation, audio_transcription, or audio_speech; null when model_type has no single equivalent (generic audio)"
          },
          "model_type": {
            "type": "string",
            "description": "Raw catalog model type"
          },
          "display_name": {
            "type": "string",
            "nullable": true,
            "description": "Card display name; falls back to model_name"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "logo_url": {
            "type": "string",
            "nullable": true
          },
          "huggingface_id": {
            "type": "string",
            "nullable": true,
            "description": "HuggingFace repo id"
          },
          "parameters_count": {
            "type": "string",
            "nullable": true,
            "description": "Human parameter count, e.g. '754B'"
          },
          "precision": {
            "type": "string",
            "nullable": true
          },
          "display_tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "max_input_tokens": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "Context window"
          },
          "max_output_tokens": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "Always null today"
          },
          "input_cost_per_1m_tokens": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "Input price in EUR per 1M tokens; null when no price is set"
          },
          "output_cost_per_1m_tokens": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "Output price in EUR per 1M tokens; null when no price is set"
          },
          "cache_read_input_cost_per_1m_tokens": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "Cached-input price in EUR per 1M tokens; null when uncached input is billed at the full rate"
          },
          "supports_reasoning": {
            "type": "boolean",
            "description": "True when reasoning_efforts is non-empty"
          },
          "reasoning_efforts": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high",
                "max"
              ]
            },
            "nullable": true,
            "description": "reasoning_effort values the model meaningfully accepts"
          },
          "model_version": {
            "type": "string",
            "nullable": true,
            "description": "Deployed weights revision, the HuggingFace repo sha"
          },
          "deprecation_date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Scheduled removal date, if deprecated"
          },
          "superseded_by_model_name": {
            "type": "string",
            "nullable": true,
            "description": "Successor model name, if superseded"
          },
          "supports_function_calling": {
            "type": "boolean",
            "nullable": true,
            "description": "Tool use"
          },
          "supports_vision": {
            "type": "boolean",
            "nullable": true,
            "description": "Image input"
          },
          "supports_audio_input": {
            "type": "boolean",
            "nullable": true
          },
          "supports_audio_output": {
            "type": "boolean",
            "nullable": true
          },
          "supports_response_schema": {
            "type": "boolean",
            "nullable": true,
            "description": "Structured output"
          },
          "supports_multilingual": {
            "type": "boolean",
            "nullable": true
          },
          "is_preview": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "ModelInfoEntry": {
        "type": "object",
        "required": [
          "model_name",
          "model_info"
        ],
        "properties": {
          "model_name": {
            "type": "string",
            "description": "The value the API accepts as model"
          },
          "model_info": {
            "$ref": "#/components/schemas/ModelInfoDetails"
          }
        }
      },
      "ModelInfoList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelInfoEntry"
            }
          }
        }
      },
      "Body_transcribe_audio_transcribe_post": {
        "properties": {
          "file": {
            "items": {
              "type": "string",
              "format": "binary"
            },
            "type": "array",
            "title": "File",
            "description": "The audio file to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm."
          },
          "model": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Model",
            "description": "The model to use for transcription."
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language",
            "description": "The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency."
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt",
            "description": "An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language."
          },
          "response_format": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "json",
                  "text",
                  "srt",
                  "verbose_json",
                  "vtt"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format",
            "description": "The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.",
            "default": "json"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature",
            "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.",
            "default": 0
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User",
            "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse."
          }
        },
        "type": "object",
        "required": [
          "file",
          "model"
        ],
        "title": "Body_transcribe_audio_transcribe_post"
      },
      "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"
      },
      "Body_create_variation_images_variations_post": {
        "properties": {
          "model": {
            "title": "Model",
            "type": "string",
            "minLength": 1
          },
          "image": {
            "type": "string",
            "format": "binary",
            "title": "Image"
          },
          "n": {
            "type": "integer",
            "title": "N",
            "default": 1
          },
          "size": {
            "type": "string",
            "title": "Size",
            "default": "auto"
          },
          "response_format": {
            "type": "string",
            "title": "Response Format",
            "default": "b64_json"
          },
          "quality": {
            "type": "string",
            "title": "Quality",
            "default": "auto"
          },
          "background": {
            "type": "string",
            "title": "Background",
            "default": "auto"
          },
          "guidance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guidance"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User"
          },
          "output_format": {
            "type": "string",
            "title": "Output Format",
            "default": "png"
          }
        },
        "type": "object",
        "required": [
          "image",
          "model"
        ],
        "title": "Body_create_variation_images_variations_post"
      },
      "Body_create_variation_v1_images_variations_post": {
        "properties": {
          "model": {
            "title": "Model",
            "type": "string",
            "minLength": 1
          },
          "image": {
            "type": "string",
            "format": "binary",
            "title": "Image"
          },
          "n": {
            "type": "integer",
            "title": "N",
            "default": 1
          },
          "size": {
            "type": "string",
            "title": "Size",
            "default": "auto"
          },
          "response_format": {
            "type": "string",
            "title": "Response Format",
            "default": "b64_json"
          },
          "quality": {
            "type": "string",
            "title": "Quality",
            "default": "auto"
          },
          "background": {
            "type": "string",
            "title": "Background",
            "default": "auto"
          },
          "guidance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guidance"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User"
          },
          "output_format": {
            "type": "string",
            "title": "Output Format",
            "default": "png"
          }
        },
        "type": "object",
        "required": [
          "image",
          "model"
        ],
        "title": "Body_create_variation_v1_images_variations_post"
      },
      "Body_edit_image_images_edits_post": {
        "properties": {
          "model": {
            "title": "Model",
            "type": "string",
            "minLength": 1
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "minLength": 1
          },
          "image": {
            "items": {
              "type": "string",
              "format": "binary"
            },
            "type": "array",
            "title": "Image"
          },
          "mask": {
            "anyOf": [
              {
                "type": "string",
                "format": "binary"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mask"
          },
          "n": {
            "type": "integer",
            "title": "N",
            "default": 1
          },
          "size": {
            "type": "string",
            "title": "Size",
            "default": "auto"
          },
          "response_format": {
            "type": "string",
            "title": "Response Format",
            "default": "b64_json"
          },
          "quality": {
            "type": "string",
            "title": "Quality",
            "default": "auto"
          },
          "background": {
            "type": "string",
            "title": "Background",
            "default": "auto"
          },
          "guidance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guidance"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User"
          },
          "output_format": {
            "type": "string",
            "title": "Output Format",
            "default": "png"
          }
        },
        "type": "object",
        "required": [
          "prompt",
          "image",
          "model"
        ],
        "title": "Body_edit_image_images_edits_post"
      },
      "Body_edit_image_v1_images_edits_post": {
        "properties": {
          "model": {
            "title": "Model",
            "type": "string",
            "minLength": 1
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "minLength": 1
          },
          "image": {
            "items": {
              "type": "string",
              "format": "binary"
            },
            "type": "array",
            "title": "Image"
          },
          "mask": {
            "anyOf": [
              {
                "type": "string",
                "format": "binary"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mask"
          },
          "n": {
            "type": "integer",
            "title": "N",
            "default": 1
          },
          "size": {
            "type": "string",
            "title": "Size",
            "default": "auto"
          },
          "response_format": {
            "type": "string",
            "title": "Response Format",
            "default": "b64_json"
          },
          "quality": {
            "type": "string",
            "title": "Quality",
            "default": "auto"
          },
          "background": {
            "type": "string",
            "title": "Background",
            "default": "auto"
          },
          "guidance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guidance"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User"
          },
          "output_format": {
            "type": "string",
            "title": "Output Format",
            "default": "png"
          }
        },
        "type": "object",
        "required": [
          "prompt",
          "image",
          "model"
        ],
        "title": "Body_edit_image_v1_images_edits_post"
      },
      "ImageData": {
        "properties": {
          "b64_json": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "B64 Json"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "type": "object",
        "title": "ImageData"
      },
      "ImageGenerateRequest": {
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "minLength": 1
          },
          "n": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "N",
            "default": 1
          },
          "size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size",
            "default": "auto"
          },
          "quality": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quality",
            "default": "auto"
          },
          "background": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Background",
            "default": "auto"
          },
          "output_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Format",
            "default": "png"
          },
          "response_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format",
            "default": "b64_json"
          },
          "guidance": {
            "type": "number",
            "title": "Guidance"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User"
          }
        },
        "type": "object",
        "required": [
          "prompt"
        ],
        "title": "ImageGenerateRequest"
      },
      "ImageResponse": {
        "properties": {
          "created": {
            "type": "integer",
            "title": "Created"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ImageData"
            },
            "type": "array",
            "title": "Data"
          },
          "background": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Background"
          },
          "output_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Format"
          },
          "size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size"
          },
          "quality": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quality"
          },
          "usage": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usage"
          }
        },
        "type": "object",
        "required": [
          "created",
          "data"
        ],
        "title": "ImageResponse"
      },
      "Body_create_image_variation_images_variations_post": {
        "properties": {
          "image": {
            "items": {
              "type": "string",
              "format": "binary"
            },
            "type": "array",
            "title": "Image",
            "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square."
          },
          "n": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "N",
            "description": "The number of images to generate. Must be between 1 and 10. Defaults to 1.",
            "default": 1
          },
          "response_format": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "url",
                  "b64_json"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format",
            "description": "The format in which the generated images are returned. Must be one of url or b64_json. Defaults to url.",
            "default": "url"
          },
          "size": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "256x256",
                  "512x512",
                  "1024x1024"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Size",
            "description": "The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024. Defaults to 1024x1024.",
            "default": "1024x1024"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User",
            "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse."
          }
        },
        "type": "object",
        "required": [
          "image"
        ],
        "title": "Body_create_image_variation_images_variations_post"
      },
      "Body_create_image_variation_v1_images_variations_post": {
        "properties": {
          "image": {
            "items": {
              "type": "string",
              "format": "binary"
            },
            "type": "array",
            "title": "Image",
            "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square."
          },
          "n": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "N",
            "description": "The number of images to generate. Must be between 1 and 10. Defaults to 1.",
            "default": 1
          },
          "response_format": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "url",
                  "b64_json"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format",
            "description": "The format in which the generated images are returned. Must be one of url or b64_json. Defaults to url.",
            "default": "url"
          },
          "size": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "256x256",
                  "512x512",
                  "1024x1024"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Size",
            "description": "The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024. Defaults to 1024x1024.",
            "default": "1024x1024"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User",
            "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse."
          }
        },
        "type": "object",
        "required": [
          "image"
        ],
        "title": "Body_create_image_variation_v1_images_variations_post"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ValidationError"
                },
                "type": "array"
              },
              {
                "type": "string"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "Body_image_edit_api_images_edits_post": {
        "properties": {
          "image": {
            "items": {
              "type": "string",
              "format": "binary"
            },
            "type": "array",
            "title": "Image"
          },
          "mask": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "binary"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mask"
          }
        },
        "type": "object",
        "required": [
          "image"
        ],
        "title": "Body_image_edit_api_images_edits_post"
      },
      "Body_image_edit_api_v1_images_edits_post": {
        "properties": {
          "image": {
            "items": {
              "type": "string",
              "format": "binary"
            },
            "type": "array",
            "title": "Image"
          },
          "mask": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "binary"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mask"
          }
        },
        "type": "object",
        "required": [
          "image"
        ],
        "title": "Body_image_edit_api_v1_images_edits_post"
      },
      "Body_create_transcription_v1_audio_transcriptions_post": {
        "properties": {
          "file": {
            "items": {
              "type": "string",
              "format": "binary"
            },
            "type": "array",
            "title": "File",
            "description": "The audio file to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "The model to use for transcription.",
            "minLength": 1
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language",
            "description": "The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency."
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt",
            "description": "An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language."
          },
          "response_format": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "json",
                  "text",
                  "srt",
                  "verbose_json",
                  "vtt"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format",
            "description": "The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.",
            "default": "json"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature",
            "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.",
            "default": 0
          },
          "timestamp_granularities": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp Granularities",
            "description": "JSON array of timestamp granularities to include. Options: [\"word\"], [\"segment\"], or [\"word\", \"segment\"]."
          }
        },
        "type": "object",
        "required": [
          "file",
          "model"
        ],
        "title": "Body_create_transcription_v1_audio_transcriptions_post"
      },
      "ChatCompletionAssistantMessage": {
        "properties": {
          "role": {
            "const": "assistant",
            "title": "Role",
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ChatCompletionTextObject"
                    },
                    {
                      "$ref": "#/components/schemas/ChatCompletionThinkingBlock"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "tool_calls": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ChatCompletionAssistantToolCall"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Calls"
          },
          "function_call": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChatCompletionToolCallFunctionChunk"
              },
              {
                "type": "null"
              }
            ]
          },
          "reasoning_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Content"
          },
          "cache_control": {
            "$ref": "#/components/schemas/ChatCompletionCachedContent"
          },
          "thinking_blocks": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ChatCompletionThinkingBlock"
                    },
                    {
                      "$ref": "#/components/schemas/ChatCompletionRedactedThinkingBlock"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thinking Blocks"
          }
        },
        "required": [
          "role"
        ],
        "title": "ChatCompletionAssistantMessage",
        "type": "object"
      },
      "ChatCompletionAssistantToolCall": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "type": {
            "const": "function",
            "title": "Type",
            "type": "string"
          },
          "function": {
            "$ref": "#/components/schemas/ChatCompletionToolCallFunctionChunk"
          }
        },
        "required": [
          "id",
          "type",
          "function"
        ],
        "title": "ChatCompletionAssistantToolCall",
        "type": "object"
      },
      "ChatCompletionAudioObject": {
        "properties": {
          "input_audio": {
            "$ref": "#/components/schemas/InputAudio"
          },
          "type": {
            "const": "input_audio",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "input_audio",
          "type"
        ],
        "title": "ChatCompletionAudioObject",
        "type": "object"
      },
      "ChatCompletionCachedContent": {
        "properties": {
          "type": {
            "const": "ephemeral",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "ChatCompletionCachedContent",
        "type": "object"
      },
      "ChatCompletionDeveloperMessage": {
        "properties": {
          "role": {
            "const": "developer",
            "title": "Role",
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {},
                "type": "array"
              }
            ],
            "title": "Content"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "cache_control": {
            "$ref": "#/components/schemas/ChatCompletionCachedContent"
          }
        },
        "required": [
          "role",
          "content"
        ],
        "title": "ChatCompletionDeveloperMessage",
        "type": "object"
      },
      "ChatCompletionDocumentObject": {
        "properties": {
          "type": {
            "const": "document",
            "title": "Type",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentObject"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "context": {
            "title": "Context",
            "type": "string"
          },
          "citations": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CitationsObject"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "type",
          "source",
          "title",
          "context",
          "citations"
        ],
        "title": "ChatCompletionDocumentObject",
        "type": "object"
      },
      "ChatCompletionFileObject": {
        "properties": {
          "type": {
            "const": "file",
            "title": "Type",
            "type": "string"
          },
          "file": {
            "$ref": "#/components/schemas/ChatCompletionFileObjectFile"
          }
        },
        "required": [
          "type",
          "file"
        ],
        "title": "ChatCompletionFileObject",
        "type": "object"
      },
      "ChatCompletionFileObjectFile": {
        "properties": {
          "file_data": {
            "title": "File Data",
            "type": "string"
          },
          "file_id": {
            "title": "File Id",
            "type": "string"
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "format": {
            "title": "Format",
            "type": "string"
          }
        },
        "title": "ChatCompletionFileObjectFile",
        "type": "object"
      },
      "ChatCompletionFunctionMessage": {
        "properties": {
          "role": {
            "const": "function",
            "title": "Role",
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ChatCompletionTextObject"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "tool_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Call Id"
          }
        },
        "required": [
          "role",
          "content",
          "name",
          "tool_call_id"
        ],
        "title": "ChatCompletionFunctionMessage",
        "type": "object"
      },
      "ChatCompletionImageObject": {
        "properties": {
          "type": {
            "const": "image_url",
            "title": "Type",
            "type": "string"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/ChatCompletionImageUrlObject"
              }
            ],
            "title": "Image Url"
          }
        },
        "required": [
          "type",
          "image_url"
        ],
        "title": "ChatCompletionImageObject",
        "type": "object"
      },
      "ChatCompletionImageUrlObject": {
        "properties": {
          "url": {
            "title": "Url",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "format": {
            "title": "Format",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "ChatCompletionImageUrlObject",
        "type": "object"
      },
      "ChatCompletionRedactedThinkingBlock": {
        "properties": {
          "type": {
            "const": "redacted_thinking",
            "title": "Type",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "string"
          },
          "cache_control": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "$ref": "#/components/schemas/ChatCompletionCachedContent"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Control"
          }
        },
        "required": [
          "type"
        ],
        "title": "ChatCompletionRedactedThinkingBlock",
        "type": "object"
      },
      "ChatCompletionSystemMessage": {
        "properties": {
          "role": {
            "const": "system",
            "title": "Role",
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {},
                "type": "array"
              }
            ],
            "title": "Content"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "cache_control": {
            "$ref": "#/components/schemas/ChatCompletionCachedContent"
          }
        },
        "required": [
          "role",
          "content"
        ],
        "title": "ChatCompletionSystemMessage",
        "type": "object"
      },
      "ChatCompletionTextObject": {
        "properties": {
          "type": {
            "const": "text",
            "title": "Type",
            "type": "string"
          },
          "text": {
            "title": "Text",
            "type": "string"
          },
          "cache_control": {
            "$ref": "#/components/schemas/ChatCompletionCachedContent"
          }
        },
        "required": [
          "type",
          "text"
        ],
        "title": "ChatCompletionTextObject",
        "type": "object"
      },
      "ChatCompletionThinkingBlock": {
        "properties": {
          "type": {
            "const": "thinking",
            "title": "Type",
            "type": "string"
          },
          "thinking": {
            "title": "Thinking",
            "type": "string"
          },
          "signature": {
            "title": "Signature",
            "type": "string"
          },
          "cache_control": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "$ref": "#/components/schemas/ChatCompletionCachedContent"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Control"
          }
        },
        "required": [
          "type"
        ],
        "title": "ChatCompletionThinkingBlock",
        "type": "object"
      },
      "ChatCompletionToolCallFunctionChunk": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "arguments": {
            "title": "Arguments",
            "type": "string"
          }
        },
        "title": "ChatCompletionToolCallFunctionChunk",
        "type": "object"
      },
      "ChatCompletionToolMessage": {
        "properties": {
          "role": {
            "const": "tool",
            "title": "Role",
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/ChatCompletionTextObject"
                },
                "type": "array"
              }
            ],
            "title": "Content"
          },
          "tool_call_id": {
            "title": "Tool Call Id",
            "type": "string"
          }
        },
        "required": [
          "role",
          "content",
          "tool_call_id"
        ],
        "title": "ChatCompletionToolMessage",
        "type": "object"
      },
      "ChatCompletionUserMessage": {
        "properties": {
          "role": {
            "const": "user",
            "title": "Role",
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ChatCompletionTextObject"
                    },
                    {
                      "$ref": "#/components/schemas/ChatCompletionImageObject"
                    },
                    {
                      "$ref": "#/components/schemas/ChatCompletionAudioObject"
                    },
                    {
                      "$ref": "#/components/schemas/ChatCompletionDocumentObject"
                    },
                    {
                      "$ref": "#/components/schemas/ChatCompletionVideoObject"
                    },
                    {
                      "$ref": "#/components/schemas/ChatCompletionFileObject"
                    }
                  ]
                },
                "type": "array"
              }
            ],
            "title": "Content"
          },
          "cache_control": {
            "$ref": "#/components/schemas/ChatCompletionCachedContent"
          }
        },
        "required": [
          "role",
          "content"
        ],
        "title": "ChatCompletionUserMessage",
        "type": "object"
      },
      "ChatCompletionVideoObject": {
        "properties": {
          "type": {
            "const": "video_url",
            "title": "Type",
            "type": "string"
          },
          "video_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/ChatCompletionVideoUrlObject"
              }
            ],
            "title": "Video Url"
          }
        },
        "required": [
          "type",
          "video_url"
        ],
        "title": "ChatCompletionVideoObject",
        "type": "object"
      },
      "ChatCompletionVideoUrlObject": {
        "properties": {
          "url": {
            "title": "Url",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "ChatCompletionVideoUrlObject",
        "type": "object"
      },
      "CitationsObject": {
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "title": "CitationsObject",
        "type": "object"
      },
      "DocumentObject": {
        "properties": {
          "type": {
            "const": "text",
            "title": "Type",
            "type": "string"
          },
          "media_type": {
            "title": "Media Type",
            "type": "string"
          },
          "data": {
            "title": "Data",
            "type": "string"
          }
        },
        "required": [
          "type",
          "media_type",
          "data"
        ],
        "title": "DocumentObject",
        "type": "object"
      },
      "InputAudio": {
        "properties": {
          "data": {
            "title": "Data",
            "type": "string"
          },
          "format": {
            "enum": [
              "wav",
              "mp3"
            ],
            "title": "Format",
            "type": "string"
          }
        },
        "required": [
          "data",
          "format"
        ],
        "title": "InputAudio",
        "type": "object"
      },
      "RerankRequest": {
        "properties": {
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Model identifier for reranking",
            "minLength": 1
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "The search query to rerank documents against"
          },
          "documents": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Documents",
            "description": "List of documents to rerank"
          },
          "top_n": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Top N",
            "description": "Number of top results to return",
            "default": null
          },
          "return_documents": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Return Documents",
            "description": "Whether to return the original documents in the response",
            "default": false
          }
        },
        "required": [
          "model",
          "query"
        ],
        "title": "RerankRequest",
        "type": "object"
      },
      "RerankResult": {
        "properties": {
          "index": {
            "title": "Index",
            "type": "integer",
            "description": "Original index of the document"
          },
          "relevance_score": {
            "title": "Relevance Score",
            "type": "number",
            "description": "Relevance score for the document"
          },
          "document": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document",
            "description": "The document text (if return_documents is true)"
          }
        },
        "required": [
          "index",
          "relevance_score"
        ],
        "title": "RerankResult",
        "type": "object"
      },
      "RerankResponse": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string",
            "description": "Response identifier"
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Model identifier used for reranking"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/RerankResult"
            },
            "type": "array",
            "title": "Results",
            "description": "Reranked documents ordered by relevance"
          },
          "usage": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "title": "Usage",
            "description": "Usage information"
          }
        },
        "required": [
          "id",
          "model",
          "results"
        ],
        "title": "RerankResponse",
        "type": "object"
      },
      "AudioPrompt": {
        "properties": {
          "data": {
            "type": "string",
            "title": "Data",
            "description": "base64-encoded WAV bytes"
          },
          "mime_type": {
            "type": "string",
            "title": "Mime Type",
            "default": "audio/wav"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "AudioPrompt"
      },
      "SpeechRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model",
            "default": "resemble-ai/chatterbox-multilingual"
          },
          "input": {
            "type": "string",
            "title": "Input"
          },
          "language": {
            "type": "string",
            "title": "Language",
            "default": "en"
          },
          "response_format": {
            "type": "string",
            "enum": [
              "wav",
              "mp3"
            ],
            "title": "Response Format",
            "default": "wav"
          },
          "speed": {
            "type": "number",
            "title": "Speed",
            "default": 1
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed"
          },
          "voice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice"
          },
          "audio_prompt": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AudioPrompt"
              },
              {
                "type": "null"
              }
            ]
          },
          "exaggeration": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": 0.25
              },
              {
                "type": "null"
              }
            ],
            "title": "Exaggeration",
            "description": "Controls emotional intensity (0.25-2.0, default 0.5)",
            "default": 0.5
          },
          "cfg_weight": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cfg Weight",
            "description": "Adjusts speech pacing (0.0-1.0, default 0.5)",
            "default": 0.5
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 5,
                "minimum": 0.05
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature",
            "description": "Controls randomness and creativity (0.05-5.0, default 0.8)",
            "default": 0.8
          }
        },
        "type": "object",
        "required": [
          "input"
        ],
        "title": "SpeechRequest"
      },
      "DocumentUrl": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type",
            "description": "Document type (document_url, content, or file_id)",
            "default": "document_url"
          },
          "document_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Url",
            "description": "URL of the document (PDF), file_id reference, or data URL (data:application/pdf;base64,...)"
          },
          "document_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Content",
            "description": "Base64 content of the document"
          }
        },
        "type": "object",
        "title": "DocumentUrl"
      },
      "MistralOCRRequest": {
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model",
            "description": "Model identifier (ignored, uses VLLM_MODEL env var)"
          },
          "document": {
            "$ref": "#/components/schemas/DocumentUrl",
            "description": "Document to process"
          },
          "pages": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Pages",
            "description": "Specific pages to process"
          },
          "include_image_base64": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Image Base64",
            "description": "Include base64 images in response",
            "default": false
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt",
            "description": "OCR prompt (optional)"
          }
        },
        "type": "object",
        "required": [
          "document"
        ],
        "title": "MistralOCRRequest",
        "description": "Mistral-compatible OCR request"
      },
      "MistralOCRResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Response identifier"
          },
          "model": {
            "type": "string",
            "title": "Model",
            "description": "Model identifier"
          },
          "pages": {
            "items": {
              "$ref": "#/components/schemas/MistralPage"
            },
            "type": "array",
            "title": "Pages",
            "description": "Processed pages"
          },
          "usage_info": {
            "$ref": "#/components/schemas/MistralUsageInfo",
            "description": "Usage information"
          }
        },
        "type": "object",
        "required": [
          "id",
          "model",
          "pages",
          "usage_info"
        ],
        "title": "MistralOCRResponse",
        "description": "Mistral-compatible OCR response"
      },
      "MistralPage": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index",
            "description": "Page index"
          },
          "markdown": {
            "type": "string",
            "title": "Markdown",
            "description": "Extracted markdown text"
          },
          "images": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Images",
            "description": "Extracted images"
          },
          "dimensions": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dimensions",
            "description": "Page dimensions (width, height, dpi)"
          }
        },
        "type": "object",
        "required": [
          "index",
          "markdown"
        ],
        "title": "MistralPage",
        "description": "Mistral-compatible page response"
      },
      "MistralUsageInfo": {
        "properties": {
          "pages_processed": {
            "type": "integer",
            "title": "Pages Processed",
            "description": "Number of pages processed"
          },
          "doc_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Doc Size Bytes",
            "description": "Document size in bytes",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "pages_processed"
        ],
        "title": "MistralUsageInfo",
        "description": "Mistral-compatible usage information"
      },
      "ClassifyRequest": {
        "type": "object",
        "required": [
          "model",
          "input"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Model ID to use, e.g. `nebul-internal/nemotron-3`."
          },
          "input": {
            "type": "string",
            "description": "Text to classify."
          }
        }
      },
      "ClassifyResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "AnthropicMessage": {
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "user",
              "assistant"
            ]
          },
          "content": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            ]
          }
        }
      },
      "MessageRequest": {
        "type": "object",
        "required": [
          "model",
          "messages",
          "max_tokens"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Model ID to use."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnthropicMessage"
            }
          },
          "max_tokens": {
            "type": "integer"
          },
          "system": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            ]
          },
          "temperature": {
            "type": "number"
          },
          "top_p": {
            "type": "number"
          },
          "stream": {
            "type": "boolean",
            "default": false
          },
          "stop_sequences": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MessageResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "message"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "assistant"
            ]
          },
          "model": {
            "type": "string"
          },
          "content": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "stop_reason": {
            "type": "string"
          },
          "usage": {
            "type": "object",
            "properties": {
              "input_tokens": {
                "type": "integer"
              },
              "output_tokens": {
                "type": "integer"
              }
            }
          }
        }
      },
      "CountTokensRequest": {
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "properties": {
          "model": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnthropicMessage"
            }
          },
          "system": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            ]
          }
        }
      },
      "FileObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string"
          },
          "org_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "purpose": {
            "type": "string",
            "description": "e.g. `artifact`."
          },
          "file_size": {
            "type": "integer"
          },
          "checksum": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "e.g. `complete`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FileList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileObject"
            }
          }
        }
      }
    },
    "responses": {
      "SuccessfulResponse": {
        "description": "Successful Response",
        "content": {
          "application/json": {
            "schema": {}
          }
        }
      },
      "ModelListResponse": {
        "description": "Successful Response - List of available models",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ModelListResponse"
            }
          }
        }
      },
      "ModelInfoListResponse": {
        "description": "Successful Response - Model info list",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ModelInfoList"
            }
          }
        }
      },
      "ValidationError": {
        "description": "Validation Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/HTTPValidationError"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized - Missing or invalid authorization",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "code": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "integer"
                        }
                      ]
                    },
                    "param": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "type",
                    "code"
                  ]
                }
              }
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "BadRequest": {
        "description": "Bad Request - Invalid or missing required parameters",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "code": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "integer"
                        }
                      ]
                    },
                    "param": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "message",
                    "type",
                    "code"
                  ]
                }
              }
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Project-scoped Nebul API key. Also accepted as `Authorization: Bearer <key>`."
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Keycloak OAuth2/JWT access token, or an API key as the bearer token."
      }
    }
  }
}
