{
  "openapi": "3.1.0",
  "info": {
    "title": "Laminarity API",
    "description": "OpenAI-compatible Chat Completions and Models endpoints plus a stateless Responses beta. Authenticate with a Laminarity project key as `Authorization: Bearer <key>`. Use `model: auto` for Laminarity routing and fallback, or a concrete id returned by `GET /v1/models` for a direct, no-fallback request.",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://api.laminarity.ai",
      "description": "Production"
    }
  ],
  "paths": {
    "/v1/chat/completions": {
      "post": {
        "tags": [
          "chat"
        ],
        "summary": "Create a chat completion",
        "description": "OpenAI-compatible chat completions. Set `model` to `auto` to route to the best eligible provider/model and retry the next-ranked candidate on failure unless `enable_fallback` is false. Pass an id returned by `GET /v1/models` to call that model directly; explicit model requests do not use automatic fallback. Set `stream: true` for a text/event-stream response of `chat.completion.chunk` events (terminated by a `data: [DONE]` event) instead of a single JSON body. Unknown request fields are ignored for broader OpenAI SDK compatibility.",
        "operationId": "chat_completions_v1_chat_completions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCompletionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request failed schema validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance, or the key's spend limit would be exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The requested model does not exist, or no provider/model combination is allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "The provider, or every provider in the fallback chain, failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "LaminarityApiKey": []
          }
        ]
      }
    },
    "/v1/responses": {
      "post": {
        "tags": [
          "responses"
        ],
        "summary": "Create a response (beta)",
        "description": "Stateless OpenAI Responses-compatible subset backed by the same Laminarity routing and fallback engine as Chat Completions. `input` accepts a string or a list of compatible message, function-call, and function-call-output items. Set `stream: true` for a reduced typed Responses SSE lifecycle. `previous_response_id` and server-side response persistence are not supported; replay prior output items in `input` instead.",
        "operationId": "create_response_v1_responses_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request failed validation or uses an unsupported parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient balance, or the key's spend limit would be exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The requested model does not exist, or no provider/model combination is allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "The provider, or every provider in the fallback chain, failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "LaminarityApiKey": []
          }
        ]
      }
    },
    "/v1/models": {
      "get": {
        "tags": [
          "models"
        ],
        "summary": "List routable models",
        "description": "Lists model ids available to the authenticated API key after applying its project's provider, model, and price policies. The synthetic `auto` id is returned first when at least one model is eligible. Use `auto` for Laminarity routing and fallback, or pass a concrete id to `/v1/chat/completions` for a direct, no-fallback call. Models with selectable reasoning expose OpenRouter-compatible reasoning metadata for variant discovery.",
        "operationId": "list_models_v1_models_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "429": {
            "description": "Rate limit exceeded."
          }
        },
        "security": [
          {
            "LaminarityApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ActivityByProviderOut": {
        "properties": {
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "provider",
          "count"
        ],
        "title": "ActivityByProviderOut"
      },
      "ActivityDataOut": {
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/ActivitySummaryOut"
          },
          "timeseries": {
            "items": {
              "$ref": "#/components/schemas/ActivityTimeseriesPointOut"
            },
            "type": "array",
            "title": "Timeseries"
          },
          "by_provider": {
            "items": {
              "$ref": "#/components/schemas/ActivityByProviderOut"
            },
            "type": "array",
            "title": "By Provider"
          }
        },
        "type": "object",
        "required": [
          "summary",
          "timeseries",
          "by_provider"
        ],
        "title": "ActivityDataOut"
      },
      "ActivitySummaryOut": {
        "properties": {
          "requests_24h": {
            "type": "integer",
            "title": "Requests 24H"
          },
          "tokens_24h": {
            "type": "integer",
            "title": "Tokens 24H"
          },
          "spend_24h_microusd": {
            "type": "integer",
            "title": "Spend 24H Microusd"
          },
          "error_rate_pct": {
            "type": "number",
            "title": "Error Rate Pct"
          }
        },
        "type": "object",
        "required": [
          "requests_24h",
          "tokens_24h",
          "spend_24h_microusd",
          "error_rate_pct"
        ],
        "title": "ActivitySummaryOut"
      },
      "ActivityTimeseriesPointOut": {
        "properties": {
          "date": {
            "type": "string",
            "title": "Date"
          },
          "requests": {
            "type": "integer",
            "title": "Requests"
          },
          "spend_microusd": {
            "type": "integer",
            "title": "Spend Microusd"
          }
        },
        "type": "object",
        "required": [
          "date",
          "requests",
          "spend_microusd"
        ],
        "title": "ActivityTimeseriesPointOut"
      },
      "ApiKeyOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "key_prefix": {
            "type": "string",
            "title": "Key Prefix"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active"
          },
          "spend_limit_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spend Limit Microusd"
          },
          "total_spent_microusd": {
            "type": "integer",
            "title": "Total Spent Microusd"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "key_prefix",
          "name",
          "project_id",
          "is_active",
          "spend_limit_microusd",
          "total_spent_microusd",
          "created_at"
        ],
        "title": "ApiKeyOut"
      },
      "ApiKeysPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ApiKeyOut"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "limit"
        ],
        "title": "ApiKeysPage"
      },
      "CandidatePool": {
        "properties": {
          "models": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Models"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "models"
        ],
        "title": "CandidatePool"
      },
      "ChatCompletionRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model",
            "description": "Use \"auto\" to let Laminarity select a model and optionally fall back, or pass an id from GET /v1/models to call that model directly without automatic fallback."
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "type": "array",
            "title": "Messages",
            "description": "Conversation messages in OpenAI chat-completions format."
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ToolDefinition"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools",
            "description": "OpenAI-compatible function/tool definitions."
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "auto",
                  "none",
                  "required"
                ]
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Choice"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "description": "If true, respond as an SSE stream of chat.completion.chunk events.",
            "default": false
          },
          "token_doctor": {
            "type": "boolean",
            "title": "Token Doctor",
            "description": "Opt this request into an active project Token Doctor collection window.",
            "default": false
          },
          "stream_options": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StreamOptions"
              },
              {
                "type": "null"
              }
            ],
            "description": "OpenAI-compatible streaming options."
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens",
            "description": "Deprecated OpenAI-compatible completion-token limit. Prefer max_completion_tokens."
          },
          "max_completion_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Completion Tokens",
            "description": "Maximum generated tokens. Takes precedence over max_tokens when both are supplied."
          },
          "stop": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop"
          },
          "frequency_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": -2.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Frequency Penalty"
          },
          "presence_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": -2.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Presence Penalty"
          },
          "n": {
            "anyOf": [
              {
                "type": "integer",
                "const": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "N",
            "description": "Laminarity currently supports one completion per request."
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed"
          },
          "logprobs": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logprobs"
          },
          "top_logprobs": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 20.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Logprobs"
          },
          "parallel_tool_calls": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallel Tool Calls"
          },
          "response_format": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format",
            "description": "OpenAI-compatible JSON object or JSON schema response configuration, when supported by the selected provider."
          },
          "reasoning_effort": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "minimal",
                  "low",
                  "medium",
                  "high",
                  "xhigh",
                  "max"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Effort",
            "description": "Reasoning effort hint passed to providers that support it."
          },
          "reasoning": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "OpenRouter-compatible reasoning configuration. reasoning.effort aliases reasoning_effort."
          },
          "verbosity": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Verbosity"
          },
          "service_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Tier"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "store": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Store"
          },
          "safety_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Safety Identifier"
          },
          "prompt_cache_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Cache Key"
          },
          "prompt_cache_options": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Cache Options"
          },
          "prompt_cache_retention": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Cache Retention"
          },
          "prediction": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prediction"
          },
          "modalities": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modalities"
          },
          "audio": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audio"
          },
          "moderation": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Moderation"
          },
          "web_search_options": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Search Options"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User",
            "description": "Opaque caller-supplied end-user id, passed through to providers that support it."
          },
          "models": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelRestriction"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-request model allow/deny list -- narrows, never bypasses, project policy."
          },
          "provider": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProviderRestriction"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-request provider allow/deny list (field name matches OpenRouter's request shape) -- narrows, never bypasses, project policy."
          },
          "routing_config": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Routing Config",
            "description": "Project-owned routing configuration id or slug."
          },
          "alpha": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Alpha",
            "description": "Quality-vs-cost weight (0 = cheapest, 1 = highest quality). Overrides the project default."
          },
          "max_input_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Price Microusd Per Million",
            "description": "Exclude any model priced above this per million input tokens. Narrows, never loosens, the project's cap."
          },
          "max_output_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Price Microusd Per Million",
            "description": "Exclude any model priced above this per million output tokens. Narrows, never loosens, the project's cap."
          },
          "enable_fallback": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Fallback",
            "description": "If false, only the top-ranked candidate is tried -- a provider failure fails the request instead of retrying the next model."
          }
        },
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "title": "ChatCompletionRequest"
      },
      "CheckoutStatusOut": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "checkout_amount_cents": {
            "type": "integer",
            "title": "Checkout Amount Cents"
          },
          "credited_amount_microusd": {
            "type": "integer",
            "title": "Credited Amount Microusd"
          },
          "failure_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Category"
          },
          "failure_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Message"
          }
        },
        "type": "object",
        "required": [
          "session_id",
          "status",
          "checkout_amount_cents",
          "credited_amount_microusd"
        ],
        "title": "CheckoutStatusOut"
      },
      "CreateApiKeyRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "spend_limit_microusd": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Spend Limit Microusd"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "project_id"
        ],
        "title": "CreateApiKeyRequest"
      },
      "CreateApiKeyResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "api_key": {
            "type": "string",
            "title": "Api Key"
          },
          "key_prefix": {
            "type": "string",
            "title": "Key Prefix"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "api_key",
          "key_prefix",
          "name"
        ],
        "title": "CreateApiKeyResponse"
      },
      "CreateCheckoutRequest": {
        "properties": {
          "credit_amount_cents": {
            "type": "integer",
            "maximum": 100000.0,
            "minimum": 1000.0,
            "title": "Credit Amount Cents"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "credit_amount_cents"
        ],
        "title": "CreateCheckoutRequest"
      },
      "CreateCheckoutResponse": {
        "properties": {
          "checkout_url": {
            "type": "string",
            "title": "Checkout Url"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id"
          },
          "payment_id": {
            "type": "string",
            "title": "Payment Id"
          }
        },
        "type": "object",
        "required": [
          "checkout_url",
          "session_id",
          "payment_id"
        ],
        "title": "CreateCheckoutResponse"
      },
      "CreateMyApiKeyRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "spend_limit_microusd": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Spend Limit Microusd"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CreateMyApiKeyRequest"
      },
      "CreateMyProjectRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CreateMyProjectRequest"
      },
      "CreateProjectRequest": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "allowed_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Models"
          },
          "excluded_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Excluded Models"
          },
          "allowed_providers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Providers"
          },
          "excluded_providers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Excluded Providers"
          },
          "default_alpha": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Alpha"
          },
          "max_input_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Price Microusd Per Million"
          },
          "max_output_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Price Microusd Per Million"
          },
          "default_enable_fallback": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Enable Fallback"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "user_id",
          "name"
        ],
        "title": "CreateProjectRequest"
      },
      "CreateRoutingConfigurationRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80,
                "minLength": 1,
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          },
          "spec": {
            "$ref": "#/components/schemas/RoutingConfigurationSpec"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "spec"
        ],
        "title": "CreateRoutingConfigurationRequest"
      },
      "CreateTokenDoctorRequest": {
        "properties": {
          "sampling_rate": {
            "type": "number",
            "maximum": 1.0,
            "exclusiveMinimum": 0.0,
            "title": "Sampling Rate"
          },
          "max_samples": {
            "type": "integer",
            "maximum": 1000.0,
            "minimum": 1.0,
            "title": "Max Samples"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "title": "Starts At"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "title": "Ends At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "sampling_rate",
          "max_samples",
          "starts_at",
          "ends_at"
        ],
        "title": "CreateTokenDoctorRequest"
      },
      "CreateUserRequest": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "initial_balance_microusd": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Initial Balance Microusd",
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email"
        ],
        "title": "CreateUserRequest"
      },
      "CreditTransactionOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "amount_microusd": {
            "type": "integer",
            "title": "Amount Microusd"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "amount_microusd",
          "description",
          "created_at"
        ],
        "title": "CreditTransactionOut"
      },
      "CreditTransactionsPageOut": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CreditTransactionOut"
            },
            "type": "array",
            "title": "Items"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "items",
          "limit",
          "has_more",
          "next_cursor"
        ],
        "title": "CreditTransactionsPageOut"
      },
      "CreditUserRequest": {
        "properties": {
          "amount_microusd": {
            "type": "integer",
            "exclusiveMinimum": 0.0,
            "title": "Amount Microusd"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "amount_microusd"
        ],
        "title": "CreditUserRequest"
      },
      "DuplicateRoutingConfigurationRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Name"
          },
          "slug": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80,
                "minLength": 1,
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slug"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "DuplicateRoutingConfigurationRequest"
      },
      "ErrorDetail": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "param": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Param"
          }
        },
        "type": "object",
        "required": [
          "message",
          "type"
        ],
        "title": "ErrorDetail"
      },
      "ErrorResponse": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        },
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ErrorResponse"
      },
      "FallbackPolicy": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "max_attempts": {
            "type": "integer",
            "maximum": 3.0,
            "minimum": 1.0,
            "title": "Max Attempts",
            "default": 3
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "FallbackPolicy"
      },
      "FunctionCall": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "arguments": {
            "type": "string",
            "title": "Arguments"
          }
        },
        "type": "object",
        "required": [
          "name",
          "arguments"
        ],
        "title": "FunctionCall"
      },
      "FunctionDefinition": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "parameters": {
            "additionalProperties": true,
            "type": "object",
            "title": "Parameters"
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Strict"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "FunctionDefinition"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ImagePart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "image_url",
            "title": "Type",
            "default": "image_url"
          },
          "image_url": {
            "$ref": "#/components/schemas/ImageUrl"
          }
        },
        "type": "object",
        "required": [
          "image_url"
        ],
        "title": "ImagePart"
      },
      "ImageUrl": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 6990764,
            "title": "Url",
            "description": "A base64-encoded inline data:image/... URL; remote URLs are not accepted."
          },
          "detail": {
            "type": "string",
            "enum": [
              "auto",
              "low",
              "high"
            ],
            "title": "Detail",
            "default": "auto"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "ImageUrl"
      },
      "LogsPageOut": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RequestLogOut"
            },
            "type": "array",
            "title": "Items"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "items",
          "limit",
          "has_more",
          "next_cursor"
        ],
        "title": "LogsPageOut"
      },
      "Message": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "developer",
              "system",
              "user",
              "assistant",
              "tool"
            ],
            "title": "Role",
            "description": "One of \"developer\", \"system\", \"user\", \"assistant\", \"tool\"."
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TextPart"
                    },
                    {
                      "$ref": "#/components/schemas/ImagePart"
                    }
                  ],
                  "discriminator": {
                    "propertyName": "type",
                    "mapping": {
                      "image_url": "#/components/schemas/ImagePart",
                      "text": "#/components/schemas/TextPart"
                    }
                  }
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content",
            "description": "Plain text, or a list of text/image parts for vision-capable models."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "tool_calls": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ToolCall"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Calls",
            "description": "Set on assistant messages that invoked tools."
          },
          "tool_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Call Id",
            "description": "Set on role=\"tool\" messages, matching the originating tool_calls[].id."
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "Message"
      },
      "ModelInfo": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "object": {
            "type": "string",
            "title": "Object",
            "default": "model"
          },
          "created": {
            "type": "integer",
            "title": "Created"
          },
          "owned_by": {
            "type": "string",
            "title": "Owned By"
          },
          "reasoning": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningInfo"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "created",
          "owned_by"
        ],
        "title": "ModelInfo"
      },
      "ModelList": {
        "properties": {
          "object": {
            "type": "string",
            "title": "Object",
            "default": "list"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ModelInfo"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ModelList"
      },
      "ModelRestriction": {
        "properties": {
          "only": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Only",
            "description": "If set, only these model ids are eligible."
          },
          "ignore": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ignore",
            "description": "Model ids to exclude from routing."
          }
        },
        "type": "object",
        "title": "ModelRestriction"
      },
      "PercentileThresholds": {
        "properties": {
          "p50": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "P50"
          },
          "p75": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "P75"
          },
          "p90": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "P90"
          },
          "p99": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "P99"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PercentileThresholds"
      },
      "PerformancePreferences": {
        "properties": {
          "preferred_max_latency_seconds": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "$ref": "#/components/schemas/PercentileThresholds"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Max Latency Seconds"
          },
          "preferred_min_throughput_tokens_per_second": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "$ref": "#/components/schemas/PercentileThresholds"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Min Throughput Tokens Per Second"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PerformancePreferences"
      },
      "PriceGate": {
        "properties": {
          "max_input_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Microusd Per Million"
          },
          "max_output_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Microusd Per Million"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PriceGate"
      },
      "ProjectOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "allowed_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Models"
          },
          "excluded_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Excluded Models"
          },
          "allowed_providers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Providers"
          },
          "excluded_providers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Excluded Providers"
          },
          "default_alpha": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Alpha"
          },
          "max_input_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Price Microusd Per Million"
          },
          "max_output_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Price Microusd Per Million"
          },
          "default_enable_fallback": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Enable Fallback"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "name",
          "allowed_models",
          "excluded_models",
          "allowed_providers",
          "excluded_providers",
          "default_alpha",
          "max_input_price_microusd_per_million",
          "max_output_price_microusd_per_million",
          "default_enable_fallback",
          "created_at"
        ],
        "title": "ProjectOut"
      },
      "ProjectsPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProjectOut"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "limit"
        ],
        "title": "ProjectsPage"
      },
      "ProviderRestriction": {
        "properties": {
          "only": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Only",
            "description": "If set, only these providers are eligible (e.g. \"openai\", \"anthropic\", \"vertex_gemini\")."
          },
          "ignore": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ignore",
            "description": "Providers to exclude from routing."
          },
          "preferred_max_latency": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "$ref": "#/components/schemas/PercentileThresholds"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Max Latency",
            "description": "Preferred maximum time-to-first-token in seconds. A number applies to p50; an object may set p50, p75, p90, and p99 thresholds."
          },
          "preferred_min_throughput": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "$ref": "#/components/schemas/PercentileThresholds"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Min Throughput",
            "description": "Preferred minimum output tokens per second. A number applies to p50; an object may set p50, p75, p90, and p99 thresholds."
          }
        },
        "type": "object",
        "title": "ProviderRestriction"
      },
      "QualityCostRanking": {
        "properties": {
          "alpha": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Alpha",
            "default": 0.8
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "QualityCostRanking"
      },
      "ReasoningConfig": {
        "properties": {
          "effort": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "minimal",
                  "low",
                  "medium",
                  "high",
                  "xhigh",
                  "max"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Effort"
          }
        },
        "type": "object",
        "title": "ReasoningConfig"
      },
      "ReasoningInfo": {
        "properties": {
          "supported_efforts": {
            "items": {
              "type": "string",
              "enum": [
                "none",
                "minimal",
                "low",
                "medium",
                "high",
                "xhigh",
                "max"
              ]
            },
            "type": "array",
            "title": "Supported Efforts",
            "description": "Supported reasoning variants in highest-to-lowest order."
          },
          "default_effort": {
            "type": "string",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high",
              "xhigh",
              "max"
            ],
            "title": "Default Effort",
            "description": "Provider default when the client omits an effort level."
          },
          "default_enabled": {
            "type": "boolean",
            "title": "Default Enabled",
            "description": "Whether reasoning is enabled when the client omits reasoning controls."
          },
          "mandatory": {
            "type": "boolean",
            "title": "Mandatory",
            "description": "If true, the model does not support disabling reasoning."
          }
        },
        "type": "object",
        "required": [
          "supported_efforts",
          "default_effort",
          "default_enabled",
          "mandatory"
        ],
        "title": "ReasoningInfo"
      },
      "RequestLogOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "api_key_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key Id"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "model_requested": {
            "type": "string",
            "title": "Model Requested"
          },
          "model_used": {
            "type": "string",
            "title": "Model Used"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "fallback_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback From"
          },
          "prompt_tokens": {
            "type": "integer",
            "title": "Prompt Tokens"
          },
          "cached_input_tokens": {
            "type": "integer",
            "title": "Cached Input Tokens"
          },
          "cache_write_input_tokens": {
            "type": "integer",
            "title": "Cache Write Input Tokens"
          },
          "cache_write_1h_input_tokens": {
            "type": "integer",
            "title": "Cache Write 1H Input Tokens"
          },
          "completion_tokens": {
            "type": "integer",
            "title": "Completion Tokens"
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens"
          },
          "reserved_microusd": {
            "type": "integer",
            "title": "Reserved Microusd"
          },
          "charged_microusd": {
            "type": "integer",
            "title": "Charged Microusd"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "api_key_id",
          "request_id",
          "provider",
          "model_requested",
          "model_used",
          "status",
          "fallback_from",
          "prompt_tokens",
          "cached_input_tokens",
          "cache_write_input_tokens",
          "cache_write_1h_input_tokens",
          "completion_tokens",
          "total_tokens",
          "reserved_microusd",
          "charged_microusd",
          "latency_ms",
          "error_message",
          "stream",
          "created_at"
        ],
        "title": "RequestLogOut"
      },
      "ResponseFunctionTool": {
        "properties": {
          "type": {
            "type": "string",
            "const": "function",
            "title": "Type",
            "default": "function"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "parameters": {
            "additionalProperties": true,
            "type": "object",
            "title": "Parameters"
          },
          "strict": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Strict"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ResponseFunctionTool"
      },
      "ResponseRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model",
            "description": "Use \"auto\" for Laminarity routing and fallback, or an id from GET /v1/models for a direct, no-fallback request."
          },
          "input": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              }
            ],
            "title": "Input",
            "description": "A text prompt or Responses-style message, function_call, and function_call_output items."
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions",
            "description": "Developer/system instructions prepended to the input."
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ResponseFunctionTool"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools",
            "description": "Function tools. Hosted provider tools are not part of the current portable surface."
          },
          "tool_choice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Choice"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "description": "Emit typed Responses API server-sent events when true.",
            "default": false
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "max_output_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Tokens"
          },
          "parallel_tool_calls": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parallel Tool Calls"
          },
          "text": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "reasoning": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning"
          },
          "store": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Store"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Response Id",
            "description": "Not currently supported. Replay prior output items in input instead."
          },
          "models": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Models"
          },
          "provider": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "alpha": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Alpha"
          },
          "max_input_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Price Microusd Per Million"
          },
          "max_output_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Price Microusd Per Million"
          },
          "enable_fallback": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enable Fallback"
          },
          "routing_config": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Routing Config"
          }
        },
        "type": "object",
        "required": [
          "model",
          "input"
        ],
        "title": "ResponseRequest"
      },
      "RoutingConfigurationOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "spec": {
            "$ref": "#/components/schemas/RoutingConfigurationSpec"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "archived_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archived At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "name",
          "slug",
          "spec",
          "created_at",
          "updated_at",
          "archived_at"
        ],
        "title": "RoutingConfigurationOut"
      },
      "RoutingConfigurationSpec": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "const": 1,
            "title": "Schema Version",
            "default": 1
          },
          "candidates": {
            "$ref": "#/components/schemas/CandidatePool"
          },
          "price": {
            "$ref": "#/components/schemas/PriceGate"
          },
          "performance": {
            "$ref": "#/components/schemas/PerformancePreferences"
          },
          "ranking": {
            "$ref": "#/components/schemas/QualityCostRanking"
          },
          "fallback": {
            "$ref": "#/components/schemas/FallbackPolicy"
          },
          "sticky_cache_enabled": {
            "type": "boolean",
            "title": "Sticky Cache Enabled",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "candidates"
        ],
        "title": "RoutingConfigurationSpec",
        "description": "Constrained routing configuration compiled by the router."
      },
      "SavingsApiKeyFlowOut": {
        "properties": {
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "project_name": {
            "type": "string",
            "title": "Project Name"
          },
          "api_key_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key Id"
          },
          "api_key_name": {
            "type": "string",
            "title": "Api Key Name"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "actual_microusd": {
            "type": "integer",
            "title": "Actual Microusd"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "project_name",
          "api_key_id",
          "api_key_name",
          "provider",
          "actual_microusd"
        ],
        "title": "SavingsApiKeyFlowOut"
      },
      "SavingsModelOut": {
        "properties": {
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "requests": {
            "type": "integer",
            "title": "Requests"
          },
          "prompt_tokens": {
            "type": "integer",
            "title": "Prompt Tokens"
          },
          "completion_tokens": {
            "type": "integer",
            "title": "Completion Tokens"
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens"
          },
          "actual_microusd": {
            "type": "integer",
            "title": "Actual Microusd"
          },
          "baseline_microusd": {
            "type": "integer",
            "title": "Baseline Microusd"
          },
          "savings_microusd": {
            "type": "integer",
            "title": "Savings Microusd"
          },
          "avg_latency_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Latency Ms"
          },
          "fallback_requests": {
            "type": "integer",
            "title": "Fallback Requests"
          },
          "exact_requests": {
            "type": "integer",
            "title": "Exact Requests"
          },
          "reconstructed_requests": {
            "type": "integer",
            "title": "Reconstructed Requests"
          }
        },
        "type": "object",
        "required": [
          "provider",
          "model",
          "requests",
          "prompt_tokens",
          "completion_tokens",
          "total_tokens",
          "actual_microusd",
          "baseline_microusd",
          "savings_microusd",
          "avg_latency_ms",
          "fallback_requests",
          "exact_requests",
          "reconstructed_requests"
        ],
        "title": "SavingsModelOut"
      },
      "SavingsModelTimeseriesPointOut": {
        "properties": {
          "date": {
            "type": "string",
            "title": "Date"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "requests": {
            "type": "integer",
            "title": "Requests"
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens"
          },
          "actual_microusd": {
            "type": "integer",
            "title": "Actual Microusd"
          }
        },
        "type": "object",
        "required": [
          "date",
          "provider",
          "model",
          "requests",
          "total_tokens",
          "actual_microusd"
        ],
        "title": "SavingsModelTimeseriesPointOut"
      },
      "SavingsOut": {
        "properties": {
          "requests": {
            "type": "integer",
            "title": "Requests"
          },
          "actual_microusd": {
            "type": "integer",
            "title": "Actual Microusd"
          },
          "baseline_microusd": {
            "type": "integer",
            "title": "Baseline Microusd"
          },
          "savings_microusd": {
            "type": "integer",
            "title": "Savings Microusd"
          },
          "timeseries": {
            "items": {
              "$ref": "#/components/schemas/SavingsPointOut"
            },
            "type": "array",
            "title": "Timeseries"
          },
          "exact_requests": {
            "type": "integer",
            "title": "Exact Requests",
            "default": 0
          },
          "reconstructed_requests": {
            "type": "integer",
            "title": "Reconstructed Requests",
            "default": 0
          },
          "incomplete_requests": {
            "type": "integer",
            "title": "Incomplete Requests",
            "default": 0
          },
          "excluded_actual_microusd": {
            "type": "integer",
            "title": "Excluded Actual Microusd",
            "default": 0
          },
          "confidence": {
            "type": "string",
            "title": "Confidence",
            "default": "exact"
          },
          "models": {
            "items": {
              "$ref": "#/components/schemas/SavingsModelOut"
            },
            "type": "array",
            "title": "Models"
          },
          "model_timeseries": {
            "items": {
              "$ref": "#/components/schemas/SavingsModelTimeseriesPointOut"
            },
            "type": "array",
            "title": "Model Timeseries",
            "default": []
          },
          "api_key_flow": {
            "items": {
              "$ref": "#/components/schemas/SavingsApiKeyFlowOut"
            },
            "type": "array",
            "title": "Api Key Flow",
            "default": []
          },
          "api_key_flow_truncated": {
            "type": "boolean",
            "title": "Api Key Flow Truncated",
            "default": false
          },
          "api_key_flow_omitted_items": {
            "type": "integer",
            "title": "Api Key Flow Omitted Items",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "requests",
          "actual_microusd",
          "baseline_microusd",
          "savings_microusd",
          "timeseries",
          "models"
        ],
        "title": "SavingsOut"
      },
      "SavingsPointOut": {
        "properties": {
          "date": {
            "type": "string",
            "title": "Date"
          },
          "actual_microusd": {
            "type": "integer",
            "title": "Actual Microusd"
          },
          "baseline_microusd": {
            "type": "integer",
            "title": "Baseline Microusd"
          },
          "savings_microusd": {
            "type": "integer",
            "title": "Savings Microusd"
          },
          "requests": {
            "type": "integer",
            "title": "Requests",
            "default": 0
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens",
            "default": 0
          },
          "avg_latency_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Latency Ms"
          },
          "exact_requests": {
            "type": "integer",
            "title": "Exact Requests",
            "default": 0
          },
          "reconstructed_requests": {
            "type": "integer",
            "title": "Reconstructed Requests",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "date",
          "actual_microusd",
          "baseline_microusd",
          "savings_microusd"
        ],
        "title": "SavingsPointOut"
      },
      "SavingsRequestOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "model_used": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Used"
          },
          "fallback_used": {
            "type": "boolean",
            "title": "Fallback Used"
          },
          "attempt_count": {
            "type": "integer",
            "title": "Attempt Count"
          },
          "prompt_tokens": {
            "type": "integer",
            "title": "Prompt Tokens"
          },
          "cached_input_tokens": {
            "type": "integer",
            "title": "Cached Input Tokens"
          },
          "cache_write_input_tokens": {
            "type": "integer",
            "title": "Cache Write Input Tokens"
          },
          "cache_write_1h_input_tokens": {
            "type": "integer",
            "title": "Cache Write 1H Input Tokens"
          },
          "completion_tokens": {
            "type": "integer",
            "title": "Completion Tokens"
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens"
          },
          "actual_microusd": {
            "type": "integer",
            "title": "Actual Microusd"
          },
          "baseline_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Baseline Microusd"
          },
          "savings_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Savings Microusd"
          },
          "usage_confidence": {
            "type": "string",
            "title": "Usage Confidence"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "request_id",
          "created_at",
          "status",
          "provider",
          "model_used",
          "fallback_used",
          "attempt_count",
          "prompt_tokens",
          "cached_input_tokens",
          "cache_write_input_tokens",
          "cache_write_1h_input_tokens",
          "completion_tokens",
          "total_tokens",
          "actual_microusd",
          "baseline_microusd",
          "savings_microusd",
          "usage_confidence",
          "latency_ms"
        ],
        "title": "SavingsRequestOut"
      },
      "SavingsRequestsPageOut": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SavingsRequestOut"
            },
            "type": "array",
            "title": "Items"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "items",
          "limit",
          "has_more",
          "next_cursor"
        ],
        "title": "SavingsRequestsPageOut"
      },
      "StreamOptions": {
        "properties": {
          "include_usage": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Usage",
            "description": "Accepted for OpenAI SDK compatibility. Laminarity always requests and emits a final usage chunk when the provider supports it."
          },
          "include_obfuscation": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include Obfuscation",
            "description": "Passed through to providers that support stream obfuscation."
          }
        },
        "type": "object",
        "title": "StreamOptions"
      },
      "TextPart": {
        "properties": {
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type",
            "default": "text"
          },
          "text": {
            "type": "string",
            "title": "Text"
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "TextPart"
      },
      "TokenDoctorSampleOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "model_requested": {
            "type": "string",
            "title": "Model Requested"
          },
          "model_used": {
            "type": "string",
            "title": "Model Used"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream"
          },
          "normalized_request": {
            "additionalProperties": true,
            "type": "object",
            "title": "Normalized Request"
          },
          "normalized_response": {
            "additionalProperties": true,
            "type": "object",
            "title": "Normalized Response"
          },
          "payload_bytes": {
            "type": "integer",
            "title": "Payload Bytes"
          },
          "prompt_tokens": {
            "type": "integer",
            "title": "Prompt Tokens"
          },
          "cached_input_tokens": {
            "type": "integer",
            "title": "Cached Input Tokens"
          },
          "cache_write_input_tokens": {
            "type": "integer",
            "title": "Cache Write Input Tokens"
          },
          "cache_write_1h_input_tokens": {
            "type": "integer",
            "title": "Cache Write 1H Input Tokens"
          },
          "completion_tokens": {
            "type": "integer",
            "title": "Completion Tokens"
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens"
          },
          "charged_microusd": {
            "type": "integer",
            "title": "Charged Microusd"
          },
          "price_prompt_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Prompt Microusd Per Million"
          },
          "price_cached_prompt_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Cached Prompt Microusd Per Million"
          },
          "price_completion_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Completion Microusd Per Million"
          },
          "usage_confidence": {
            "type": "string",
            "title": "Usage Confidence"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Completed At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "request_id",
          "provider",
          "model_requested",
          "model_used",
          "stream",
          "normalized_request",
          "normalized_response",
          "payload_bytes",
          "prompt_tokens",
          "cached_input_tokens",
          "cache_write_input_tokens",
          "cache_write_1h_input_tokens",
          "completion_tokens",
          "total_tokens",
          "charged_microusd",
          "price_prompt_microusd_per_million",
          "price_cached_prompt_microusd_per_million",
          "price_completion_microusd_per_million",
          "usage_confidence",
          "completed_at"
        ],
        "title": "TokenDoctorSampleOut"
      },
      "TokenDoctorSampleSummaryOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "model_used": {
            "type": "string",
            "title": "Model Used"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream"
          },
          "request_excerpt": {
            "type": "string",
            "title": "Request Excerpt"
          },
          "prompt_tokens": {
            "type": "integer",
            "title": "Prompt Tokens"
          },
          "completion_tokens": {
            "type": "integer",
            "title": "Completion Tokens"
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens"
          },
          "charged_microusd": {
            "type": "integer",
            "title": "Charged Microusd"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Completed At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "request_id",
          "provider",
          "model_used",
          "stream",
          "request_excerpt",
          "prompt_tokens",
          "completion_tokens",
          "total_tokens",
          "charged_microusd",
          "completed_at"
        ],
        "title": "TokenDoctorSampleSummaryOut"
      },
      "TokenDoctorSamplesOut": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TokenDoctorSampleSummaryOut"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "TokenDoctorSamplesOut"
      },
      "TokenDoctorSessionOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "collecting",
              "stopped",
              "queued",
              "analyzing",
              "ready",
              "failed"
            ],
            "title": "Status"
          },
          "sampling_rate": {
            "type": "number",
            "title": "Sampling Rate"
          },
          "max_samples": {
            "type": "integer",
            "title": "Max Samples"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "title": "Starts At"
          },
          "ends_at": {
            "type": "string",
            "format": "date-time",
            "title": "Ends At"
          },
          "sample_count": {
            "type": "integer",
            "title": "Sample Count"
          },
          "retained_bytes": {
            "type": "integer",
            "title": "Retained Bytes"
          },
          "skipped_oversize_samples": {
            "type": "integer",
            "title": "Skipped Oversize Samples"
          },
          "report": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report"
          },
          "analysis_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Error"
          },
          "analysis_run_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Run Id"
          },
          "analysis_task_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Task Name"
          },
          "analysis_queued_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Queued At"
          },
          "analysis_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Started At"
          },
          "analysis_heartbeat_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Heartbeat At"
          },
          "analysis_cutoff_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analysis Cutoff At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "stopped_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stopped At"
          },
          "analyzed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Analyzed At"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "content_warning": {
            "type": "string",
            "title": "Content Warning",
            "default": "Token Doctor stores normalized request and response content verbatim, which may include PII or secrets, and sends retained text to a Laminarity-controlled analysis provider when you analyze it. When replay validation is enabled, sanitized request variants may also be resubmitted to the captured provider. Deletion removes active database rows; encrypted backups expire according to the published backup-retention policy."
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "status",
          "sampling_rate",
          "max_samples",
          "starts_at",
          "ends_at",
          "sample_count",
          "retained_bytes",
          "skipped_oversize_samples",
          "report",
          "analysis_error",
          "analysis_run_id",
          "analysis_task_name",
          "analysis_queued_at",
          "analysis_started_at",
          "analysis_heartbeat_at",
          "analysis_cutoff_at",
          "created_at",
          "started_at",
          "stopped_at",
          "analyzed_at",
          "expires_at"
        ],
        "title": "TokenDoctorSessionOut"
      },
      "ToolCall": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "const": "function",
            "title": "Type",
            "default": "function"
          },
          "function": {
            "$ref": "#/components/schemas/FunctionCall"
          }
        },
        "type": "object",
        "required": [
          "id",
          "function"
        ],
        "title": "ToolCall"
      },
      "ToolDefinition": {
        "properties": {
          "type": {
            "type": "string",
            "const": "function",
            "title": "Type",
            "default": "function"
          },
          "function": {
            "$ref": "#/components/schemas/FunctionDefinition"
          }
        },
        "type": "object",
        "required": [
          "function"
        ],
        "title": "ToolDefinition"
      },
      "UpdateProjectRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "allowed_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Models"
          },
          "excluded_models": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Excluded Models"
          },
          "allowed_providers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Providers"
          },
          "excluded_providers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Excluded Providers"
          },
          "default_alpha": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Alpha"
          },
          "max_input_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Price Microusd Per Million"
          },
          "max_output_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Price Microusd Per Million"
          },
          "default_enable_fallback": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Enable Fallback"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "UpdateProjectRequest"
      },
      "UpdateRoutingConfigurationRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "spec": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RoutingConfigurationSpec"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "UpdateRoutingConfigurationRequest"
      },
      "UpdateTokenDoctorRequest": {
        "properties": {
          "sampling_rate": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Sampling Rate"
          },
          "max_samples": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Samples"
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At"
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "UpdateTokenDoctorRequest"
      },
      "UserOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "balance_microusd": {
            "type": "integer",
            "title": "Balance Microusd"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "balance_microusd"
        ],
        "title": "UserOut"
      },
      "UsersPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/UserOut"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "page",
          "limit"
        ],
        "title": "UsersPage"
      },
      "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"
      }
    },
    "securitySchemes": {
      "LaminarityApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Laminarity API key",
        "description": "A project API key created in the Laminarity dashboard."
      }
    }
  },
  "tags": [
    {
      "name": "chat",
      "description": "OpenAI-compatible chat completions -- the core client-facing API."
    },
    {
      "name": "responses",
      "description": "Stateless OpenAI Responses-compatible beta subset."
    },
    {
      "name": "models",
      "description": "List the virtual models routable via `chat/completions`."
    }
  ]
}
