{
  "openapi": "3.1.0",
  "info": {
    "title": "Routeway API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.routeway.ai"
    }
  ],
  "paths": {
    "/v1/account/balance": {
      "get": {
        "tags": [
          "Account & Keys"
        ],
        "summary": "Get Account Balance",
        "description": "Check account balance. Requires scope: account:balance",
        "operationId": "account_balance_v1_account_balance_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountBalanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Could not retrieve balance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/activity": {
      "get": {
        "tags": [
          "Account & Keys"
        ],
        "summary": "Get Account Activity Logs",
        "description": "Fetch account activity logs. Requires scope: account:activity",
        "operationId": "account_activity_v1_account_activity_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountActivityResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid limit/offset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/analytics": {
      "get": {
        "tags": [
          "Account & Keys"
        ],
        "summary": "Get Account Analytics",
        "description": "Fetch analytics dashboard. Requires scope: account:read",
        "operationId": "account_analytics_v1_account_analytics_get",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": "30d",
              "title": "Period"
            }
          },
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountAnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid period or model ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - No analytics data found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/keys": {
      "get": {
        "tags": [
          "Account & Keys"
        ],
        "summary": "List API Keys",
        "description": "List all general API keys for the account. Requires scope: keys:read",
        "operationId": "list_keys_v1_account_keys_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountKeysListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Account & Keys"
        ],
        "summary": "Create API Key",
        "description": "Create a new general API key. Requires scope: keys:create",
        "operationId": "create_key_v1_account_keys_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountKeysListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters or limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/keys/{key_id}": {
      "get": {
        "tags": [
          "Account & Keys"
        ],
        "summary": "Get API Key Details",
        "description": "Get details of a specific API key. Requires scope: keys:read",
        "operationId": "get_key_v1_account_keys__key_id__get",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountKeyDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - You do not own this API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - API key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Account & Keys"
        ],
        "summary": "Update API Key",
        "description": "Update an existing API key. Requires scope: keys:update",
        "operationId": "update_key_v1_account_keys__key_id__patch",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Key Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountKeysListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid update parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - You do not own this API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - API key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Account & Keys"
        ],
        "summary": "Delete API Key",
        "description": "Delete an API key. Requires scope: keys:delete",
        "operationId": "delete_key_v1_account_keys__key_id__delete",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountKeyDeleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Deletion failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - You do not own this API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - API key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/responses": {
      "post": {
        "tags": [
          "Responses"
        ],
        "summary": "Create Responses",
        "description": "Generate a unified response block from various input configurations.",
        "operationId": "chat_completions_v1_responses_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateResponseBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseResource"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid query parameters or body format.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Key does not have permission or is disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity - Request body validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error - Internal error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway - Provider error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages": {
      "post": {
        "tags": [
          "Anthropic Messages"
        ],
        "summary": "Create Anthropic Message (v1)",
        "description": "Send a message to the Anthropic models. Supports streaming and non-streaming responses.",
        "operationId": "anthropic_messages_v1_messages_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessagesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid query parameters or body format.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Key does not have permission or is disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity - Request body validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error - Internal error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway - Provider error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages/count_tokens": {
      "post": {
        "tags": [
          "Anthropic Messages"
        ],
        "summary": "Anthropic Count Tokens",
        "operationId": "anthropic_count_tokens_v1_messages_count_tokens_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountTokensRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "tags": [
          "Chat"
        ],
        "summary": "Create Chat Completion (v1)",
        "description": "Generate a model response for a given chat conversation. Supports streaming and non-streaming responses.",
        "operationId": "chat_completions_v1_chat_completions_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCompletions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid query parameters or body format.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Key does not have permission or is disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity - Request body validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error - Internal error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway - Provider error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/images/generations": {
      "options": {
        "tags": [
          "Images"
        ],
        "summary": "Options Handler",
        "operationId": "options_handler_v1_images_generations_options",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Images"
        ],
        "summary": "Generate Image (v1)",
        "description": "Generate one or more images from a text prompt. Supports both synchronous and asynchronous modes.",
        "operationId": "image_generations_v1_images_generations_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Api-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageGenerationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid query parameters or body format.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Key does not have permission or is disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity - Request body validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error - Internal error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway - Provider error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions/models": {
      "get": {
        "summary": "Get Chat Models",
        "operationId": "get_chat_models_v1_chat_completions_models_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountActivityItem": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model",
            "description": "The ID of the model used."
          },
          "cost": {
            "type": "number",
            "title": "Cost",
            "description": "The cost of the request in USD."
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "The ISO timestamp of the request."
          },
          "input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens",
            "description": "Number of input tokens consumed."
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens",
            "description": "Number of output tokens generated."
          },
          "cache_creation_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Creation Input Tokens",
            "description": "Tokens written to the prompt cache."
          },
          "cache_read_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Read Input Tokens",
            "description": "Tokens read from the prompt cache."
          }
        },
        "type": "object",
        "required": [
          "model",
          "cost",
          "created_at"
        ],
        "title": "AccountActivityItem"
      },
      "AccountActivityResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AccountActivityItem"
            },
            "type": "array",
            "title": "Data",
            "description": "List of request logs."
          },
          "limit": {
            "type": "integer",
            "title": "Limit",
            "description": "The limit parameter used."
          },
          "offset": {
            "type": "integer",
            "title": "Offset",
            "description": "The offset parameter used."
          }
        },
        "type": "object",
        "required": [
          "data",
          "limit",
          "offset"
        ],
        "title": "AccountActivityResponse"
      },
      "AccountAnalyticsResponse": {
        "properties": {
          "metrics": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metrics",
            "description": "Aggregated metrics for the account."
          },
          "series": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Series",
            "description": "Time series data points for analytics."
          }
        },
        "type": "object",
        "required": [
          "metrics"
        ],
        "title": "AccountAnalyticsResponse"
      },
      "AccountBalanceResponse": {
        "properties": {
          "balance": {
            "type": "number",
            "title": "Balance",
            "description": "The current credit balance of the account in USD."
          }
        },
        "type": "object",
        "required": [
          "balance"
        ],
        "title": "AccountBalanceResponse"
      },
      "AccountKeyDeleteResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Success message.",
            "default": "API key successfully deleted."
          }
        },
        "type": "object",
        "title": "AccountKeyDeleteResponse"
      },
      "AccountKeyDetailResponse": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccountKeyItem",
            "description": "The detailed API key object."
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "AccountKeyDetailResponse"
      },
      "AccountKeyItem": {
        "properties": {
          "api_key_id": {
            "type": "integer",
            "title": "Api Key Id",
            "description": "The unique database ID of the API key."
          },
          "key": {
            "type": "string",
            "title": "Key",
            "description": "The masked key value (e.g. rw-abc...xyz)."
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label",
            "description": "A human-readable label for the key."
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Daily Limit",
            "description": "The maximum requests/cost allowed per day."
          },
          "minute_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minute Limit",
            "description": "The maximum requests allowed per minute."
          },
          "balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Balance",
            "description": "Pre-allocated balance attached to the key."
          },
          "usage_today": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usage Today",
            "description": "The amount spent/used today in USD."
          },
          "usage_minute": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Usage Minute",
            "description": "The number of requests in the current minute."
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "The creation timestamp."
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At",
            "description": "The last usage timestamp."
          },
          "use_subs_first": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Use Subs First",
            "description": "Whether subscription quota is consumed first."
          },
          "fallback_to_payg": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback To Payg",
            "description": "Whether key falls back to PAYG credit."
          }
        },
        "type": "object",
        "required": [
          "api_key_id",
          "key",
          "created_at"
        ],
        "title": "AccountKeyItem"
      },
      "AccountKeysListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AccountKeyItem"
            },
            "type": "array",
            "title": "Data",
            "description": "A list of API keys."
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "AccountKeysListResponse"
      },
      "AllowedToolChoice": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type37"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/FunctionToolChoice"
            },
            "type": "array",
            "title": "Tools"
          },
          "mode": {
            "$ref": "#/components/schemas/ToolChoiceValueEnum"
          }
        },
        "type": "object",
        "required": [
          "type",
          "tools",
          "mode"
        ],
        "title": "AllowedToolChoice"
      },
      "Annotation": {
        "$ref": "#/components/schemas/UrlCitationBody",
        "title": "Annotation"
      },
      "AssistantMessageItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "type": {
            "type": "string",
            "const": "message",
            "title": "Type",
            "default": "message"
          },
          "role": {
            "$ref": "#/components/schemas/Role3",
            "description": "The role of the message author. Always `assistant`."
          },
          "content": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Content3"
                },
                "type": "array"
              },
              {
                "type": "string",
                "maxLength": 10485760
              }
            ],
            "title": "Content",
            "description": "The message content, as an array of content parts."
          },
          "phase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Phase"
              },
              {
                "type": "null"
              }
            ],
            "description": "Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "AssistantMessageItemParam"
      },
      "CacheCreation": {
        "properties": {
          "ephemeral_5m_input_tokens": {
            "type": "integer",
            "title": "Ephemeral 5M Input Tokens",
            "default": 0
          },
          "ephemeral_1h_input_tokens": {
            "type": "integer",
            "title": "Ephemeral 1H Input Tokens",
            "default": 0
          }
        },
        "type": "object",
        "title": "CacheCreation"
      },
      "ChatCompletionChoice": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index",
            "description": "The index of the choice in the list of choices."
          },
          "message": {
            "$ref": "#/components/schemas/ChatCompletionMessage",
            "description": "A chat completion message generated by the model."
          },
          "finish_reason": {
            "type": "string",
            "title": "Finish Reason",
            "description": "The reason the model stopped generating tokens."
          },
          "logprobs": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logprobs",
            "description": "Log probability information for the choice, if requested."
          }
        },
        "type": "object",
        "required": [
          "index",
          "message",
          "finish_reason"
        ],
        "title": "ChatCompletionChoice"
      },
      "ChatCompletionMessage": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role",
            "description": "The role of the author of this message."
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content",
            "description": "The contents of the message."
          },
          "refusal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refusal",
            "description": "The refusal message generated by the model, if any."
          },
          "tool_calls": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Calls",
            "description": "The tool calls generated by the model, if any."
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "ChatCompletionMessage"
      },
      "ChatCompletionResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "A unique identifier for the chat completion."
          },
          "object": {
            "type": "string",
            "const": "chat.completion",
            "title": "Object",
            "description": "The object type, which is always chat.completion.",
            "default": "chat.completion"
          },
          "created": {
            "type": "integer",
            "title": "Created",
            "description": "The Unix timestamp (in seconds) of when the chat completion was created."
          },
          "model": {
            "type": "string",
            "title": "Model",
            "description": "The model used for the chat completion."
          },
          "choices": {
            "items": {
              "$ref": "#/components/schemas/ChatCompletionChoice"
            },
            "type": "array",
            "title": "Choices",
            "description": "A list of chat completion choices."
          },
          "usage": {
            "$ref": "#/components/schemas/ChatCompletionUsage",
            "description": "Usage statistics for the completion request."
          },
          "system_fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Fingerprint",
            "description": "This fingerprint represents the backend configuration that the model runs with."
          }
        },
        "type": "object",
        "required": [
          "id",
          "created",
          "model",
          "choices",
          "usage"
        ],
        "title": "ChatCompletionResponse"
      },
      "ChatCompletionUsage": {
        "properties": {
          "prompt_tokens": {
            "type": "integer",
            "title": "Prompt Tokens",
            "description": "Number of tokens in the prompt."
          },
          "completion_tokens": {
            "type": "integer",
            "title": "Completion Tokens",
            "description": "Number of tokens in the generated completion."
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens",
            "description": "Total number of tokens used in the request (prompt + completion)."
          }
        },
        "type": "object",
        "required": [
          "prompt_tokens",
          "completion_tokens",
          "total_tokens"
        ],
        "title": "ChatCompletionUsage"
      },
      "ChatCompletions": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            },
            "type": "array",
            "minItems": 1,
            "title": "Messages"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Tool-Input"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              }
            ],
            "title": "Tool Choice"
          },
          "functions": {
            "items": {},
            "type": "array",
            "title": "Functions"
          },
          "function_call": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              }
            ],
            "title": "Function Call"
          },
          "response_format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/schemas__openai__TextResponseFormat"
              },
              {
                "$ref": "#/components/schemas/JsonObjectResponseFormat-Input"
              },
              {
                "$ref": "#/components/schemas/JsonSchemaResponseFormat-Input"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "stream": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stream",
            "default": false
          },
          "stream_options": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StreamOptions"
              },
              {
                "type": "null"
              }
            ]
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop"
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "max_completion_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Completion Tokens"
          },
          "presence_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": -2
              },
              {
                "type": "null"
              }
            ],
            "title": "Presence Penalty"
          },
          "frequency_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": -2
              },
              {
                "type": "null"
              }
            ],
            "title": "Frequency Penalty"
          },
          "logit_bias": {
            "additionalProperties": true,
            "type": "object",
            "title": "Logit Bias"
          },
          "reasoning_effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffort"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "title": "ChatCompletions"
      },
      "ChatMessage": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TextContent-Input"
                    },
                    {
                      "$ref": "#/components/schemas/ImageContent"
                    },
                    {
                      "$ref": "#/components/schemas/FileContent"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "tool_call_id": {
            "type": "string",
            "title": "Tool Call Id"
          },
          "tool_calls": {
            "items": {},
            "type": "array",
            "title": "Tool Calls"
          },
          "function_call": {
            "additionalProperties": true,
            "type": "object",
            "title": "Function Call"
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "ChatMessage"
      },
      "CoinbaseCreatePayment": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "amount": {
            "type": "number",
            "title": "Amount"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "currency",
          "amount"
        ],
        "title": "CoinbaseCreatePayment"
      },
      "CompactionBody": {
        "properties": {
          "type": {
            "type": "string",
            "const": "compaction",
            "title": "Type",
            "description": "The type of the item. Always `compaction`."
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The unique ID of the compaction item."
          },
          "encrypted_content": {
            "type": "string",
            "title": "Encrypted Content",
            "description": "The encrypted content that was produced by compaction."
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By",
            "description": "The identifier of the actor that created the item."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "encrypted_content"
        ],
        "title": "CompactionBody"
      },
      "CompactionSummaryItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "type": {
            "type": "string",
            "const": "compaction",
            "title": "Type",
            "description": "The type of the item. Always `compaction`."
          },
          "encrypted_content": {
            "type": "string",
            "maxLength": 10485760,
            "title": "Encrypted Content",
            "description": "The encrypted content of the compaction summary."
          }
        },
        "type": "object",
        "required": [
          "type",
          "encrypted_content"
        ],
        "title": "CompactionSummaryItemParam"
      },
      "Content": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InputTextContentParam"
          },
          {
            "$ref": "#/components/schemas/InputImageContentParamAutoParam"
          },
          {
            "$ref": "#/components/schemas/InputFileContentParam"
          }
        ],
        "title": "Content"
      },
      "Content1": {
        "$ref": "#/components/schemas/InputTextContentParam",
        "title": "Content1"
      },
      "Content3": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/OutputTextContentParam"
          },
          {
            "$ref": "#/components/schemas/RefusalContentParam"
          }
        ],
        "title": "Content3"
      },
      "Content4": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InputTextContent"
          },
          {
            "$ref": "#/components/schemas/OutputTextContent"
          },
          {
            "$ref": "#/components/schemas/TextContent-Output"
          },
          {
            "$ref": "#/components/schemas/SummaryTextContent"
          },
          {
            "$ref": "#/components/schemas/ReasoningTextContent"
          },
          {
            "$ref": "#/components/schemas/RefusalContent"
          },
          {
            "$ref": "#/components/schemas/InputImageContent"
          },
          {
            "$ref": "#/components/schemas/InputFileContent"
          },
          {
            "$ref": "#/components/schemas/InputVideoContent"
          }
        ],
        "title": "Content4"
      },
      "Content5": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InputTextContent"
          },
          {
            "$ref": "#/components/schemas/OutputTextContent"
          },
          {
            "$ref": "#/components/schemas/TextContent-Output"
          },
          {
            "$ref": "#/components/schemas/SummaryTextContent"
          },
          {
            "$ref": "#/components/schemas/ReasoningTextContent"
          },
          {
            "$ref": "#/components/schemas/RefusalContent"
          },
          {
            "$ref": "#/components/schemas/InputImageContent"
          },
          {
            "$ref": "#/components/schemas/InputFileContent"
          }
        ],
        "title": "Content5"
      },
      "CountTokensRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/Message-Input"
            },
            "type": "array",
            "title": "Messages"
          },
          "system": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TextBlock"
                    },
                    {
                      "$ref": "#/components/schemas/ImageBlock"
                    },
                    {
                      "$ref": "#/components/schemas/DocumentBlock"
                    },
                    {
                      "$ref": "#/components/schemas/ToolUseBlock"
                    },
                    {
                      "$ref": "#/components/schemas/ToolResultBlock"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "System"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ToolDefinition"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "thinking": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ThinkingConfigEnabled"
                  },
                  {
                    "$ref": "#/components/schemas/ThinkingConfigDisabled"
                  },
                  {
                    "$ref": "#/components/schemas/ThinkingConfigAdaptive"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "adaptive": "#/components/schemas/ThinkingConfigAdaptive",
                    "disabled": "#/components/schemas/ThinkingConfigDisabled",
                    "enabled": "#/components/schemas/ThinkingConfigEnabled"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Thinking"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "title": "CountTokensRequest"
      },
      "CreateKeyRequest": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Daily Limit"
          },
          "minute_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minute Limit"
          },
          "allowed_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Models"
          },
          "balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Balance"
          },
          "use_subs_first": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Use Subs First"
          },
          "fallback_to_payg": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback To Payg"
          }
        },
        "type": "object",
        "title": "CreateKeyRequest"
      },
      "CreatePresetRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name"
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "title": "Model"
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "frequency_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": -2
              },
              {
                "type": "null"
              }
            ],
            "title": "Frequency Penalty"
          },
          "presence_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": -2
              },
              {
                "type": "null"
              }
            ],
            "title": "Presence Penalty"
          },
          "top_k": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top K"
          },
          "stop_sequences": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Sequences"
          },
          "response_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format"
          },
          "locked": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locked",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name",
          "model"
        ],
        "title": "CreatePresetRequest"
      },
      "CreateResponseBody": {
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "input": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ItemParam"
                },
                "type": "array"
              },
              {
                "type": "string",
                "maxLength": 10485760
              },
              {
                "type": "null"
              }
            ],
            "title": "Input"
          },
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Response Id"
          },
          "include": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/IncludeEnum"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ResponsesToolParam"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "tool_choice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolChoice"
              },
              {
                "type": "null"
              }
            ]
          },
          "text": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TextParam"
              },
              {
                "type": "null"
              }
            ]
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "presence_penalty": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Presence Penalty"
          },
          "frequency_penalty": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frequency Penalty"
          },
          "parallel_tool_calls": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallel Tool Calls"
          },
          "stream": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stream",
            "description": "Whether to stream response events as server-sent events."
          },
          "background": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Background",
            "description": "Whether to run the request in the background and return immediately."
          },
          "max_output_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 16
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Tokens"
          },
          "max_tool_calls": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tool Calls"
          },
          "reasoning": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningParam"
              },
              {
                "type": "null"
              }
            ]
          },
          "prompt_cache_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Cache Key"
          },
          "truncation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TruncationEnum"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "store": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Store",
            "description": "Whether to store the response so it can be retrieved later."
          },
          "service_tier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ServiceTierEnum"
              },
              {
                "type": "null"
              }
            ]
          },
          "top_logprobs": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 20,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Logprobs"
          }
        },
        "type": "object",
        "title": "CreateResponseBody"
      },
      "DeployListResponse": {
        "properties": {
          "deployments": {
            "items": {
              "$ref": "#/components/schemas/DeploymentInfo"
            },
            "type": "array",
            "title": "Deployments",
            "description": "List of the user's deployments"
          }
        },
        "type": "object",
        "required": [
          "deployments"
        ],
        "title": "DeployListResponse",
        "description": "Response listing a user's deployments."
      },
      "DeployRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model",
            "description": "HuggingFace model URL or repo ID"
          },
          "quant": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quant",
            "description": "Optional GGUF quant format (e.g. 'Q4_K_M', 'Q8_0') from /analyze. When set, the matching .gguf file is downloaded from a community GGUF repo and served by vLLM's GGUF backend."
          },
          "gpu_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gpu Name",
            "description": "Override GPU selection; if None, auto-select based on model analysis"
          },
          "num_gpus": {
            "type": "integer",
            "title": "Num Gpus",
            "description": "Number of GPUs to rent",
            "default": 1
          },
          "max_model_len": {
            "type": "integer",
            "title": "Max Model Len",
            "description": "Max context length for vLLM",
            "default": 4096
          },
          "disk_gb": {
            "type": "integer",
            "title": "Disk Gb",
            "description": "Disk space in GB",
            "default": 50
          },
          "hf_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hf Token",
            "description": "HuggingFace token for accessing gated models"
          },
          "vast_api_key": {
            "type": "string",
            "title": "Vast Api Key",
            "description": "User's Vast.ai API key"
          }
        },
        "type": "object",
        "required": [
          "model",
          "vast_api_key"
        ],
        "title": "DeployRequest",
        "description": "POST body for creating a new model deployment."
      },
      "DeployResponse": {
        "properties": {
          "deployment_id": {
            "type": "string",
            "title": "Deployment Id",
            "description": "The deployment ID to poll for status"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Initial deployment status",
            "default": "queued"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Human-readable message about the deployment"
          }
        },
        "type": "object",
        "required": [
          "deployment_id",
          "message"
        ],
        "title": "DeployResponse",
        "description": "Immediate response returned when a deployment is created."
      },
      "DeploymentInfo": {
        "properties": {
          "deployment_id": {
            "type": "string",
            "title": "Deployment Id",
            "description": "Unique deployment identifier"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Current status: queued, searching, creating, provisioning, downloading, running, failed, or destroyed"
          },
          "model": {
            "type": "string",
            "title": "Model",
            "description": "The model repo ID being deployed"
          },
          "quant": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quant",
            "description": "GGUF quant format being served, if any"
          },
          "gpu_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gpu Name",
            "description": "GPU that was selected or rented"
          },
          "num_gpus": {
            "type": "integer",
            "title": "Num Gpus",
            "description": "Number of GPUs allocated",
            "default": 1
          },
          "instance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instance Id",
            "description": "Vast.ai instance ID once created"
          },
          "api_endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Endpoint",
            "description": "The vLLM API endpoint URL once the deployment is running"
          },
          "api_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key",
            "description": "Generated vLLM API key for authenticating with the endpoint"
          },
          "price_per_hour": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Per Hour",
            "description": "Cost in $/hr for the rented instance"
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "ISO timestamp of when the deployment was created"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error",
            "description": "Error message if the deployment failed"
          }
        },
        "type": "object",
        "required": [
          "deployment_id",
          "status",
          "model",
          "created_at"
        ],
        "title": "DeploymentInfo",
        "description": "Response containing deployment status and details."
      },
      "DeveloperMessageItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "type": {
            "type": "string",
            "const": "message",
            "title": "Type",
            "default": "message"
          },
          "role": {
            "$ref": "#/components/schemas/Role2",
            "description": "The message role. Always `developer`."
          },
          "content": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Content1"
                },
                "type": "array"
              },
              {
                "type": "string",
                "maxLength": 10485760
              }
            ],
            "title": "Content",
            "description": "The message content, as an array of content parts."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "DeveloperMessageItemParam"
      },
      "DocumentBlock": {
        "properties": {
          "type": {
            "type": "string",
            "const": "document",
            "title": "Type",
            "default": "document"
          },
          "source": {
            "$ref": "#/components/schemas/DocumentSource"
          }
        },
        "type": "object",
        "required": [
          "source"
        ],
        "title": "DocumentBlock"
      },
      "DocumentSource": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "base64",
              "url"
            ],
            "title": "Type"
          },
          "media_type": {
            "type": "string",
            "const": "application/pdf",
            "title": "Media Type"
          },
          "data": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "type",
          "media_type"
        ],
        "title": "DocumentSource"
      },
      "Error1": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code",
            "description": "A machine-readable error code that was returned."
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "A human-readable description of the error that was returned."
          }
        },
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "Error1"
      },
      "ErrorDetail": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message",
            "description": "A human-readable description of the error."
          },
          "type": {
            "type": "string",
            "title": "Type",
            "description": "The type of error returned (e.g. invalid_request_error, rate_limit_error)."
          },
          "param": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Param",
            "description": "The parameter that caused the error, if applicable."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "A short code identifier for the error type (e.g. invalid_request, rate_limit)."
          },
          "status_code": {
            "type": "integer",
            "title": "Status Code",
            "description": "The HTTP status code."
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Unique error or trace ID associated with this request."
          },
          "tip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tip",
            "description": "An optional troubleshooting tip or resolution suggestion."
          },
          "docs": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Docs",
            "description": "Link to the documentation related to this error.",
            "default": "https://docs.routeway.ai"
          },
          "support": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Support",
            "description": "Link to support for further help.",
            "default": "https://discord.gg/RjX2CpdPpd"
          },
          "community": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Community",
            "description": "Links to community resources like Discord and Twitter."
          }
        },
        "type": "object",
        "required": [
          "message",
          "type",
          "status_code",
          "id"
        ],
        "title": "ErrorDetail"
      },
      "ErrorResponse": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        },
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ErrorResponse"
      },
      "FileContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "file",
            "title": "Type"
          },
          "file": {
            "$ref": "#/components/schemas/FilePayload"
          }
        },
        "type": "object",
        "required": [
          "type",
          "file"
        ],
        "title": "FileContent"
      },
      "FilePayload": {
        "properties": {
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "file_data": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "File Data"
          }
        },
        "type": "object",
        "required": [
          "filename",
          "file_data"
        ],
        "title": "FilePayload"
      },
      "FunctionCall": {
        "properties": {
          "type": {
            "type": "string",
            "const": "function_call",
            "title": "Type",
            "description": "The type of the item. Always `function_call`."
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The unique ID of the function call item."
          },
          "call_id": {
            "type": "string",
            "title": "Call Id",
            "description": "The unique ID of the function tool call that was generated."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the function that was called."
          },
          "arguments": {
            "type": "string",
            "title": "Arguments",
            "description": "The arguments JSON string that was generated."
          },
          "status": {
            "$ref": "#/components/schemas/FunctionCallStatus"
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "name",
          "arguments",
          "status"
        ],
        "title": "FunctionCall"
      },
      "FunctionCallItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Call Id",
            "description": "The unique ID of the function tool call generated by the model."
          },
          "type": {
            "type": "string",
            "const": "function_call",
            "title": "Type",
            "description": "The item type. Always `function_call`."
          },
          "name": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_-]+$",
            "title": "Name",
            "description": "The name of the function to call."
          },
          "arguments": {
            "type": "string",
            "title": "Arguments",
            "description": "The function arguments as a JSON string."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionCallStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "name",
          "arguments"
        ],
        "title": "FunctionCallItemParam"
      },
      "FunctionCallOutput": {
        "properties": {
          "type": {
            "type": "string",
            "const": "function_call_output",
            "title": "Type",
            "description": "The type of the function tool call output. Always `function_call_output`."
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The unique ID of the function tool call output. Populated when this item is returned via API."
          },
          "call_id": {
            "type": "string",
            "title": "Call Id",
            "description": "The unique ID of the function tool call generated by the model."
          },
          "output": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "$ref": "#/components/schemas/Output1"
                },
                "type": "array"
              }
            ],
            "title": "Output"
          },
          "status": {
            "$ref": "#/components/schemas/FunctionCallOutputStatusEnum"
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "call_id",
          "output",
          "status"
        ],
        "title": "FunctionCallOutput"
      },
      "FunctionCallOutputItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "call_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Call Id",
            "description": "The unique ID of the function tool call generated by the model."
          },
          "type": {
            "type": "string",
            "const": "function_call_output",
            "title": "Type",
            "description": "The type of the function tool call output. Always `function_call_output`."
          },
          "output": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10485760
              },
              {
                "items": {
                  "$ref": "#/components/schemas/Output"
                },
                "type": "array"
              }
            ],
            "title": "Output",
            "description": "Text, image, or file output of the function tool call."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionCallStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "call_id",
          "type",
          "output"
        ],
        "title": "FunctionCallOutputItemParam"
      },
      "FunctionCallOutputStatusEnum": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ],
        "title": "FunctionCallOutputStatusEnum"
      },
      "FunctionCallStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ],
        "title": "FunctionCallStatus"
      },
      "FunctionDefinition": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Strict"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "FunctionDefinition"
      },
      "FunctionTool": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type35",
            "description": "The type of the function tool. Always `function`."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the function to call."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Strict"
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "description",
          "parameters",
          "strict"
        ],
        "title": "FunctionTool"
      },
      "FunctionToolChoice": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type35"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "FunctionToolChoice"
      },
      "FunctionToolParam": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_-]+$",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Strict"
          },
          "type": {
            "$ref": "#/components/schemas/Type16"
          }
        },
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "title": "FunctionToolParam"
      },
      "GpuSuggestion": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "GPU name (e.g. 'RTX 4090' or '2x A100 80GB')"
          },
          "vram_gb": {
            "type": "number",
            "title": "Vram Gb",
            "description": "Total VRAM available in GB"
          },
          "architecture": {
            "type": "string",
            "title": "Architecture",
            "description": "GPU architecture (e.g. 'Ada Lovelace', 'Ampere')"
          },
          "note": {
            "type": "string",
            "title": "Note",
            "description": "Additional info about the recommendation"
          }
        },
        "type": "object",
        "required": [
          "name",
          "vram_gb",
          "architecture",
          "note"
        ],
        "title": "GpuSuggestion",
        "description": "A suggested GPU configuration for running the model."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ImageBlock": {
        "properties": {
          "type": {
            "type": "string",
            "const": "image",
            "title": "Type",
            "default": "image"
          },
          "source": {
            "$ref": "#/components/schemas/ImageSource"
          }
        },
        "type": "object",
        "required": [
          "source"
        ],
        "title": "ImageBlock"
      },
      "ImageContent": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type"
          },
          "image_url": {
            "$ref": "#/components/schemas/ImageUrl"
          }
        },
        "type": "object",
        "required": [
          "type",
          "image_url"
        ],
        "title": "ImageContent"
      },
      "ImageData": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url",
            "description": "Image URL (when response_format is 'url')"
          },
          "b64_json": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "B64 Json",
            "description": "Base64-encoded image (when response_format is 'b64_json')"
          },
          "revised_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revised Prompt",
            "description": "The actual prompt used after any modifications"
          }
        },
        "type": "object",
        "title": "ImageData"
      },
      "ImageDetail": {
        "type": "string",
        "enum": [
          "low",
          "high",
          "auto"
        ],
        "title": "ImageDetail"
      },
      "ImageEditRequest": {
        "properties": {
          "images": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Images",
            "description": "List of base64-encoded images to edit (PNG, < 4MB each)"
          },
          "mask": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mask",
            "description": "Base64-encoded mask image (PNG, < 4MB, same dimensions as image)"
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "A text description of the desired image(s)"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model",
            "description": "The model to use for image editing"
          },
          "n": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10,
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "N",
            "description": "Number of images to generate (1-10)",
            "default": 1
          },
          "size": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "256x256",
                  "512x512",
                  "1024x1024"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Size",
            "description": "Size of the generated images",
            "default": "1024x1024"
          },
          "response_format": {
            "type": "string",
            "enum": [
              "url",
              "b64_json"
            ],
            "title": "Response Format",
            "description": "Format of the generated images",
            "default": "url"
          },
          "strength": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Strength",
            "description": "How much to transform the image (0-1)"
          },
          "guidance_scale": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 20,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Guidance Scale",
            "description": "Guidance scale for generation"
          },
          "num_inference_steps": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100,
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Num Inference Steps",
            "description": "Number of inference steps"
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed",
            "description": "Random seed for reproducibility"
          },
          "kontext_max_mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kontext Max Mode",
            "description": "Kontext max mode setting"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "images",
          "prompt"
        ],
        "title": "ImageEditRequest"
      },
      "ImageGenerationRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model",
            "description": "Image generation model (e.g., flux-1-schnell)"
          },
          "prompt": {
            "type": "string",
            "title": "Prompt",
            "description": "The text prompt for image generation"
          },
          "quality": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quality",
            "description": "Provider-specific quality preset"
          },
          "size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size",
            "description": "Target image resolution (e.g., 1024x1024)"
          },
          "n": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "N",
            "description": "Number of images to generate",
            "default": 1
          },
          "response_format": {
            "type": "string",
            "enum": [
              "url",
              "b64_json"
            ],
            "title": "Response Format",
            "description": "Output format per image",
            "default": "url"
          },
          "steps": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Steps",
            "description": "Number of diffusion steps"
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed",
            "description": "Random seed for reproducibility"
          },
          "negative_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Negative Prompt",
            "description": "Negative prompt for image generation"
          },
          "guidance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guidance",
            "description": "Guidance scale for image generation"
          },
          "async": {
            "type": "boolean",
            "title": "Async",
            "description": "Queue the request and return a task ID instead of waiting for the image result",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "model",
          "prompt"
        ],
        "title": "ImageGenerationRequest"
      },
      "ImageGenerationResponse": {
        "properties": {
          "created": {
            "type": "integer",
            "title": "Created",
            "description": "Unix timestamp of request creation"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ImageData"
            },
            "type": "array",
            "title": "Data",
            "description": "Array of generated image objects"
          }
        },
        "type": "object",
        "required": [
          "created",
          "data"
        ],
        "title": "ImageGenerationResponse"
      },
      "ImageResult": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "image": {
            "type": "string",
            "title": "Image"
          },
          "thumbnail": {
            "type": "string",
            "title": "Thumbnail"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "source": {
            "type": "string",
            "title": "Source"
          }
        },
        "type": "object",
        "required": [
          "title",
          "image",
          "thumbnail",
          "url",
          "source"
        ],
        "title": "ImageResult"
      },
      "ImageSource": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "base64",
              "url"
            ],
            "title": "Type"
          },
          "media_type": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "image/gif",
              "image/webp"
            ],
            "title": "Media Type"
          },
          "data": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "type",
          "media_type"
        ],
        "title": "ImageSource"
      },
      "ImageUrl": {
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Url"
          },
          "detail": {
            "type": "string",
            "enum": [
              "low",
              "high",
              "auto"
            ],
            "title": "Detail",
            "default": "low"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "ImageUrl"
      },
      "IncludeEnum": {
        "type": "string",
        "enum": [
          "reasoning.encrypted_content",
          "message.output_text.logprobs"
        ],
        "title": "IncludeEnum"
      },
      "IncompleteDetails": {
        "properties": {
          "reason": {
            "type": "string",
            "title": "Reason",
            "description": "The reason the response could not be completed."
          }
        },
        "type": "object",
        "required": [
          "reason"
        ],
        "title": "IncompleteDetails"
      },
      "InputFileContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "input_file",
            "title": "Type",
            "description": "The type of the input item. Always `input_file`."
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename",
            "description": "The name of the file to be sent to the model."
          },
          "file_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Url",
            "description": "The URL of the file to be sent to the model."
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "InputFileContent"
      },
      "InputFileContentParam": {
        "properties": {
          "type": {
            "type": "string",
            "const": "input_file",
            "title": "Type",
            "description": "The type of the input item. Always `input_file`."
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "file_data": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 33554432
              },
              {
                "type": "null"
              }
            ],
            "title": "File Data"
          },
          "file_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Url"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "InputFileContentParam"
      },
      "InputImageContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "input_image",
            "title": "Type",
            "description": "The type of the input item. Always `input_image`."
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "detail": {
            "$ref": "#/components/schemas/ImageDetail"
          }
        },
        "type": "object",
        "required": [
          "type",
          "image_url",
          "detail"
        ],
        "title": "InputImageContent"
      },
      "InputImageContentParamAutoParam": {
        "properties": {
          "type": {
            "type": "string",
            "const": "input_image",
            "title": "Type",
            "description": "The type of the input item. Always `input_image`."
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20971520
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Url"
          },
          "detail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ImageDetail"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "InputImageContentParamAutoParam"
      },
      "InputTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "input_text",
            "title": "Type",
            "description": "The type of the input item. Always `input_text`."
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "The text input to the model."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "InputTextContent"
      },
      "InputTextContentParam": {
        "properties": {
          "type": {
            "type": "string",
            "const": "input_text",
            "title": "Type",
            "description": "The type of the input item. Always `input_text`."
          },
          "text": {
            "type": "string",
            "maxLength": 10485760,
            "title": "Text",
            "description": "The text input to the model."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "InputTextContentParam"
      },
      "InputTokensDetails": {
        "properties": {
          "cached_tokens": {
            "type": "integer",
            "title": "Cached Tokens",
            "description": "The number of input tokens that were served from cache."
          }
        },
        "type": "object",
        "required": [
          "cached_tokens"
        ],
        "title": "InputTokensDetails"
      },
      "InputVideoContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "input_video",
            "title": "Type",
            "description": "The type of the input content. Always `input_video`."
          },
          "video_url": {
            "type": "string",
            "title": "Video Url",
            "description": "A base64 or remote url that resolves to a video file."
          }
        },
        "type": "object",
        "required": [
          "type",
          "video_url"
        ],
        "title": "InputVideoContent"
      },
      "ItemField": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/Message-Output"
          },
          {
            "$ref": "#/components/schemas/FunctionCall"
          },
          {
            "$ref": "#/components/schemas/FunctionCallOutput"
          },
          {
            "$ref": "#/components/schemas/ReasoningBody"
          },
          {
            "$ref": "#/components/schemas/CompactionBody"
          }
        ],
        "title": "ItemField"
      },
      "ItemParam": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ItemReferenceParam"
          },
          {
            "$ref": "#/components/schemas/ReasoningItemParam"
          },
          {
            "$ref": "#/components/schemas/CompactionSummaryItemParam"
          },
          {
            "$ref": "#/components/schemas/UserMessageItemParam"
          },
          {
            "$ref": "#/components/schemas/SystemMessageItemParam"
          },
          {
            "$ref": "#/components/schemas/DeveloperMessageItemParam"
          },
          {
            "$ref": "#/components/schemas/AssistantMessageItemParam"
          },
          {
            "$ref": "#/components/schemas/FunctionCallItemParam"
          },
          {
            "$ref": "#/components/schemas/FunctionCallOutputItemParam"
          }
        ],
        "title": "ItemParam"
      },
      "ItemReferenceParam": {
        "properties": {
          "type": {
            "type": "string",
            "const": "item_reference",
            "title": "Type",
            "description": "The item type. Always `item_reference`."
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The ID of the item to reference."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id"
        ],
        "title": "ItemReferenceParam"
      },
      "JsonObjectResponseFormat-Input": {
        "properties": {
          "type": {
            "type": "string",
            "const": "json_object",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "JsonObjectResponseFormat"
      },
      "JsonObjectResponseFormat-Output": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type39"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "JsonObjectResponseFormat"
      },
      "JsonSchemaConfig": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schema"
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Strict"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "JsonSchemaConfig"
      },
      "JsonSchemaResponseFormat-Input": {
        "properties": {
          "type": {
            "type": "string",
            "const": "json_schema",
            "title": "Type"
          },
          "json_schema": {
            "$ref": "#/components/schemas/JsonSchemaConfig"
          }
        },
        "type": "object",
        "required": [
          "type",
          "json_schema"
        ],
        "title": "JsonSchemaResponseFormat"
      },
      "JsonSchemaResponseFormat-Output": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type40"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "schema": {
            "type": "null",
            "title": "Schema"
          },
          "strict": {
            "type": "boolean",
            "title": "Strict"
          }
        },
        "type": "object",
        "required": [
          "type",
          "name",
          "description",
          "schema",
          "strict"
        ],
        "title": "JsonSchemaResponseFormat"
      },
      "JsonSchemaResponseFormatParam": {
        "properties": {
          "type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Type66"
              },
              {
                "type": "null"
              }
            ],
            "description": "The type of response format being defined. Always `json_schema`."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"
          },
          "schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "JSON schema",
            "description": "The schema for the response format, described as a JSON Schema object.\n"
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Strict"
          }
        },
        "type": "object",
        "title": "JsonSchemaResponseFormatParam"
      },
      "LogProb": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          },
          "logprob": {
            "type": "number",
            "title": "Logprob"
          },
          "bytes": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Bytes"
          },
          "top_logprobs": {
            "items": {
              "$ref": "#/components/schemas/TopLogProb"
            },
            "type": "array",
            "title": "Top Logprobs"
          }
        },
        "type": "object",
        "required": [
          "token",
          "logprob",
          "bytes",
          "top_logprobs"
        ],
        "title": "LogProb"
      },
      "Message-Input": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "user",
              "assistant"
            ],
            "title": "Role"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TextBlock"
                    },
                    {
                      "$ref": "#/components/schemas/ImageBlock"
                    },
                    {
                      "$ref": "#/components/schemas/DocumentBlock"
                    },
                    {
                      "$ref": "#/components/schemas/ToolUseBlock"
                    },
                    {
                      "$ref": "#/components/schemas/ToolResultBlock"
                    }
                  ]
                },
                "type": "array"
              }
            ],
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "Message"
      },
      "Message-Output": {
        "properties": {
          "type": {
            "type": "string",
            "const": "message",
            "title": "Type",
            "description": "The type of the message. Always set to `message`."
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The unique ID of the message."
          },
          "status": {
            "$ref": "#/components/schemas/MessageStatus"
          },
          "role": {
            "$ref": "#/components/schemas/MessageRole"
          },
          "content": {
            "items": {
              "$ref": "#/components/schemas/Content4"
            },
            "type": "array",
            "title": "Content",
            "description": "The content of the message"
          },
          "phase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Phase"
              },
              {
                "type": "null"
              }
            ],
            "description": "Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "status",
          "role",
          "content"
        ],
        "title": "Message"
      },
      "MessageRole": {
        "type": "string",
        "enum": [
          "user",
          "assistant",
          "system",
          "developer"
        ],
        "title": "MessageRole"
      },
      "MessageStatus": {
        "type": "string",
        "enum": [
          "in_progress",
          "completed",
          "incomplete"
        ],
        "title": "MessageStatus"
      },
      "MessagesRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "max_tokens": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Max Tokens"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/Message-Input"
            },
            "type": "array",
            "title": "Messages"
          },
          "system": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TextBlock"
                    },
                    {
                      "$ref": "#/components/schemas/ImageBlock"
                    },
                    {
                      "$ref": "#/components/schemas/DocumentBlock"
                    },
                    {
                      "$ref": "#/components/schemas/ToolUseBlock"
                    },
                    {
                      "$ref": "#/components/schemas/ToolResultBlock"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "System"
          },
          "stream": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stream",
            "default": false
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "top_k": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top K"
          },
          "stop_sequences": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Sequences"
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ToolDefinition"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools"
          },
          "tool_choice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolChoiceAuto"
              },
              {
                "$ref": "#/components/schemas/ToolChoiceNone"
              },
              {
                "$ref": "#/components/schemas/ToolChoiceAny"
              },
              {
                "$ref": "#/components/schemas/ToolChoiceSpecific"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Choice"
          },
          "disable_parallel_tool_use": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disable Parallel Tool Use"
          },
          "thinking": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ThinkingConfigEnabled"
                  },
                  {
                    "$ref": "#/components/schemas/ThinkingConfigDisabled"
                  },
                  {
                    "$ref": "#/components/schemas/ThinkingConfigAdaptive"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "adaptive": "#/components/schemas/ThinkingConfigAdaptive",
                    "disabled": "#/components/schemas/ThinkingConfigDisabled",
                    "enabled": "#/components/schemas/ThinkingConfigEnabled"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "title": "Thinking"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "type": "object",
        "required": [
          "model",
          "max_tokens",
          "messages"
        ],
        "title": "MessagesRequest"
      },
      "MessagesResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "const": "message",
            "title": "Type",
            "default": "message"
          },
          "role": {
            "type": "string",
            "const": "assistant",
            "title": "Role",
            "default": "assistant"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "content": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/TextBlock"
                },
                {
                  "$ref": "#/components/schemas/ImageBlock"
                },
                {
                  "$ref": "#/components/schemas/DocumentBlock"
                },
                {
                  "$ref": "#/components/schemas/ToolUseBlock"
                },
                {
                  "$ref": "#/components/schemas/ToolResultBlock"
                }
              ]
            },
            "type": "array",
            "title": "Content"
          },
          "stop_reason": {
            "type": "string",
            "enum": [
              "end_turn",
              "max_tokens",
              "stop_sequence",
              "tool_use",
              "content_filter"
            ],
            "title": "Stop Reason"
          },
          "stop_sequence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Sequence"
          },
          "usage": {
            "$ref": "#/components/schemas/schemas__anthropic__Usage"
          }
        },
        "type": "object",
        "required": [
          "id",
          "model",
          "content",
          "stop_reason",
          "usage"
        ],
        "title": "MessagesResponse"
      },
      "ModelAnalyzeResponse": {
        "properties": {
          "repo_id": {
            "type": "string",
            "title": "Repo Id",
            "description": "Resolved HuggingFace repo ID"
          },
          "model_size_gb": {
            "type": "number",
            "title": "Model Size Gb",
            "description": "Base model weight size in GB"
          },
          "precision": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Precision",
            "description": "Model's native precision/dtype (e.g. 'bfloat16')"
          },
          "is_gguf": {
            "type": "boolean",
            "title": "Is Gguf",
            "description": "Whether this is a GGUF quantized repository",
            "default": false
          },
          "suggested_gpu": {
            "$ref": "#/components/schemas/GpuSuggestion",
            "description": "Recommended GPU for the base model"
          },
          "quants": {
            "items": {
              "$ref": "#/components/schemas/QuantInfo"
            },
            "type": "array",
            "title": "Quants",
            "description": "Popular quantized variants with GPU suggestions"
          }
        },
        "type": "object",
        "required": [
          "repo_id",
          "model_size_gb",
          "suggested_gpu"
        ],
        "title": "ModelAnalyzeResponse",
        "description": "Response containing model analysis and GPU suggestions."
      },
      "NewsResult": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "source": {
            "type": "string",
            "title": "Source",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "title",
          "url",
          "description"
        ],
        "title": "NewsResult"
      },
      "Object": {
        "type": "string",
        "enum": [
          "response"
        ],
        "title": "Object"
      },
      "Output": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InputTextContentParam"
          },
          {
            "$ref": "#/components/schemas/InputImageContentParamAutoParam"
          },
          {
            "$ref": "#/components/schemas/InputFileContentParam"
          },
          {
            "$ref": "#/components/schemas/InputVideoContent"
          }
        ],
        "title": "Output"
      },
      "Output1": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InputTextContent"
          },
          {
            "$ref": "#/components/schemas/InputImageContent"
          },
          {
            "$ref": "#/components/schemas/InputFileContent"
          }
        ],
        "title": "Output1"
      },
      "OutputTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "output_text",
            "title": "Type",
            "description": "The type of the output text. Always `output_text`."
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "The text output from the model."
          },
          "annotations": {
            "items": {
              "$ref": "#/components/schemas/Annotation"
            },
            "type": "array",
            "title": "Annotations",
            "description": "The annotations of the text output."
          },
          "logprobs": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/LogProb"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logprobs"
          }
        },
        "type": "object",
        "required": [
          "type",
          "text",
          "annotations"
        ],
        "title": "OutputTextContent"
      },
      "OutputTextContentParam": {
        "properties": {
          "type": {
            "type": "string",
            "const": "output_text",
            "title": "Type",
            "description": "The content type. Always `output_text`."
          },
          "text": {
            "type": "string",
            "maxLength": 10485760,
            "title": "Text",
            "description": "The text content."
          },
          "annotations": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/UrlCitationParam"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annotations",
            "description": "Citations associated with the text content."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "OutputTextContentParam"
      },
      "OutputTokensDetails": {
        "properties": {
          "reasoning_tokens": {
            "type": "integer",
            "title": "Reasoning Tokens",
            "description": "The number of output tokens that were attributed to reasoning."
          }
        },
        "type": "object",
        "required": [
          "reasoning_tokens"
        ],
        "title": "OutputTokensDetails"
      },
      "Phase": {
        "type": "string",
        "enum": [
          "commentary",
          "final_answer"
        ],
        "title": "Phase"
      },
      "QuantInfo": {
        "properties": {
          "format": {
            "type": "string",
            "title": "Format",
            "description": "Quantization format (e.g. 'Q4_K_M', 'Q8_0')"
          },
          "size_gb": {
            "type": "number",
            "title": "Size Gb",
            "description": "Size of the quantized model in GB"
          },
          "is_estimated": {
            "type": "boolean",
            "title": "Is Estimated",
            "description": "Whether the size is estimated rather than actual",
            "default": false
          },
          "suggested_gpu": {
            "$ref": "#/components/schemas/GpuSuggestion",
            "description": "Suggested GPU for this quant"
          }
        },
        "type": "object",
        "required": [
          "format",
          "size_gb",
          "suggested_gpu"
        ],
        "title": "QuantInfo",
        "description": "Information about a quantized variant of the model."
      },
      "Reasoning": {
        "properties": {
          "effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffortEnum"
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningSummaryEnum"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "effort",
          "summary"
        ],
        "title": "Reasoning"
      },
      "ReasoningBody": {
        "properties": {
          "type": {
            "type": "string",
            "const": "reasoning",
            "title": "Type",
            "description": "The type of the item. Always `reasoning`."
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The unique ID of the reasoning item."
          },
          "content": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Content5"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content",
            "description": "The reasoning content that was generated."
          },
          "summary": {
            "items": {
              "$ref": "#/components/schemas/Summary"
            },
            "type": "array",
            "title": "Summary",
            "description": "The reasoning summary content that was generated."
          },
          "encrypted_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Content",
            "description": "The encrypted reasoning content that was generated."
          }
        },
        "type": "object",
        "required": [
          "type",
          "id",
          "summary"
        ],
        "title": "ReasoningBody"
      },
      "ReasoningEffort": {
        "type": "string",
        "enum": [
          "none",
          "minimal",
          "low",
          "medium",
          "high",
          "xhigh"
        ],
        "title": "ReasoningEffort"
      },
      "ReasoningEffortEnum": {
        "type": "string",
        "enum": [
          "none",
          "low",
          "medium",
          "high",
          "xhigh"
        ],
        "title": "ReasoningEffortEnum"
      },
      "ReasoningItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "type": {
            "type": "string",
            "const": "reasoning",
            "title": "Type",
            "description": "The item type. Always `reasoning`."
          },
          "summary": {
            "items": {
              "$ref": "#/components/schemas/ReasoningSummaryContentParam"
            },
            "type": "array",
            "title": "Summary",
            "description": "Reasoning summary content associated with this item."
          },
          "content": {
            "type": "null",
            "title": "Content"
          },
          "encrypted_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encrypted Content"
          }
        },
        "type": "object",
        "required": [
          "type",
          "summary"
        ],
        "title": "ReasoningItemParam"
      },
      "ReasoningParam": {
        "properties": {
          "effort": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningEffortEnum"
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningSummaryEnum"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "ReasoningParam"
      },
      "ReasoningSummaryContentParam": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type1",
            "description": "The content type. Always `summary_text`."
          },
          "text": {
            "type": "string",
            "maxLength": 10485760,
            "title": "Text",
            "description": "The reasoning summary text."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "ReasoningSummaryContentParam"
      },
      "ReasoningSummaryEnum": {
        "type": "string",
        "enum": [
          "concise",
          "detailed",
          "auto"
        ],
        "title": "ReasoningSummaryEnum"
      },
      "ReasoningTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "reasoning_text",
            "title": "Type",
            "description": "The type of the reasoning text. Always `reasoning_text`."
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "The reasoning text from the model."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "ReasoningTextContent"
      },
      "RefusalContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "refusal",
            "title": "Type",
            "description": "The type of the refusal. Always `refusal`."
          },
          "refusal": {
            "type": "string",
            "title": "Refusal",
            "description": "The refusal explanation from the model."
          }
        },
        "type": "object",
        "required": [
          "type",
          "refusal"
        ],
        "title": "RefusalContent"
      },
      "RefusalContentParam": {
        "properties": {
          "type": {
            "type": "string",
            "const": "refusal",
            "title": "Type",
            "description": "The content type. Always `refusal`."
          },
          "refusal": {
            "type": "string",
            "maxLength": 10485760,
            "title": "Refusal",
            "description": "The refusal text."
          }
        },
        "type": "object",
        "required": [
          "type",
          "refusal"
        ],
        "title": "RefusalContentParam"
      },
      "ResponseResource": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The unique ID of the response that was created."
          },
          "object": {
            "$ref": "#/components/schemas/Object",
            "description": "The object type, which was always `response`."
          },
          "created_at": {
            "type": "integer",
            "title": "Created At",
            "description": "The Unix timestamp (in seconds) for when the response was created."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "The status that was set for the response."
          },
          "incomplete_details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IncompleteDetails"
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "type": "string",
            "title": "Model",
            "description": "The model that generated this response."
          },
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Response Id"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "output": {
            "items": {
              "$ref": "#/components/schemas/ItemField"
            },
            "type": "array",
            "title": "Output",
            "description": "The output items that were generated by the model."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Error1"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/Tool-Output"
            },
            "type": "array",
            "title": "Tools",
            "description": "The tools that were available to the model during response generation."
          },
          "tool_choice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FunctionToolChoice"
              },
              {
                "$ref": "#/components/schemas/ToolChoiceValueEnum"
              },
              {
                "$ref": "#/components/schemas/AllowedToolChoice"
              }
            ],
            "title": "Tool Choice"
          },
          "truncation": {
            "$ref": "#/components/schemas/TruncationEnum"
          },
          "parallel_tool_calls": {
            "type": "boolean",
            "title": "Parallel Tool Calls",
            "description": "Whether the model was allowed to call multiple tools in parallel."
          },
          "text": {
            "$ref": "#/components/schemas/TextField"
          },
          "top_p": {
            "type": "number",
            "title": "Top P",
            "description": "The nucleus sampling parameter that was used for this response."
          },
          "presence_penalty": {
            "type": "number",
            "title": "Presence Penalty",
            "description": "The presence penalty that was used to penalize new tokens based on whether they appear in the text so far."
          },
          "frequency_penalty": {
            "type": "number",
            "title": "Frequency Penalty",
            "description": "The frequency penalty that was used to penalize new tokens based on their frequency in the text so far."
          },
          "top_logprobs": {
            "type": "integer",
            "title": "Top Logprobs",
            "description": "The number of most likely tokens that were returned at each position, along with their log probabilities."
          },
          "temperature": {
            "type": "number",
            "title": "Temperature",
            "description": "The sampling temperature that was used for this response."
          },
          "reasoning": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Reasoning"
              },
              {
                "type": "null"
              }
            ]
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/schemas__responsesv2__Usage"
              },
              {
                "type": "null"
              }
            ]
          },
          "max_output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Tokens"
          },
          "max_tool_calls": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tool Calls"
          },
          "store": {
            "type": "boolean",
            "title": "Store",
            "description": "Whether this response was stored so it can be retrieved later."
          },
          "background": {
            "type": "boolean",
            "title": "Background",
            "description": "Whether this request was run in the background."
          },
          "service_tier": {
            "type": "string",
            "title": "Service Tier",
            "description": "The service tier that was used for this response."
          },
          "prompt_cache_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Cache Key"
          }
        },
        "type": "object",
        "required": [
          "id",
          "object",
          "created_at",
          "completed_at",
          "status",
          "incomplete_details",
          "model",
          "previous_response_id",
          "instructions",
          "output",
          "error",
          "tools",
          "tool_choice",
          "truncation",
          "parallel_tool_calls",
          "text",
          "top_p",
          "presence_penalty",
          "frequency_penalty",
          "top_logprobs",
          "temperature",
          "reasoning",
          "usage",
          "max_output_tokens",
          "max_tool_calls",
          "store",
          "background",
          "service_tier",
          "prompt_cache_key"
        ],
        "title": "ResponseResource"
      },
      "ResponsesToolParam": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/FunctionToolParam"
          },
          {
            "additionalProperties": true,
            "type": "object"
          }
        ],
        "title": "ResponsesToolParam"
      },
      "Role": {
        "type": "string",
        "enum": [
          "user"
        ],
        "title": "Role"
      },
      "Role1": {
        "type": "string",
        "enum": [
          "system"
        ],
        "title": "Role1"
      },
      "Role2": {
        "type": "string",
        "enum": [
          "developer"
        ],
        "title": "Role2"
      },
      "Role3": {
        "type": "string",
        "enum": [
          "assistant"
        ],
        "title": "Role3"
      },
      "SearchResult": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata",
            "default": {}
          }
        },
        "type": "object",
        "required": [
          "url",
          "title",
          "description"
        ],
        "title": "SearchResult"
      },
      "ServiceTierEnum": {
        "type": "string",
        "enum": [
          "auto",
          "default",
          "flex",
          "priority"
        ],
        "title": "ServiceTierEnum"
      },
      "SpecificFunctionParam": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type16",
            "description": "The tool to call. Always `function`."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The name of the function tool to call."
          }
        },
        "type": "object",
        "required": [
          "type",
          "name"
        ],
        "title": "SpecificFunctionParam"
      },
      "SpecificToolChoiceParam": {
        "$ref": "#/components/schemas/SpecificFunctionParam",
        "title": "SpecificToolChoiceParam"
      },
      "StreamOptions": {
        "properties": {
          "include_usage": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Usage"
          }
        },
        "type": "object",
        "title": "StreamOptions"
      },
      "Summary": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InputTextContent"
          },
          {
            "$ref": "#/components/schemas/OutputTextContent"
          },
          {
            "$ref": "#/components/schemas/TextContent-Output"
          },
          {
            "$ref": "#/components/schemas/SummaryTextContent"
          },
          {
            "$ref": "#/components/schemas/ReasoningTextContent"
          },
          {
            "$ref": "#/components/schemas/RefusalContent"
          },
          {
            "$ref": "#/components/schemas/InputImageContent"
          },
          {
            "$ref": "#/components/schemas/InputFileContent"
          }
        ],
        "title": "Summary"
      },
      "SummaryTextContent": {
        "properties": {
          "type": {
            "type": "string",
            "const": "summary_text",
            "title": "Type",
            "description": "The type of the object. Always `summary_text`."
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "A summary of the reasoning output from the model so far."
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "SummaryTextContent"
      },
      "SystemMessageItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "type": {
            "type": "string",
            "const": "message",
            "title": "Type",
            "default": "message"
          },
          "role": {
            "$ref": "#/components/schemas/Role1",
            "description": "The message role. Always `system`."
          },
          "content": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Content1"
                },
                "type": "array"
              },
              {
                "type": "string",
                "maxLength": 10485760
              }
            ],
            "title": "Content",
            "description": "The message content, as an array of content parts."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "SystemMessageItemParam"
      },
      "TextBlock": {
        "properties": {
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type",
            "default": "text"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "cache_control": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Control"
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "TextBlock"
      },
      "TextContent-Input": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type"
          },
          "text": {
            "type": "string",
            "title": "Text"
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "TextContent"
      },
      "TextContent-Output": {
        "properties": {
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type"
          },
          "text": {
            "type": "string",
            "title": "Text"
          }
        },
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "title": "TextContent"
      },
      "TextField": {
        "properties": {
          "format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TextResponseFormat-Output"
              },
              {
                "$ref": "#/components/schemas/JsonObjectResponseFormat-Output"
              },
              {
                "$ref": "#/components/schemas/JsonSchemaResponseFormat-Output"
              }
            ],
            "title": "Format"
          },
          "verbosity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VerbosityEnum"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "format"
        ],
        "title": "TextField"
      },
      "TextFormatParam": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/schemas__responsesv2__TextResponseFormat"
          },
          {
            "$ref": "#/components/schemas/JsonSchemaResponseFormatParam"
          }
        ],
        "title": "TextFormatParam"
      },
      "TextParam": {
        "properties": {
          "format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TextFormatParam"
              },
              {
                "type": "null"
              }
            ],
            "description": "The format configuration for text output."
          },
          "verbosity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VerbosityEnum"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "TextParam"
      },
      "TextResponseFormat-Output": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type38"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "TextResponseFormat"
      },
      "ThinkingConfigAdaptive": {
        "properties": {
          "type": {
            "type": "string",
            "const": "adaptive",
            "title": "Type",
            "default": "adaptive"
          },
          "budget_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1024
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Tokens"
          }
        },
        "type": "object",
        "title": "ThinkingConfigAdaptive"
      },
      "ThinkingConfigDisabled": {
        "properties": {
          "type": {
            "type": "string",
            "const": "disabled",
            "title": "Type",
            "default": "disabled"
          }
        },
        "type": "object",
        "title": "ThinkingConfigDisabled"
      },
      "ThinkingConfigEnabled": {
        "properties": {
          "type": {
            "type": "string",
            "const": "enabled",
            "title": "Type",
            "default": "enabled"
          },
          "budget_tokens": {
            "type": "integer",
            "minimum": 1024,
            "title": "Budget Tokens"
          }
        },
        "type": "object",
        "required": [
          "budget_tokens"
        ],
        "title": "ThinkingConfigEnabled"
      },
      "Tool-Input": {
        "properties": {
          "type": {
            "type": "string",
            "const": "function",
            "title": "Type"
          },
          "function": {
            "$ref": "#/components/schemas/FunctionDefinition"
          }
        },
        "type": "object",
        "required": [
          "type",
          "function"
        ],
        "title": "Tool"
      },
      "Tool-Output": {
        "$ref": "#/components/schemas/FunctionTool",
        "title": "Tool"
      },
      "ToolChoice": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ToolChoice2"
          },
          {
            "$ref": "#/components/schemas/ToolChoice3"
          },
          {
            "$ref": "#/components/schemas/ToolChoice4"
          }
        ],
        "title": "ToolChoice"
      },
      "ToolChoice2": {
        "properties": {},
        "type": "object",
        "title": "ToolChoice2"
      },
      "ToolChoice3": {
        "type": "string",
        "enum": [
          "none",
          "auto",
          "required"
        ],
        "title": "ToolChoice3"
      },
      "ToolChoice4": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type18",
            "description": "The tool choice type. Always `allowed_tools`."
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/SpecificToolChoiceParam"
            },
            "type": "array",
            "maxItems": 128,
            "minItems": 1,
            "title": "Tools",
            "description": "The list of tools that are permitted for this request."
          },
          "mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolChoiceValueEnum"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "type",
          "tools"
        ],
        "title": "ToolChoice4"
      },
      "ToolChoiceAny": {
        "properties": {
          "type": {
            "type": "string",
            "const": "any",
            "title": "Type",
            "default": "any"
          }
        },
        "type": "object",
        "title": "ToolChoiceAny"
      },
      "ToolChoiceAuto": {
        "properties": {
          "type": {
            "type": "string",
            "const": "auto",
            "title": "Type",
            "default": "auto"
          }
        },
        "type": "object",
        "title": "ToolChoiceAuto"
      },
      "ToolChoiceNone": {
        "properties": {
          "type": {
            "type": "string",
            "const": "none",
            "title": "Type",
            "default": "none"
          }
        },
        "type": "object",
        "title": "ToolChoiceNone"
      },
      "ToolChoiceSpecific": {
        "properties": {
          "type": {
            "type": "string",
            "const": "tool",
            "title": "Type",
            "default": "tool"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ToolChoiceSpecific"
      },
      "ToolChoiceValueEnum": {
        "type": "string",
        "enum": [
          "none",
          "auto",
          "required"
        ],
        "title": "ToolChoiceValueEnum"
      },
      "ToolDefinition": {
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]{1,64}$",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "input_schema": {
            "$ref": "#/components/schemas/ToolInputSchema"
          },
          "input_examples": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Examples"
          },
          "cache_control": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Control"
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Strict"
          },
          "defer_loading": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defer Loading"
          },
          "allowed_callers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Callers"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "input_schema"
        ],
        "title": "ToolDefinition"
      },
      "ToolInputSchema": {
        "properties": {
          "type": {
            "type": "string",
            "const": "object",
            "title": "Type",
            "default": "object"
          },
          "properties": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ToolParameter"
            },
            "type": "object",
            "title": "Properties"
          },
          "required": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Required",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "properties"
        ],
        "title": "ToolInputSchema"
      },
      "ToolParameter": {
        "properties": {
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "string",
                  "number",
                  "boolean",
                  "object",
                  "array",
                  "integer",
                  "null"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enum": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enum"
          },
          "items": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Items"
          },
          "properties": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/ToolParameter"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Properties"
          },
          "required": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Required"
          },
          "minimum": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minimum"
          },
          "maximum": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Maximum"
          },
          "min_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Length"
          },
          "max_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Length"
          },
          "pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pattern"
          },
          "format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Format"
          },
          "default": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Default"
          },
          "nullable": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nullable"
          },
          "additional_properties": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Additional Properties"
          }
        },
        "type": "object",
        "title": "ToolParameter"
      },
      "ToolResultBlock": {
        "properties": {
          "type": {
            "type": "string",
            "const": "tool_result",
            "title": "Type",
            "default": "tool_result"
          },
          "tool_use_id": {
            "type": "string",
            "title": "Tool Use Id"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              }
            ],
            "title": "Content"
          },
          "is_error": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Error",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "tool_use_id",
          "content"
        ],
        "title": "ToolResultBlock"
      },
      "ToolUseBlock": {
        "properties": {
          "type": {
            "type": "string",
            "const": "tool_use",
            "title": "Type",
            "default": "tool_use"
          },
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "input": {
            "additionalProperties": true,
            "type": "object",
            "title": "Input"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "input"
        ],
        "title": "ToolUseBlock"
      },
      "TopLogProb": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          },
          "logprob": {
            "type": "number",
            "title": "Logprob"
          },
          "bytes": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Bytes"
          }
        },
        "type": "object",
        "required": [
          "token",
          "logprob",
          "bytes"
        ],
        "title": "TopLogProb"
      },
      "TruncationEnum": {
        "type": "string",
        "enum": [
          "auto",
          "disabled"
        ],
        "title": "TruncationEnum"
      },
      "Type1": {
        "type": "string",
        "enum": [
          "summary_text"
        ],
        "title": "Type1"
      },
      "Type10": {
        "type": "string",
        "enum": [
          "url_citation"
        ],
        "title": "Type10"
      },
      "Type16": {
        "type": "string",
        "enum": [
          "function"
        ],
        "title": "Type16"
      },
      "Type18": {
        "type": "string",
        "enum": [
          "allowed_tools"
        ],
        "title": "Type18"
      },
      "Type22": {
        "type": "string",
        "enum": [
          "url_citation"
        ],
        "title": "Type22"
      },
      "Type35": {
        "type": "string",
        "enum": [
          "function"
        ],
        "title": "Type35"
      },
      "Type37": {
        "type": "string",
        "enum": [
          "allowed_tools"
        ],
        "title": "Type37"
      },
      "Type38": {
        "type": "string",
        "enum": [
          "text"
        ],
        "title": "Type38"
      },
      "Type39": {
        "type": "string",
        "enum": [
          "json_object"
        ],
        "title": "Type39"
      },
      "Type40": {
        "type": "string",
        "enum": [
          "json_schema"
        ],
        "title": "Type40"
      },
      "Type66": {
        "type": "string",
        "enum": [
          "json_schema"
        ],
        "title": "Type66"
      },
      "UpdateKeyRequest": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "daily_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Daily Limit"
          },
          "minute_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Minute Limit"
          },
          "allowed_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Models"
          },
          "balance": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Balance"
          },
          "use_subs_first": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Use Subs First"
          },
          "fallback_to_payg": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback To Payg"
          }
        },
        "type": "object",
        "title": "UpdateKeyRequest"
      },
      "UpdatePresetRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "model": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "frequency_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": -2
              },
              {
                "type": "null"
              }
            ],
            "title": "Frequency Penalty"
          },
          "presence_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": -2
              },
              {
                "type": "null"
              }
            ],
            "title": "Presence Penalty"
          },
          "top_k": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top K"
          },
          "stop_sequences": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop Sequences"
          },
          "response_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format"
          },
          "locked": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locked"
          }
        },
        "type": "object",
        "title": "UpdatePresetRequest"
      },
      "UrlCitationBody": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type22",
            "description": "The type of the URL citation. Always `url_citation`."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "The URL of the web resource."
          },
          "start_index": {
            "type": "integer",
            "title": "Start Index",
            "description": "The index of the first character of the URL citation in the message."
          },
          "end_index": {
            "type": "integer",
            "title": "End Index",
            "description": "The index of the last character of the URL citation in the message."
          },
          "title": {
            "type": "string",
            "title": "Title",
            "description": "The title of the web resource."
          }
        },
        "type": "object",
        "required": [
          "type",
          "url",
          "start_index",
          "end_index",
          "title"
        ],
        "title": "UrlCitationBody"
      },
      "UrlCitationParam": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type10",
            "description": "The citation type. Always `url_citation`."
          },
          "start_index": {
            "type": "integer",
            "minimum": 0,
            "title": "Start Index",
            "description": "The index of the first character of the citation in the message."
          },
          "end_index": {
            "type": "integer",
            "minimum": 0,
            "title": "End Index",
            "description": "The index of the last character of the citation in the message."
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "The URL of the cited resource."
          },
          "title": {
            "type": "string",
            "title": "Title",
            "description": "The title of the cited resource."
          }
        },
        "type": "object",
        "required": [
          "type",
          "start_index",
          "end_index",
          "url",
          "title"
        ],
        "title": "UrlCitationParam"
      },
      "UserMessageItemParam": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "type": {
            "type": "string",
            "const": "message",
            "title": "Type",
            "default": "message"
          },
          "role": {
            "$ref": "#/components/schemas/Role",
            "description": "The message role. Always `user`."
          },
          "content": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Content"
                },
                "type": "array"
              },
              {
                "type": "string",
                "maxLength": 10485760
              }
            ],
            "title": "Content",
            "description": "The message content, as an array of content parts."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "UserMessageItemParam"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VerbosityEnum": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ],
        "title": "VerbosityEnum"
      },
      "schemas__anthropic__Usage": {
        "properties": {
          "input_tokens": {
            "type": "integer",
            "title": "Input Tokens"
          },
          "output_tokens": {
            "type": "integer",
            "title": "Output Tokens"
          },
          "cache_creation_input_tokens": {
            "type": "integer",
            "title": "Cache Creation Input Tokens",
            "default": 0
          },
          "cache_read_input_tokens": {
            "type": "integer",
            "title": "Cache Read Input Tokens",
            "default": 0
          },
          "cache_creation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CacheCreation"
              },
              {
                "type": "null"
              }
            ]
          },
          "service_tier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "standard",
                  "priority"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Tier",
            "default": "standard"
          }
        },
        "type": "object",
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "title": "Usage"
      },
      "schemas__openai__TextResponseFormat": {
        "properties": {
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "TextResponseFormat"
      },
      "schemas__responsesv2__TextResponseFormat": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Type38"
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "TextResponseFormat"
      },
      "schemas__responsesv2__Usage": {
        "properties": {
          "input_tokens": {
            "type": "integer",
            "title": "Input Tokens",
            "description": "The number of input tokens that were used to generate the response."
          },
          "output_tokens": {
            "type": "integer",
            "title": "Output Tokens",
            "description": "The number of output tokens that were generated by the model."
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens",
            "description": "The total number of tokens that were used."
          },
          "input_tokens_details": {
            "$ref": "#/components/schemas/InputTokensDetails"
          },
          "output_tokens_details": {
            "$ref": "#/components/schemas/OutputTokensDetails"
          }
        },
        "type": "object",
        "required": [
          "input_tokens",
          "output_tokens",
          "total_tokens",
          "input_tokens_details",
          "output_tokens_details"
        ],
        "title": "Usage"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "HTTPBearer": []
    }
  ]
}