LaminarityDocs
View agent text

Laminarity API Reference

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.

Base URL: https://api.laminarity.ai/v1. Authenticate using Authorization: Bearer $LAMINARITY_API_KEY.

Download the complete OpenAPI JSON schema · Read the full documentation as text

/v1/chat/completions

POST Create a chat completion

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.

Request and response contract
{
  "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 Create a response (beta)

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 typed Responses SSE lifecycle. `previous_response_id` and server-side response persistence are not supported; replay prior output items in `input` instead. Unknown top-level fields are ignored and never forwarded. Hosted `web_search` tools are removed before execution and named in the `X-Laminarity-Dropped-Tools` response header.

Request and response contract
{
  "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 typed Responses SSE lifecycle. `previous_response_id` and server-side response persistence are not supported; replay prior output items in `input` instead. Unknown top-level fields are ignored and never forwarded. Hosted `web_search` tools are removed before execution and named in the `X-Laminarity-Dropped-Tools` response header.",
  "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 List routable models

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. Each project routing configuration is listed as `auto:<slug>`, which routes inside that configuration. Models with selectable reasoning expose OpenRouter-compatible reasoning metadata for variant discovery. Token limits appear only where the provider documents them. Requests that send an `anthropic-version` header receive Anthropic's model-list shape instead.

Request and response contract
{
  "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. Each project routing configuration is listed as `auto:<slug>`, which routes inside that configuration. Models with selectable reasoning expose OpenRouter-compatible reasoning metadata for variant discovery. Token limits appear only where the provider documents them. Requests that send an `anthropic-version` header receive Anthropic's model-list shape instead.",
  "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": []
    }
  ]
}
Complete OpenAPI schema, including field definitions
{
  "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 typed Responses SSE lifecycle. `previous_response_id` and server-side response persistence are not supported; replay prior output items in `input` instead. Unknown top-level fields are ignored and never forwarded. Hosted `web_search` tools are removed before execution and named in the `X-Laminarity-Dropped-Tools` response header.",
        "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. Each project routing configuration is listed as `auto:<slug>`, which routes inside that configuration. Models with selectable reasoning expose OpenRouter-compatible reasoning metadata for variant discovery. Token limits appear only where the provider documents them. Requests that send an `anthropic-version` header receive Anthropic's model-list shape instead.",
        "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"
      },
      "AnalysisDetail": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "range_start": {
            "type": "string",
            "format": "date-time",
            "title": "Range Start"
          },
          "range_end": {
            "type": "string",
            "format": "date-time",
            "title": "Range End"
          },
          "requested_count": {
            "type": "integer",
            "title": "Requested Count"
          },
          "sample_count": {
            "type": "integer",
            "title": "Sample Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "report": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report"
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "status",
          "range_start",
          "range_end",
          "requested_count",
          "sample_count",
          "created_at",
          "finished_at",
          "error",
          "report"
        ],
        "title": "AnalysisDetail"
      },
      "AnalysisSummary": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "range_start": {
            "type": "string",
            "format": "date-time",
            "title": "Range Start"
          },
          "range_end": {
            "type": "string",
            "format": "date-time",
            "title": "Range End"
          },
          "requested_count": {
            "type": "integer",
            "title": "Requested Count"
          },
          "sample_count": {
            "type": "integer",
            "title": "Sample Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "status",
          "range_start",
          "range_end",
          "requested_count",
          "sample_count",
          "created_at",
          "finished_at",
          "error"
        ],
        "title": "AnalysisSummary"
      },
      "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"
      },
      "BillingModeInput": {
        "properties": {
          "billing_mode": {
            "type": "string",
            "enum": [
              "managed",
              "byok"
            ],
            "title": "Billing Mode"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "billing_mode"
        ],
        "title": "BillingModeInput"
      },
      "CallError": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code"
        ],
        "title": "CallError"
      },
      "CallStatus": {
        "type": "string",
        "enum": [
          "success",
          "error",
          "timeout",
          "cancelled"
        ],
        "title": "CallStatus",
        "description": "Status of the model call itself -- NOT task success."
      },
      "CandidatePool": {
        "properties": {
          "models": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Models"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "models"
        ],
        "title": "CandidatePool"
      },
      "CaptureSample": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "sample": {
            "$ref": "#/components/schemas/Sample"
          },
          "flow_authorized": {
            "type": "boolean",
            "title": "Flow Authorized"
          }
        },
        "type": "object",
        "required": [
          "id",
          "sample",
          "flow_authorized"
        ],
        "title": "CaptureSample"
      },
      "CaptureSettings": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "sampling_rate": {
            "type": "number",
            "title": "Sampling Rate"
          },
          "config_version": {
            "type": "integer",
            "title": "Config Version"
          },
          "retention_days": {
            "type": "integer",
            "title": "Retention Days",
            "default": 30
          },
          "max_samples": {
            "type": "integer",
            "title": "Max Samples",
            "default": 10000
          },
          "content_warning": {
            "type": "string",
            "title": "Content Warning",
            "default": "Collection saves request and response content for TokenOps and Flow. Content may contain personal information or secrets; redaction is not implemented. Turning collection off keeps previously saved data available."
          }
        },
        "type": "object",
        "required": [
          "enabled",
          "sampling_rate",
          "config_version"
        ],
        "title": "CaptureSettings"
      },
      "ChatArtifactEventOut": {
        "properties": {
          "action": {
            "type": "string",
            "title": "Action"
          },
          "artifact": {
            "$ref": "#/components/schemas/ChatArtifactOut"
          }
        },
        "type": "object",
        "required": [
          "action",
          "artifact"
        ],
        "title": "ChatArtifactEventOut"
      },
      "ChatArtifactOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "media_type": {
            "type": "string",
            "title": "Media Type"
          },
          "size_bytes": {
            "type": "integer",
            "title": "Size Bytes"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "content_url": {
            "type": "string",
            "title": "Content Url"
          },
          "download_url": {
            "type": "string",
            "title": "Download Url"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "media_type",
          "size_bytes",
          "created_at",
          "updated_at",
          "content_url",
          "download_url"
        ],
        "title": "ChatArtifactOut"
      },
      "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
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens",
            "description": "Deprecated OpenAI-compatible completion-token limit. Prefer max_completion_tokens."
          },
          "max_completion_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "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,
                "minimum": -2
              },
              {
                "type": "null"
              }
            ],
            "title": "Frequency Penalty"
          },
          "presence_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2,
                "minimum": -2
              },
              {
                "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,
                "minimum": 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": "integer",
                "maximum": 100,
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Effort",
            "description": "Named reasoning effort, or an integer 1–100 for DeepSeek V4.1 Flash on DeepInfra or Fireworks. Numeric values are reasoning depth, not token budgets. Other model routes reject numeric efforts."
          },
          "reasoning": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReasoningConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reasoning configuration. reasoning.effort aliases reasoning_effort, including provider-scoped numeric depth."
          },
          "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"
              },
              {
                "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,
                "minimum": 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
              },
              {
                "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
              },
              {
                "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"
      },
      "ChatImageOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "media_type": {
            "type": "string",
            "title": "Media Type"
          },
          "size_bytes": {
            "type": "integer",
            "title": "Size Bytes"
          },
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "id",
          "filename",
          "media_type",
          "size_bytes",
          "url"
        ],
        "title": "ChatImageOut"
      },
      "ChatMessageOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "position": {
            "type": "integer",
            "title": "Position"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/ChatImageOut"
            },
            "type": "array",
            "title": "Images"
          },
          "artifact_events": {
            "items": {
              "$ref": "#/components/schemas/ChatArtifactEventOut"
            },
            "type": "array",
            "title": "Artifact Events"
          },
          "model_requested": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Requested"
          },
          "model_used": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Used"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "role",
          "content",
          "status",
          "position",
          "images",
          "artifact_events",
          "created_at"
        ],
        "title": "ChatMessageOut"
      },
      "ChatModelOut": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          }
        },
        "type": "object",
        "required": [
          "id",
          "provider"
        ],
        "title": "ChatModelOut"
      },
      "ChatProjectOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "ChatProjectOut"
      },
      "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"
      },
      "ConversationDetailOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "running": {
            "type": "boolean",
            "title": "Running"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ChatMessageOut"
            },
            "type": "array",
            "title": "Messages"
          },
          "artifacts": {
            "items": {
              "$ref": "#/components/schemas/ChatArtifactOut"
            },
            "type": "array",
            "title": "Artifacts"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "created_at",
          "updated_at",
          "running",
          "messages",
          "artifacts"
        ],
        "title": "ConversationDetailOut"
      },
      "ConversationOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "running": {
            "type": "boolean",
            "title": "Running"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "created_at",
          "updated_at",
          "running"
        ],
        "title": "ConversationOut"
      },
      "ConversationPageOut": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConversationOut"
            },
            "type": "array",
            "title": "Items"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "type": "object",
        "required": [
          "items",
          "has_more",
          "next_cursor"
        ],
        "title": "ConversationPageOut"
      },
      "Cost": {
        "properties": {
          "amount_microusd": {
            "type": "integer",
            "minimum": 0,
            "title": "Amount Microusd"
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          },
          "basis": {
            "$ref": "#/components/schemas/CostBasis"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "amount_microusd",
          "basis"
        ],
        "title": "Cost",
        "description": "Cost of one attempt. Carried, never recomputed from token counts."
      },
      "CostBasis": {
        "type": "string",
        "enum": [
          "charged",
          "estimated"
        ],
        "title": "CostBasis"
      },
      "CreateAnalysis": {
        "properties": {
          "requested_count": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Requested Count",
            "default": 1000
          },
          "start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start"
          },
          "end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "CreateAnalysis"
      },
      "CreateApiKeyRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "spend_limit_microusd": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 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,
            "minimum": 1000,
            "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
              },
              {
                "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,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Alpha"
          },
          "max_input_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Price Microusd Per Million"
          },
          "max_output_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 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,
            "exclusiveMinimum": 0,
            "title": "Sampling Rate"
          },
          "max_samples": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "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,
            "title": "Initial Balance Microusd",
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email"
        ],
        "title": "CreateUserRequest"
      },
      "CredentialInput": {
        "properties": {
          "api_key": {
            "type": "string",
            "maxLength": 4096,
            "minLength": 16,
            "format": "password",
            "title": "Api Key",
            "writeOnly": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "api_key"
        ],
        "title": "CredentialInput"
      },
      "CredentialOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "suffix": {
            "type": "string",
            "title": "Suffix"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "provider",
          "suffix",
          "status",
          "created_at"
        ],
        "title": "CredentialOut"
      },
      "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,
            "title": "Amount Microusd"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "amount_microusd"
        ],
        "title": "CreditUserRequest"
      },
      "CustomGrammarFormat": {
        "properties": {
          "type": {
            "type": "string",
            "const": "grammar",
            "title": "Type"
          },
          "syntax": {
            "type": "string",
            "enum": [
              "lark",
              "regex"
            ],
            "title": "Syntax"
          },
          "definition": {
            "type": "string",
            "minLength": 1,
            "title": "Definition"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "syntax",
          "definition"
        ],
        "title": "CustomGrammarFormat"
      },
      "CustomTextFormat": {
        "properties": {
          "type": {
            "type": "string",
            "const": "text",
            "title": "Type"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type"
        ],
        "title": "CustomTextFormat"
      },
      "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,
            "minimum": 1,
            "title": "Max Attempts",
            "default": 3
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "FallbackPolicy"
      },
      "FlowPolicyDetail": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "text_view": {
            "type": "string",
            "title": "Text View"
          },
          "encoder_contract_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encoder Contract Sha"
          },
          "dataset_fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dataset Fingerprint"
          },
          "sample_count": {
            "type": "integer",
            "title": "Sample Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "activated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated At"
          },
          "report": {
            "additionalProperties": true,
            "type": "object",
            "title": "Report"
          },
          "label_map": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label Map"
          },
          "holdout_touched_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Holdout Touched At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "version",
          "status",
          "text_view",
          "encoder_contract_sha",
          "dataset_fingerprint",
          "sample_count",
          "created_at",
          "activated_at",
          "report",
          "label_map",
          "holdout_touched_at"
        ],
        "title": "FlowPolicyDetail"
      },
      "FlowPolicyOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "text_view": {
            "type": "string",
            "title": "Text View"
          },
          "encoder_contract_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Encoder Contract Sha"
          },
          "dataset_fingerprint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dataset Fingerprint"
          },
          "sample_count": {
            "type": "integer",
            "title": "Sample Count"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "activated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "version",
          "status",
          "text_view",
          "encoder_contract_sha",
          "dataset_fingerprint",
          "sample_count",
          "created_at",
          "activated_at"
        ],
        "title": "FlowPolicyOut"
      },
      "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"
      },
      "ImageInput": {
        "properties": {
          "filename": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Filename"
          },
          "data_url": {
            "type": "string",
            "maxLength": 6990764,
            "minLength": 1,
            "title": "Data Url"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "filename",
          "data_url"
        ],
        "title": "ImageInput"
      },
      "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."
          },
          "reasoning_content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Content",
            "description": "Reasoning text, for display. Older responses carried an opaque replay string here; it is still accepted on input."
          },
          "reasoning_details": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Details",
            "description": "Opaque, provider-signed reasoning blocks (OpenRouter-compatible `reasoning.text` / `reasoning.encrypted` entries). Replay them unchanged on the assistant message to keep reasoning continuity across tool turns."
          },
          "refusal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refusal",
            "description": "Provider refusal text, when returned."
          },
          "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"
      },
      "Metrics": {
        "properties": {
          "accuracy": {
            "type": "number",
            "title": "Accuracy"
          },
          "macro_f1": {
            "type": "number",
            "title": "Macro F1"
          },
          "baseline_accuracy": {
            "type": "number",
            "title": "Baseline Accuracy"
          },
          "labels": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Labels"
          },
          "confusion_matrix": {
            "items": {
              "items": {
                "type": "integer"
              },
              "type": "array"
            },
            "type": "array",
            "title": "Confusion Matrix"
          }
        },
        "type": "object",
        "required": [
          "accuracy",
          "macro_f1",
          "baseline_accuracy",
          "labels",
          "confusion_matrix"
        ],
        "title": "Metrics"
      },
      "ModelCount": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "model",
          "count"
        ],
        "title": "ModelCount"
      },
      "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"
              }
            ]
          },
          "responses_custom_tools": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Responses Custom Tools",
            "description": "Whether the model's native Responses integration accepts custom tools with text or Lark/regex grammar input. Separate from Chat function tools; live account availability is not implied."
          },
          "responses_client_tool_search": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Responses Client Tool Search",
            "description": "Whether native Responses supports client-executed tool search with flat function/custom results. Hosted search and namespace definitions are not included; live account availability is not implied."
          },
          "numeric_reasoning_effort": {
            "anyOf": [
              {
                "type": "string",
                "const": "scale_1_100"
              },
              {
                "type": "null"
              }
            ],
            "title": "Numeric Reasoning Effort",
            "description": "When present, Chat reasoning_effort and Responses reasoning.effort accept integers 1–100 as provider-specific reasoning depth, not a token budget. No numeric default is implied."
          },
          "context_window": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context Window",
            "description": "Total tokens (input plus output) per request, from the provider's documentation. For `auto` ids, the smallest across the models it can route to; omitted when any of them is unpublished."
          },
          "max_input_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Tokens",
            "description": "Largest prompt accepted when the provider caps input below the context window."
          },
          "max_output_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Tokens",
            "description": "Largest completion the provider documents; omitted when it publishes no separate cap."
          },
          "supports_tools": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Supports Tools",
            "description": "Whether `/v1/chat/completions` accepts function tools for this model. Native Responses tool support is described by the `responses_*` fields."
          },
          "supports_parallel_tool_calls": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Supports Parallel Tool Calls",
            "description": "Whether `/v1/chat/completions` can honour `parallel_tool_calls` for this model."
          }
        },
        "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"
      },
      "Operation": {
        "type": "string",
        "enum": [
          "chat",
          "decision",
          "embedding"
        ],
        "title": "Operation",
        "description": "The kind of model call. Mirrors OTel's gen_ai.operation.name."
      },
      "Outcome": {
        "properties": {
          "status": {
            "$ref": "#/components/schemas/OutcomeStatus"
          },
          "source": {
            "$ref": "#/components/schemas/OutcomeSource"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Observed At"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "rubric_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rubric Version"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "source",
          "observed_at"
        ],
        "title": "Outcome",
        "description": "Task-level result -- not whether the API returned HTTP 200."
      },
      "OutcomeSource": {
        "type": "string",
        "enum": [
          "application",
          "human",
          "evaluator"
        ],
        "title": "OutcomeSource"
      },
      "OutcomeStatus": {
        "type": "string",
        "enum": [
          "success",
          "failure",
          "partial",
          "unknown"
        ],
        "title": "OutcomeStatus",
        "description": "Task-level result. Missing outcomes are UNKNOWN, never SUCCESS."
      },
      "Overview": {
        "properties": {
          "available": {
            "type": "boolean",
            "title": "Available"
          },
          "paused": {
            "type": "boolean",
            "title": "Paused"
          },
          "resume_required": {
            "type": "boolean",
            "title": "Resume Required"
          },
          "training_credits": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Training Credits"
          },
          "runs_remaining": {
            "type": "integer",
            "title": "Runs Remaining"
          },
          "readiness": {
            "$ref": "#/components/schemas/Readiness"
          },
          "policies": {
            "items": {
              "$ref": "#/components/schemas/Policy"
            },
            "type": "array",
            "title": "Policies"
          }
        },
        "type": "object",
        "required": [
          "available",
          "paused",
          "resume_required",
          "training_credits",
          "runs_remaining",
          "readiness",
          "policies"
        ],
        "title": "Overview"
      },
      "PercentileThresholds": {
        "properties": {
          "p50": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "P50"
          },
          "p75": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "P75"
          },
          "p90": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "P90"
          },
          "p99": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "P99"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PercentileThresholds"
      },
      "PerformancePreferences": {
        "properties": {
          "preferred_max_latency_seconds": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "$ref": "#/components/schemas/PercentileThresholds"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Max Latency Seconds"
          },
          "preferred_min_throughput_tokens_per_second": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0
              },
              {
                "$ref": "#/components/schemas/PercentileThresholds"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Min Throughput Tokens Per Second"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PerformancePreferences"
      },
      "Policy": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "training",
              "candidate",
              "active",
              "retired",
              "rejected",
              "failed"
            ],
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "sample_count": {
            "type": "integer",
            "title": "Sample Count"
          },
          "compatible": {
            "type": "boolean",
            "title": "Compatible"
          },
          "reasons": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Reasons"
          },
          "metrics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Metrics"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "version",
          "status",
          "created_at",
          "sample_count",
          "compatible",
          "reasons",
          "metrics"
        ],
        "title": "Policy"
      },
      "PolicyAction": {
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "activate",
              "delete"
            ],
            "title": "Action"
          },
          "policy_id": {
            "type": "string",
            "format": "uuid",
            "title": "Policy Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "action",
          "policy_id"
        ],
        "title": "PolicyAction"
      },
      "PriceGate": {
        "properties": {
          "max_input_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Microusd Per Million"
          },
          "max_output_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Microusd Per Million"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PriceGate"
      },
      "ProjectAction": {
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "pause",
              "resume",
              "delete_all"
            ],
            "title": "Action"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "action"
        ],
        "title": "ProjectAction"
      },
      "ProjectOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "billing_mode": {
            "type": "string",
            "title": "Billing Mode",
            "default": "managed"
          },
          "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
              },
              {
                "$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
              },
              {
                "$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,
            "minimum": 0,
            "title": "Alpha",
            "default": 0.8
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "QualityCostRanking"
      },
      "Readiness": {
        "properties": {
          "ready": {
            "type": "boolean",
            "title": "Ready"
          },
          "eligible_samples": {
            "type": "integer",
            "title": "Eligible Samples"
          },
          "model_counts": {
            "items": {
              "$ref": "#/components/schemas/ModelCount"
            },
            "type": "array",
            "title": "Model Counts"
          },
          "range_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Range Start"
          },
          "range_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Range End"
          },
          "new_samples": {
            "type": "integer",
            "title": "New Samples"
          },
          "reasons": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Reasons"
          }
        },
        "type": "object",
        "required": [
          "ready",
          "eligible_samples",
          "model_counts",
          "range_start",
          "range_end",
          "new_samples",
          "reasons"
        ],
        "title": "Readiness"
      },
      "ReasoningConfig": {
        "properties": {
          "effort": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "minimal",
                  "low",
                  "medium",
                  "high",
                  "xhigh",
                  "max"
                ]
              },
              {
                "type": "integer",
                "maximum": 100,
                "minimum": 1
              },
              {
                "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"
      },
      "Redaction": {
        "properties": {
          "applied": {
            "type": "boolean",
            "title": "Applied",
            "default": false
          },
          "policy_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Version"
          },
          "fields_affected": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Fields Affected"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "Redaction",
        "description": "What the redaction stage did. Visible because it degrades replay."
      },
      "RenameConversationRequest": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Title"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "title"
        ],
        "title": "RenameConversationRequest"
      },
      "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"
          },
          "source": {
            "type": "string",
            "title": "Source"
          },
          "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"
          },
          "billing_mode": {
            "type": "string",
            "title": "Billing Mode",
            "default": "legacy"
          },
          "fee_bps": {
            "type": "integer",
            "title": "Fee Bps",
            "default": 0
          },
          "published_cost_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published Cost Microusd"
          },
          "router_fee_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Router Fee 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"
          },
          "harness_family": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Harness Family"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "api_key_id",
          "request_id",
          "source",
          "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"
      },
      "ResponseCustomTool": {
        "properties": {
          "type": {
            "type": "string",
            "const": "custom",
            "title": "Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomTextFormat"
              },
              {
                "$ref": "#/components/schemas/CustomGrammarFormat"
              },
              {
                "type": "null"
              }
            ],
            "title": "Format"
          },
          "defer_loading": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defer Loading"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "name"
        ],
        "title": "ResponseCustomTool"
      },
      "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"
          },
          "defer_loading": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Defer Loading"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ResponseFunctionTool"
      },
      "ResponseNamespaceTool": {
        "properties": {
          "type": {
            "type": "string",
            "const": "namespace",
            "title": "Type"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tools": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ResponseFunctionTool"
                },
                {
                  "$ref": "#/components/schemas/ResponseCustomTool"
                }
              ]
            },
            "type": "array",
            "minItems": 1,
            "title": "Tools"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "name",
          "tools"
        ],
        "title": "ResponseNamespaceTool",
        "description": "A named group of function and custom tools, called with `namespace` set."
      },
      "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 messages, function/custom tool calls and outputs, client tool-search history, a leading developer `additional_tools` item, and authenticated reasoning replay items. Custom, namespace, additional_tools and tool-search items require declared native Responses support."
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions",
            "description": "Developer/system instructions prepended to the input."
          },
          "tools": {
            "anyOf": [
              {
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ResponseFunctionTool"
                    },
                    {
                      "$ref": "#/components/schemas/ResponseCustomTool"
                    },
                    {
                      "$ref": "#/components/schemas/ResponseToolSearch"
                    },
                    {
                      "$ref": "#/components/schemas/ResponseNamespaceTool"
                    },
                    {
                      "$ref": "#/components/schemas/ResponseWebSearchTool"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tools",
            "description": "Function tools, or custom tools, namespaces and client-executed tool search on declared native Responses models. Hosted web_search is removed before execution and reported in the X-Laminarity-Dropped-Tools header; other hosted tools are rejected."
          },
          "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
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Output Tokens"
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop",
            "description": "Chat Completions-style stop sequences. Models that cannot honour them run without them, and the X-Laminarity-Adjusted response header says so."
          },
          "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",
            "description": "Reasoning effort and optional native summary mode. effort accepts named levels, or the provider extension integer 1–100 for DeepSeek V4.1 Flash on DeepInfra and Fireworks. Numeric effort controls depth, not a token budget, and is preserved in the response. Omission preserves the provider default."
          },
          "store": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Store"
          },
          "service_tier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Tier",
            "description": "Omit or use 'default' for Standard pricing. Other service tiers are rejected."
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "include": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "const": "reasoning.encrypted_content"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Include"
          },
          "previous_response_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Response Id",
            "description": "Not currently supported. Replay prior output items in input instead."
          },
          "prompt_cache_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Cache Key",
            "description": "Prompt-cache routing hint. Used for cache affinity and forwarded to the provider when supported."
          },
          "client_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Metadata",
            "description": "Accepted for client compatibility; never forwarded."
          },
          "background": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Background",
            "description": "Background responses are not supported; omit or use false."
          },
          "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,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Alpha"
          },
          "max_input_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Price Microusd Per Million"
          },
          "max_output_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 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"
      },
      "ResponseToolSearch": {
        "properties": {
          "type": {
            "type": "string",
            "const": "tool_search",
            "title": "Type"
          },
          "execution": {
            "type": "string",
            "const": "client",
            "title": "Execution"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "parameters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parameters"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type",
          "execution"
        ],
        "title": "ResponseToolSearch"
      },
      "ResponseWebSearchTool": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "web_search",
              "web_search_preview"
            ],
            "title": "Type"
          },
          "external_web_access": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Web Access"
          },
          "indexed_web_access": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Indexed Web Access"
          },
          "filters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filters"
          },
          "user_location": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Location"
          },
          "search_context_size": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Context Size"
          },
          "search_content_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Search Content Types"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "type"
        ],
        "title": "ResponseWebSearchTool",
        "description": "Hosted search a client may offer. Laminarity removes it before execution."
      },
      "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
          },
          "flow_opted_in": {
            "type": "boolean",
            "title": "Flow Opted In",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "candidates"
        ],
        "title": "RoutingConfigurationSpec",
        "description": "Constrained routing configuration compiled by the router."
      },
      "Sample": {
        "properties": {
          "schema_version": {
            "type": "integer",
            "const": 2,
            "title": "Schema Version",
            "default": 2
          },
          "request_id": {
            "type": "string",
            "minLength": 1,
            "title": "Request Id"
          },
          "logical_request_id": {
            "type": "string",
            "minLength": 1,
            "title": "Logical Request Id"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "step_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Id"
          },
          "workflow": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Workflow"
              },
              {
                "type": "null"
              }
            ]
          },
          "operation": {
            "$ref": "#/components/schemas/Operation",
            "default": "chat"
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At"
          },
          "completed_at": {
            "type": "string",
            "format": "date-time",
            "title": "Completed At"
          },
          "status": {
            "$ref": "#/components/schemas/CallStatus"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "model_requested": {
            "type": "string",
            "minLength": 1,
            "title": "Model Requested"
          },
          "model_used": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Used"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": false
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CallError"
              },
              {
                "type": "null"
              }
            ]
          },
          "protocol": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "chat_completions",
                  "responses"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Protocol"
          },
          "transport": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transport"
          },
          "adapter_generation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Adapter Generation"
          },
          "execution_profile": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Profile"
          },
          "feature_requirements": {
            "additionalProperties": true,
            "type": "object",
            "title": "Feature Requirements"
          },
          "fallback_used": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Used"
          },
          "logical_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CallStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "text_view": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text View"
          },
          "routing_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Routing Text"
          },
          "price_snapshot": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Snapshot"
          },
          "replay_eligible": {
            "type": "boolean",
            "title": "Replay Eligible",
            "default": false
          },
          "request": {
            "additionalProperties": true,
            "type": "object",
            "title": "Request"
          },
          "response": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Usage"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Cost"
              },
              {
                "type": "null"
              }
            ]
          },
          "outcome": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Outcome"
              },
              {
                "type": "null"
              }
            ]
          },
          "redaction": {
            "$ref": "#/components/schemas/Redaction"
          },
          "payload_truncated": {
            "type": "boolean",
            "title": "Payload Truncated",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "request_id",
          "logical_request_id",
          "started_at",
          "completed_at",
          "status",
          "model_requested",
          "request"
        ],
        "title": "Sample",
        "description": "One model-call attempt, including its final response or error.\n\nA retry is a separate sample with its own request_id."
      },
      "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"
          },
          "charged_microusd": {
            "type": "integer",
            "title": "Charged Microusd"
          },
          "billing_mode": {
            "type": "string",
            "title": "Billing Mode",
            "default": "legacy"
          },
          "fee_bps": {
            "type": "integer",
            "title": "Fee Bps",
            "default": 0
          },
          "published_cost_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published Cost Microusd"
          },
          "router_fee_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Router Fee 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",
          "charged_microusd",
          "baseline_microusd",
          "savings_microusd",
          "usage_confidence",
          "latency_ms"
        ],
        "title": "SavingsRequestOut",
        "description": "Compare published provider usage; charged_microusd is the separate wallet debit."
      },
      "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"
      },
      "StartRunRequest": {
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "model": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Model"
          },
          "routing_config": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Routing Config",
            "description": "Project-owned routing configuration id or slug, used with model='auto'."
          },
          "content": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/ImageInput"
            },
            "type": "array",
            "title": "Images"
          },
          "regenerate": {
            "type": "boolean",
            "title": "Regenerate",
            "default": false
          },
          "active_artifact_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Artifact Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "project_id",
          "model"
        ],
        "title": "StartRunRequest"
      },
      "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"
      },
      "TokenOpsBillingOut": {
        "properties": {
          "plans": {
            "items": {
              "$ref": "#/components/schemas/TokenOpsPlanOut"
            },
            "type": "array",
            "title": "Plans"
          },
          "subscription": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TokenOpsSubscriptionOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "available_credits": {
            "type": "integer",
            "title": "Available Credits"
          },
          "reserved_credits": {
            "type": "integer",
            "title": "Reserved Credits"
          },
          "billing_enabled": {
            "type": "boolean",
            "title": "Billing Enabled"
          }
        },
        "type": "object",
        "required": [
          "plans",
          "subscription",
          "available_credits",
          "reserved_credits",
          "billing_enabled"
        ],
        "title": "TokenOpsBillingOut"
      },
      "TokenOpsBillingUrlOut": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "TokenOpsBillingUrlOut"
      },
      "TokenOpsCheckoutRequest": {
        "properties": {
          "plan": {
            "type": "string",
            "enum": [
              "starter",
              "growth",
              "business"
            ],
            "title": "Plan"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plan"
        ],
        "title": "TokenOpsCheckoutRequest"
      },
      "TokenOpsPlanOut": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "monthly_price_cents": {
            "type": "integer",
            "title": "Monthly Price Cents"
          },
          "credits": {
            "type": "integer",
            "title": "Credits"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "monthly_price_cents",
          "credits"
        ],
        "title": "TokenOpsPlanOut"
      },
      "TokenOpsSubscriptionOut": {
        "properties": {
          "plan": {
            "type": "string",
            "title": "Plan"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "cancel_at_period_end": {
            "type": "boolean",
            "title": "Cancel At Period End"
          },
          "cancel_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancel At"
          },
          "current_period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Current Period End"
          }
        },
        "type": "object",
        "required": [
          "plan",
          "status",
          "cancel_at_period_end",
          "current_period_end"
        ],
        "title": "TokenOpsSubscriptionOut"
      },
      "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"
      },
      "Train": {
        "properties": {
          "action": {
            "type": "string",
            "const": "train",
            "title": "Action"
          },
          "expected_credits": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "title": "Expected Credits"
          },
          "request_id": {
            "type": "string",
            "format": "uuid",
            "title": "Request Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "action",
          "expected_credits",
          "request_id"
        ],
        "title": "Train"
      },
      "UpdateCaptureSettings": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "sampling_rate": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Sampling Rate"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "UpdateCaptureSettings"
      },
      "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,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Alpha"
          },
          "max_input_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Input Price Microusd Per Million"
          },
          "max_output_price_microusd_per_million": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 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,
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Sampling Rate"
          },
          "max_samples": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 1000,
                "minimum": 1
              },
              {
                "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"
      },
      "Usage": {
        "properties": {
          "reported_input_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Reported Input Tokens"
          },
          "input_tokens_uncached": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Tokens Uncached"
          },
          "output_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Tokens"
          },
          "cache_read_input_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Read Input Tokens"
          },
          "cache_write_input_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write Input Tokens"
          },
          "cache_write_1h_input_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache Write 1H Input Tokens"
          },
          "reasoning_output_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Reasoning Output Tokens"
          },
          "confidence": {
            "$ref": "#/components/schemas/UsageConfidence",
            "default": "unknown"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "Usage",
        "description": "Decomposed, non-overlapping token accounting.\n\nProviders disagree about whether cached tokens are included in the prompt\ntoken count: Anthropic's ``input_tokens`` excludes them, OpenAI's\n``prompt_tokens`` includes them. Storing either provider's raw number\ncorrupts cost math in a provider-dependent direction, so this model stores\nnon-overlapping parts and preserves a separately reported total when the\nprovider does not report the split. Unknown parts remain unknown."
      },
      "UsageConfidence": {
        "type": "string",
        "enum": [
          "reported",
          "estimated",
          "unknown"
        ],
        "title": "UsageConfidence"
      },
      "UserOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "balance_microusd": {
            "type": "integer",
            "title": "Balance Microusd"
          },
          "inference_billing_version": {
            "type": "integer",
            "title": "Inference Billing Version",
            "default": 0
          }
        },
        "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"
      },
      "Workflow": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "inferred": {
            "type": "boolean",
            "title": "Inferred",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "Workflow",
        "description": "Stable workload identity, used to avoid comparing unlike traffic."
      }
    },
    "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`."
    }
  ]
}
Docs build local