{"openapi":"3.1.0","info":{"title":"Backboard API","description":"\n# Welcome to Backboard API\n\nBuild conversational AI applications with persistent memory and intelligent document processing.\n\n## Endpoint URL\n```\nhttps://app.backboard.io/api\n```\n\n## API Architecture\n\nUnderstanding the core concepts of Backboard API will help you build powerful conversational AI applications.\n\n### **Assistant**\nAn **Assistant** is an AI agent with specific instructions and capabilities. Think of it as a specialized AI persona that you configure once and use across multiple conversations.\n\n**Key Properties:**\n- `assistant_id` - Unique identifier for the assistant\n- `name` - Human-readable name for your assistant\n- `system_prompt` - Instructions that define the assistant's behavior and personality\n- `llm_provider` - AI provider (e.g., \"openai\", \"anthropic\", \"google\")\n- `model_name` - Specific model to use (e.g., \"gpt-4o\", \"claude-3-5-sonnet-20241022\")\n- `tools` - Optional tools the assistant can use (web search, function calling, etc.)\n- `embedding_provider` & `embedding_model_name` - Models used for RAG and memory operations\n\n**Use Cases:**\n- Customer support bot with specific product knowledge\n- Code review assistant with particular coding standards\n- Research assistant with domain expertise\n\n---\n\n### **Thread**\nA **Thread** represents a persistent conversation session. It maintains the full context and history of messages between a user and an assistant.\n\n**Key Properties:**\n- `thread_id` - Unique identifier for the conversation thread\n- `assistant_id` - The assistant associated with this thread\n- Messages are automatically stored and retrieved within the thread\n\n**Important Notes:**\n- Threads maintain conversation history across multiple API calls\n- Each thread is tied to a specific assistant\n- You can have multiple threads per assistant (e.g., different users or topics)\n- Threads persist indefinitely unless explicitly deleted\n\n**Example Flow:**\n```\nUser creates Thread A → sends messages → conversation is saved\nDays later → same Thread A → assistant remembers full context\n```\n\n---\n\n### **Message**\nA **Message** is a single interaction within a thread - either from the user or the assistant's response.\n\n**Key Properties:**\n- `content` - The text content of the message\n- `role` - Either \"user\" or \"assistant\"\n- `thread_id` - Which thread this message belongs to\n- `stream` - Whether to stream the response (true/false)\n- `memory` - Memory mode: \"Auto\", \"On\", \"Off\" (controls persistent memory features)\n\n**Streaming vs Non-Streaming:**\n- **Non-streaming**: Wait for the complete response (simpler, use for batch processing)\n- **Streaming**: Receive response in real-time chunks (better UX for chat interfaces)\n\n---\n\n### **Document**\n**Documents** are files you upload to provide context to your assistant. They can be attached at the assistant level (available to all threads) or thread level (specific conversation only).\n\n**Key Properties:**\n- `document_id` - Unique identifier for the document\n- `filename` - Original filename\n- `status` - Processing status: \"processing\", \"completed\", \"error\"\n- `assistant_id` or `thread_id` - Where the document is attached\n\n**Supported Formats:**\n- PDF documents\n- Text files (.txt, .md)\n- Microsoft Office (.docx, .xlsx, .pptx)\n- CSV and JSON files\n- Source code files\n\n**Processing Pipeline:**\n1. Upload document via API\n2. Backboard chunks and indexes the content\n3. Status changes from \"processing\" to \"completed\"\n4. Document content is available for RAG (Retrieval-Augmented Generation)\n\n---\n\n### **Memory**\n**Memory** is an advanced feature that enables assistants to remember facts, preferences, and context across conversations and even across different threads.\n\n**Memory Modes:**\n- **\"Off\"**: No persistent memory, only uses conversation history\n- **\"On\"**: Explicitly saves and retrieves memories for context\n- **\"Auto\"**: Intelligently determines when to use memory (recommended)\n\n**How It Works:**\n- Automatically extracts key facts from conversations\n- Stores them in a semantic knowledge base\n- Retrieves relevant memories for future messages\n- Works across different threads with the same assistant\n\n**Example:**\n```\nThread 1: User mentions \"I prefer Python over JavaScript\"\nThread 2 (days later): Assistant remembers this preference\n```\n\n---\n\n## Typical Workflow\n\nHere's how these components work together:\n\n```\n1. Create an Assistant\n   └─ Define behavior, choose model, configure tools\n   \n2. Create a Thread (per conversation/user)\n   └─ Links to the assistant you created\n   \n3. Upload Documents (optional)\n   └─ Attach to assistant (all threads) or specific thread\n   \n4. Send Messages\n   └─ User messages → Assistant responses\n   └─ Conversation history is automatically maintained\n   \n5. Memory (optional)\n   └─ Enable with memory=\"Auto\" to persist learnings\n```\n\n---\n\n## Core Features\n\n### **Persistent Conversations**\nCreate conversation threads that maintain context across multiple messages and support file attachments.\n\n### **Intelligent Document Processing**\nUpload and process documents (PDF, text, Office files) with automatic chunking and indexing for retrieval.\n\n### **AI Assistants**\nCreate specialized assistants with custom instructions, document access, and tool capabilities.\n\n## Quickstart\n\n```python\nimport requests\n\nAPI_KEY = \"your_api_key\"\nBASE_URL = \"https://app.backboard.io/api\"\nHEADERS = {\"X-API-Key\": API_KEY}\n\n# 1) Create assistant\nresponse = requests.post(\n    f\"{BASE_URL}/assistants\",\n    json={\"name\": \"Support Bot\", \"system_prompt\": \"After every response, pass a joke at the end of the response!\"},\n    headers=HEADERS,\n)\nassistant_id = response.json()[\"assistant_id\"]\n\n# 2) Create thread\nresponse = requests.post(\n    f\"{BASE_URL}/assistants/{assistant_id}/threads\",\n    json={},\n    headers=HEADERS,\n)\nthread_id = response.json()[\"thread_id\"]\n\n# 3) Send message\nresponse = requests.post(\n    f\"{BASE_URL}/threads/{thread_id}/messages\",\n    headers=HEADERS,\n    data={\"content\": \"Tell me about Canada in detail.\", \"stream\": \"false\", \"memory\": \"Auto\"},\n)\nprint(response.json().get(\"content\"))\n```\n\n---\n\nExplore the **Assistants**, **Threads**, and **Documents** sections in the sidebar.\n    ","version":"1.0.0"},"paths":{"/threads":{"get":{"tags":["Threads"],"summary":"List Threads","description":"List all threads for the currently authenticated user.","operationId":"list_threads_threads_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"include_messages","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Messages"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Thread"},"title":"Response List Threads Threads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{thread_id}":{"get":{"tags":["Threads"],"summary":"Get Thread","description":"Retrieve a specific thread by its UUID, including all its messages.","operationId":"get_thread_threads__thread_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Threads"],"summary":"Delete Thread","description":"Permanently delete a thread and all its associated messages.","operationId":"delete_thread_threads__thread_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{thread_id}/documents":{"get":{"tags":["Threads"],"summary":"List Thread Documents","description":"List all documents associated with a specific thread.","operationId":"list_thread_documents_threads__thread_id__documents_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRead"},"title":"Response List Thread Documents Threads  Thread Id  Documents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Documents"],"summary":"Upload Document to Thread","description":"Upload a document to be associated with a specific thread and processed for RAG. Supported file types: **Documents** (.pdf, .doc, .docx, .ppt, .pptx, .xls, .xlsx), **Text/Data** (.txt, .csv, .md, .markdown, .json, .jsonl, .xml), **Code** (.py, .js, .ts, .jsx, .tsx, .html, .css, .cpp, .c, .h, .java, .go, .rs, .rb, .php, .sql), **Images** (.png, .jpg, .jpeg, .webp, .gif, .bmp, .tiff, .tif).","operationId":"upload_document_to_thread_threads__thread_id__documents_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_to_thread_threads__thread_id__documents_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{thread_id}/messages":{"post":{"tags":["Threads"],"summary":"Add Message to Thread with Optional Attachments","description":"Add a user message to an existing thread with optional file attachments. Accepts both JSON (application/json) and form-data (multipart/form-data) payloads. Use JSON for text-only messages; use form-data when uploading file attachments. Can send text only, attachments only, or both. Documents must be indexed before further messages are allowed. To choose a model, set llm_provider and model_name. If omitted, defaults are llm_provider=openai and model_name=gpt-4o. When stream=true, the SSE feed emits `content_streaming` answer deltas and may also emit `reasoning_streaming` events when the selected provider exposes native live reasoning deltas; those events are live-only and are not persisted. Set thinking to a flat object such as `{\"effort\": \"high\"}` or `{\"budget_tokens\": 8192}` to request reasoning on supported models/providers. Use `{}` to enable provider defaults. Memory defaults to 'off'. Set memory='Auto' for workspace-scoped memory search and automatic memory operations, or memory='Readonly' for search-only. Supported attachment types: .pdf, .doc(x), .ppt(x), .xls(x), .txt, .csv, .md, .json(l), .xml, .py, .js, .ts, .jsx, .tsx, .html, .css, .cpp, .c, .h, .java, .go, .rs, .rb, .php, .sql, .png, .jpg, .jpeg, .webp, .gif, .bmp, .tiff, .tif, .mp3, .wav, .m4a, .ogg, .flac, .aac (audio), .mp4, .mov, .avi, .mkv, .mpeg, .mpg, .webm (video). Audio/video files are sent inline to models that natively accept them. See the Model Library page in the dashboard (model-library page) for a current list of supported models and providers.","operationId":"add_message_to_thread_threads__thread_id__messages_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Text content of the message"},"llm_provider":{"type":"string","nullable":true,"description":"LLM provider name. Default: openai."},"model_name":{"type":"string","nullable":true,"description":"Model name. Default: gpt-4o."},"system_prompt":{"type":"string","nullable":true,"description":"Per-run system prompt override. Not persisted on the assistant."},"image_generation":{"type":"string","enum":["auto","off"],"default":"off","description":"Image generation: 'auto' enables the generate_image tool (requires image_model_provider and image_model_name); 'off' disables it."},"image_model_provider":{"type":"string","nullable":true,"description":"Required when image_generation=auto. Provider for generate_image (e.g. openrouter). Ignored when image_generation=off."},"image_model_name":{"type":"string","nullable":true,"description":"Required when image_generation=auto. Model for generate_image (e.g. google/gemini-2.5-flash-image). Ignored when image_generation=off."},"stream":{"type":"boolean","default":false,"description":"Whether to stream the AI response."},"thinking":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"effort":{"type":"string","enum":["low","medium","high","max"],"description":"Use for OpenAI, xAI, and Gemini 3 models."},"budget_tokens":{"type":"integer","minimum":0,"description":"Use for Anthropic and Gemini 2.5 models."},"max_tokens":{"type":"integer","minimum":1,"description":"Use for OpenRouter and Cerebras reasoning models."},"exclude_reasoning":{"type":"boolean","description":"Use for OpenRouter and Cerebras reasoning models."}},"description":"Flat reasoning controls inferred from the selected llm_provider/model. Use {} to enable provider defaults, or send only the fields supported by the selected model.","examples":[{},{"effort":"high"},{"budget_tokens":8192},{"max_tokens":4096,"exclude_reasoning":true}]},"openrouter":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"providers":{"type":"array","items":{"type":"string"},"description":"Ranked upstream providers to try, e.g. [\"Fireworks\", \"Together\"]. See GET /billing/models/providers for the available names and their prices."},"allow_fallbacks":{"type":"boolean","description":"When false, the request runs only on `providers` and fails instead of falling back to another upstream (and another price)."},"sort":{"type":"string","enum":["price","throughput","latency"],"description":"Rank the available upstream providers by this criterion."},"ignore":{"type":"array","items":{"type":"string"},"description":"Upstream providers to exclude for this request."},"max_price":{"type":"object","additionalProperties":false,"properties":{"prompt":{"type":"number","minimum":0,"description":"Max USD per 1M prompt tokens."},"completion":{"type":"number","minimum":0,"description":"Max USD per 1M completion tokens."}},"description":"Skip upstream endpoints priced above this ceiling."},"allowed_models":{"type":"array","items":{"type":"string"},"description":"Auto Router only (model_name='openrouter/auto'): restrict selection with wildcard patterns, e.g. [\"anthropic/*\"]."},"excluded_models":{"type":"array","items":{"type":"string"},"description":"Auto Router only: exclude models by wildcard pattern."},"cost_tier":{"type":"string","enum":["low","medium","high","xhigh","max"],"description":"Auto Router only: cost band to route within."}},"description":"OpenRouter-only routing options (ignored for other providers). OpenRouter serves each model from multiple upstream providers at different prices; omit this object to let it choose automatically. You are always billed the exact amount the serving provider charged.","examples":[{"sort":"price"},{"providers":["Together"],"allow_fallbacks":false},{"ignore":["Fireworks"],"max_price":{"completion":1.0}},{"cost_tier":"high"}]},"tools":{"type":"array","items":{"type":"object"},"nullable":true,"description":"Optional per-message tool override (OpenAI-style). Not persisted on the assistant."},"memory":{"type":"string","default":"off","description":"Memory Lite mode (no reranking): 'Auto', 'Readonly', or 'off' (default). Cannot be used together with memory_pro."},"memory_response_citation":{"type":"boolean","default":false,"description":"Whether the assistant should cite retrieved memories in its response text."},"memory_citation":{"type":"boolean","default":false,"deprecated":true,"description":"Deprecated alias for memory_response_citation."},"memory_pro":{"type":"string","nullable":true,"description":"Memory Pro mode (with reranking, higher cost): 'Auto', 'Readonly', or omit. Cannot be used together with memory."},"web_search":{"type":"string","default":"off","description":"Web search mode: 'Auto' or 'off'."},"send_to_llm":{"type":"string","default":"true","description":"Whether to send to LLM for a response."},"json_output":{"type":"boolean","default":false,"description":"When true, request JSON object output from the model. Ignored when RAG, web search, or custom tools are active."},"custom_timestamp":{"type":"string","format":"date-time","nullable":true,"description":"Custom timestamp for the message (merged into metadata when stored)."},"metadata":{"type":"string","description":"Optional metadata as JSON string."},"voice":{"type":"object","description":"Optional voice config object. Add `stt` to enable speech-to-text, add `tts` to enable text-to-speech."}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Text content of the message"},"llm_provider":{"type":"string","description":"LLM provider name. Default: openai."},"model_name":{"type":"string","description":"Model name. Default: gpt-4o."},"system_prompt":{"type":"string","nullable":true,"description":"Per-run system prompt override. Not persisted on the assistant."},"image_generation":{"type":"string","enum":["auto","off"],"default":"off","description":"Image generation: 'auto' enables generate_image (requires image_model_provider and image_model_name); 'off' disables it."},"image_model_provider":{"type":"string","description":"Required when image_generation=auto. Provider for generate_image (e.g. openrouter). Ignored when off."},"image_model_name":{"type":"string","description":"Required when image_generation=auto. Model for generate_image (e.g. google/gemini-2.5-flash-image). Ignored when off."},"stream":{"type":"boolean","default":false,"description":"Whether to stream the AI response."},"thinking":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"effort":{"type":"string","enum":["low","medium","high","max"],"description":"Use for OpenAI, xAI, and Gemini 3 models."},"budget_tokens":{"type":"integer","minimum":0,"description":"Use for Anthropic and Gemini 2.5 models."},"max_tokens":{"type":"integer","minimum":1,"description":"Use for OpenRouter and Cerebras reasoning models."},"exclude_reasoning":{"type":"boolean","description":"Use for OpenRouter and Cerebras reasoning models."}},"description":"Flat reasoning controls inferred from the selected llm_provider/model. Use {} to enable provider defaults, or send only the fields supported by the selected model.","examples":[{},{"effort":"high"},{"budget_tokens":8192},{"max_tokens":4096,"exclude_reasoning":true}]},"openrouter":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"providers":{"type":"array","items":{"type":"string"},"description":"Ranked upstream providers to try, e.g. [\"Fireworks\", \"Together\"]. See GET /billing/models/providers for the available names and their prices."},"allow_fallbacks":{"type":"boolean","description":"When false, the request runs only on `providers` and fails instead of falling back to another upstream (and another price)."},"sort":{"type":"string","enum":["price","throughput","latency"],"description":"Rank the available upstream providers by this criterion."},"ignore":{"type":"array","items":{"type":"string"},"description":"Upstream providers to exclude for this request."},"max_price":{"type":"object","additionalProperties":false,"properties":{"prompt":{"type":"number","minimum":0,"description":"Max USD per 1M prompt tokens."},"completion":{"type":"number","minimum":0,"description":"Max USD per 1M completion tokens."}},"description":"Skip upstream endpoints priced above this ceiling."},"allowed_models":{"type":"array","items":{"type":"string"},"description":"Auto Router only (model_name='openrouter/auto'): restrict selection with wildcard patterns, e.g. [\"anthropic/*\"]."},"excluded_models":{"type":"array","items":{"type":"string"},"description":"Auto Router only: exclude models by wildcard pattern."},"cost_tier":{"type":"string","enum":["low","medium","high","xhigh","max"],"description":"Auto Router only: cost band to route within."}},"description":"OpenRouter-only routing options (ignored for other providers). OpenRouter serves each model from multiple upstream providers at different prices; omit this object to let it choose automatically. You are always billed the exact amount the serving provider charged.","examples":[{"sort":"price"},{"providers":["Together"],"allow_fallbacks":false},{"ignore":["Fireworks"],"max_price":{"completion":1.0}},{"cost_tier":"high"}]},"tools":{"type":"string","nullable":true,"description":"JSON array of OpenAI-style tool definitions."},"memory":{"type":"string","default":"off","description":"Memory Lite mode (no reranking): 'Auto', 'Readonly', or 'off' (default). Cannot be used together with memory_pro."},"memory_response_citation":{"type":"boolean","default":false,"description":"Whether the assistant should cite retrieved memories in its response text."},"memory_citation":{"type":"boolean","default":false,"deprecated":true,"description":"Deprecated alias for memory_response_citation."},"memory_pro":{"type":"string","nullable":true,"description":"Memory Pro mode (with reranking, higher cost): 'Auto', 'Readonly', or omit. Cannot be used together with memory."},"web_search":{"type":"string","default":"off","description":"Web search mode: 'Auto' or 'off'."},"send_to_llm":{"type":"string","default":"true","description":"Whether to send to LLM for a response."},"json_output":{"type":"boolean","default":false,"description":"When true, request JSON object output from the model. Ignored when RAG, web search, or custom tools are active."},"custom_timestamp":{"type":"string","format":"date-time","nullable":true,"description":"Merged into metadata when stored."},"metadata":{"type":"string","description":"Optional metadata as JSON string."},"voice":{"type":"string","description":"Optional voice config as JSON string. Example: {\"stt\": {...}, \"tts\": {...}}"},"audio_file":{"type":"string","format":"binary","description":"Single audio file for STT. Required when voice.stt is provided."},"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"File attachments."}}}}}}}},"/threads/{thread_id}/runs/{run_id}/submit-tool-outputs":{"post":{"tags":["Threads"],"summary":"Submit Tool Outputs for a Run","description":"Submit the outputs of tool calls that an assistant message previously requested. This will continue the run. If stream=true, returns a Server-Sent Events stream.","operationId":"submit_tool_outputs_for_run_threads__thread_id__runs__run_id__submit_tool_outputs_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"stream","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Stream"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitToolOutputsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolOutputsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/{thread_id}/runs/{run_id}/cancel":{"post":{"tags":["Threads"],"summary":"Cancel a Run","description":"Mark a run as cancelled.  The streaming endpoints check this on each yield and bail early.  Idempotent: cancelling a run that's already finished or already cancelled returns 200.  Used by the CLI's Ctrl+C handler so the server doesn't keep an LLM call alive on its end after the client has given up.","operationId":"cancel_run_threads__thread_id__runs__run_id__cancel_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/tool-outputs":{"post":{"tags":["Threads"],"summary":"Submit Tool Outputs (Simplified)","description":"Submit tool outputs for a thread in a single JSON call — no path parameters, no run_id. The server resolves the run from the latest REQUIRES_ACTION assistant message on the thread.\n\nBody: `{thread_id, tool_outputs: [{tool_call_id, output}], stream?, thinking?}` — same entry shape as the original endpoint. Optional `thinking` overrides reasoning for this continuation round; omit it to reuse the run's original thinking config.\n\nFor explicit run-pinning or per-run tool overrides, use the original `POST /threads/{thread_id}/runs/{run_id}/submit-tool-outputs`.","operationId":"submit_tool_outputs_simple_threads_tool_outputs_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitToolOutputsSimpleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolOutputsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/threads/messages":{"post":{"tags":["Threads"],"summary":"Send Message (Stateless or Stateful)","description":"Send a message without needing to create a thread or assistant first. Everything you pass is per-turn only — nothing is persisted to the assistant. To configure an assistant permanently, use the dedicated assistant endpoints.\n\n**Without thread_id** → a new thread (and default assistant) are auto-created. The response includes thread_id and assistant_id.\n\n**With thread_id** → the message is appended to the existing thread.\n\n**With assistant_id** → the new thread is pinned to that assistant.\n\nAccepts **application/json** (text-only and JSON-safe fields) or **multipart/form-data** for file attachments, `audio_file` (STT), and the same form fields as `POST /threads/{thread_id}/messages`. Image generation, voice (TTS/STT), and `tools` behave the same as the thread messages endpoint.","operationId":"send_message_stateless_threads_messages_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thread_id":{"type":"string","format":"uuid","nullable":true,"description":"Existing thread UUID. Omit to auto-create a new thread."},"assistant_id":{"type":"string","format":"uuid","nullable":true,"description":"Assistant UUID to use. Omit to auto-create a brand-new assistant for this turn; pass the returned assistant_id back to reuse it on later messages."},"content":{"type":"string","description":"Text content of the message."},"system_prompt":{"type":"string","nullable":true,"description":"Instructions for this turn. Must be re-passed every call; not persisted. Falls back to the assistant's stored description if omitted."},"llm_provider":{"type":"string","nullable":true,"description":"LLM provider name (e.g. openai, anthropic, google). Default: openai."},"model_name":{"type":"string","nullable":true,"description":"Model name (e.g. gpt-4o, claude-sonnet-4-20250514). Default: gpt-4o."},"image_generation":{"type":"string","enum":["auto","off"],"default":"off","description":"Image generation: 'auto' enables generate_image (requires image_model_provider and image_model_name); 'off' disables it."},"image_model_provider":{"type":"string","nullable":true,"description":"Required when image_generation=auto. Provider for generate_image (e.g. openrouter)."},"image_model_name":{"type":"string","nullable":true,"description":"Required when image_generation=auto. Model for generate_image (e.g. google/gemini-2.5-flash-image)."},"stream":{"type":"boolean","default":false,"description":"Whether to stream the AI response via SSE."},"thinking":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"effort":{"type":"string","enum":["low","medium","high","max"],"description":"Use for OpenAI, xAI, and Gemini 3 models."},"budget_tokens":{"type":"integer","minimum":0,"description":"Use for Anthropic and Gemini 2.5 models."},"max_tokens":{"type":"integer","minimum":1,"description":"Use for OpenRouter and Cerebras reasoning models."},"exclude_reasoning":{"type":"boolean","description":"Use for OpenRouter and Cerebras reasoning models."}},"description":"Flat reasoning controls inferred from the selected llm_provider/model. Use {} to enable provider defaults, or send only the fields supported by the selected model.","examples":[{},{"effort":"high"},{"budget_tokens":8192},{"max_tokens":4096,"exclude_reasoning":true}]},"tools":{"type":"array","items":{"type":"object"},"nullable":true,"description":"Tool definitions for this turn (OpenAI-style). Must be re-passed every call; not persisted."},"memory":{"type":"string","default":"off","description":"Memory Lite mode: 'Auto', 'Readonly', or 'off' (default)."},"memory_response_citation":{"type":"boolean","default":false,"description":"Whether the assistant should cite retrieved memories."},"memory_citation":{"type":"boolean","default":false,"deprecated":true,"description":"Deprecated alias for memory_response_citation."},"memory_pro":{"type":"string","nullable":true,"description":"Memory Pro mode: 'Auto', 'Readonly', or omit."},"web_search":{"type":"string","default":"off","description":"Web search mode: 'Auto' or 'off'."},"send_to_llm":{"type":"string","default":"true","description":"Whether to send to LLM for a response."},"json_output":{"type":"boolean","default":false,"description":"When true, request JSON object output from the model."},"custom_timestamp":{"type":"string","format":"date-time","nullable":true,"description":"Custom timestamp for the message (merged into metadata for storage)."},"metadata":{"type":"string","description":"Optional metadata as JSON string or object."},"voice":{"type":"object","description":"Optional voice config. Add `stt` for speech-to-text (requires multipart + audio_file); add `tts` for text-to-speech."}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"thread_id":{"type":"string","format":"uuid","nullable":true,"description":"Existing thread UUID. Omit to auto-create a new thread."},"assistant_id":{"type":"string","format":"uuid","nullable":true,"description":"Assistant UUID for a newly created thread."},"content":{"type":"string","description":"Text content of the message"},"system_prompt":{"type":"string","nullable":true,"description":"Per-run system prompt override."},"llm_provider":{"type":"string","description":"LLM provider name. Default: openai."},"model_name":{"type":"string","description":"Model name. Default: gpt-4o."},"image_generation":{"type":"string","enum":["auto","off"],"default":"off","description":"Image generation: 'auto' enables generate_image (requires image_model_provider and image_model_name)."},"image_model_provider":{"type":"string","description":"Required when image_generation=auto."},"image_model_name":{"type":"string","description":"Required when image_generation=auto."},"stream":{"type":"boolean","default":false,"description":"Whether to stream the AI response."},"thinking":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"effort":{"type":"string","enum":["low","medium","high","max"],"description":"Use for OpenAI, xAI, and Gemini 3 models."},"budget_tokens":{"type":"integer","minimum":0,"description":"Use for Anthropic and Gemini 2.5 models."},"max_tokens":{"type":"integer","minimum":1,"description":"Use for OpenRouter and Cerebras reasoning models."},"exclude_reasoning":{"type":"boolean","description":"Use for OpenRouter and Cerebras reasoning models."}},"description":"Flat reasoning controls inferred from the selected llm_provider/model. Use {} to enable provider defaults, or send only the fields supported by the selected model.","examples":[{},{"effort":"high"},{"budget_tokens":8192},{"max_tokens":4096,"exclude_reasoning":true}]},"tools":{"type":"string","description":"JSON array of OpenAI-style tool definitions."},"memory":{"type":"string","default":"off","description":"Memory Lite mode: 'Auto', 'Readonly', or 'off' (default)."},"memory_response_citation":{"type":"boolean","default":false},"memory_citation":{"type":"boolean","default":false,"deprecated":true},"memory_pro":{"type":"string","nullable":true},"web_search":{"type":"string","default":"off","description":"Web search: 'Auto' or 'off'."},"send_to_llm":{"type":"string","default":"true"},"json_output":{"type":"boolean","default":false},"custom_timestamp":{"type":"string","format":"date-time","nullable":true,"description":"Merged into metadata when stored."},"metadata":{"type":"string","description":"Optional metadata JSON string."},"voice":{"type":"string","description":"Voice config as JSON string, e.g. {\"stt\": {...}, \"tts\": {...}}"},"audio_file":{"type":"string","format":"binary","description":"Single audio file for STT when voice.stt is set."},"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"RAG file attachments."}}}}}}}},"/documents/{document_id}":{"delete":{"tags":["Documents"],"summary":"Delete Document","description":"Delete a document by ID across assistant, thread, or message scope.","operationId":"delete_document_documents__document_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{document_id}/status":{"get":{"tags":["Documents"],"summary":"Get Document Status","description":"Get the processing status and details of a specific document.","operationId":"get_document_status_documents__document_id__status_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants":{"post":{"tags":["Assistants"],"summary":"Create Assistant","description":"Create a new assistant for the authenticated user. Optionally configure embedding model for RAG (defaults to OpenAI text-embedding-3-large with 3072 dimensions).","operationId":"create_assistant_assistants_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Assistants"],"summary":"List Assistants","description":"List all assistants belonging to the authenticated user.","operationId":"list_assistants_assistants_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Filter to assistants with this exact name.","title":"Name"},"description":"Filter to assistants with this exact name."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Assistant"},"title":"Response List Assistants Assistants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{assistant_id}":{"get":{"tags":["Assistants"],"summary":"Get Assistant","description":"Retrieve a specific assistant by its UUID.","operationId":"get_assistant_assistants__assistant_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Assistants"],"summary":"Update Assistant","description":"Update an assistant's attributes, including its name, description, and tools. Note: The 'tools' field will replace the existing list of tools. Embedding model cannot be changed after creation.","operationId":"update_assistant_assistants__assistant_id__put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assistant"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Assistants"],"summary":"Delete Assistant","description":"Permanently delete an assistant and all its associated threads and documents.","operationId":"delete_assistant_assistants__assistant_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{assistant_id}/clone":{"post":{"tags":["Assistants"],"summary":"Clone Assistant","description":"Clone an assistant's configuration, assistant-level documents, and active memories into a new assistant.","operationId":"clone_assistant_assistants__assistant_id__clone_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantCloneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantCloneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{assistant_id}/threads":{"post":{"tags":["Assistants"],"summary":"Create Thread for Assistant","description":"Create a new empty conversation thread under a specific assistant. Use the message endpoints to add messages to the thread.","operationId":"create_thread_for_assistant_assistants__assistant_id__threads_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ThreadCreateForAssistant"},{"type":"null"}],"title":"Thread In"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Assistants"],"summary":"List Threads for Assistant","description":"List all threads under a specific assistant for the authenticated user.","operationId":"list_threads_for_assistant_assistants__assistant_id__threads_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Thread"},"title":"Response List Threads For Assistant Assistants  Assistant Id  Threads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{assistant_id}/documents":{"get":{"tags":["Assistants"],"summary":"List Assistant Documents","description":"List all documents associated with a specific assistant.","operationId":"list_assistant_documents_assistants__assistant_id__documents_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRead"},"title":"Response List Assistant Documents Assistants  Assistant Id  Documents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Assistants"],"summary":"Upload Document to Assistant","description":"Upload a document to be associated with a specific assistant (shared context for its threads). Supported file types: **Documents** (.pdf, .doc, .docx, .ppt, .pptx, .xls, .xlsx), **Text/Data** (.txt, .csv, .md, .markdown, .json, .jsonl, .xml), **Code** (.py, .js, .ts, .jsx, .tsx, .html, .css, .cpp, .c, .h, .java, .go, .rs, .rb, .php, .sql), **Images** (.png, .jpg, .jpeg, .webp, .gif, .bmp, .tiff, .tif).","operationId":"upload_document_to_assistant_assistants__assistant_id__documents_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_to_assistant_assistants__assistant_id__documents_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{assistant_id}/memories":{"get":{"tags":["Memories"],"summary":"List Memories","description":"List memories for an assistant with optional server-side pagination.","operationId":"get_all_memories_assistants__assistant_id__memories_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed). Omit to fetch all.","title":"Page"},"description":"Page number (1-indexed). Omit to fetch all."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":25,"title":"Page Size"},"description":"Items per page"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoriesListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Memories"],"summary":"Add Memory","description":"Add a new memory directly for a specific assistant (manual creation from UI).","operationId":"add_memory_assistants__assistant_id__memories_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Memory Assistants  Assistant Id  Memories Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Memories"],"summary":"Reset All Memories","description":"Delete all memories for an assistant from both database and vector store.","operationId":"reset_memories_assistants__assistant_id__memories_delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{assistant_id}/memories/insights":{"get":{"tags":["Memories"],"summary":"Get Memory Insights","description":"Get comprehensive memory intelligence: snapshot, content signals, limits, breakdowns, and recent operations.","operationId":"get_memory_insights_assistants__assistant_id__memories_insights_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Memory Insights Assistants  Assistant Id  Memories Insights Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{assistant_id}/memories/stats":{"get":{"tags":["Memories"],"summary":"Get Memory Stats","description":"Get memory statistics and limits for a specific assistant.","operationId":"get_memory_stats_assistants__assistant_id__memories_stats_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Memory Stats Assistants  Assistant Id  Memories Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{assistant_id}/memories/{memory_id}":{"get":{"tags":["Memories"],"summary":"Get Memory by ID","description":"Get a specific memory by its ID.","operationId":"get_memory_by_id_assistants__assistant_id__memories__memory_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Memories"],"summary":"Delete Memory","description":"Delete a specific memory from both database and vector store.","operationId":"delete_memory_assistants__assistant_id__memories__memory_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Memories"],"summary":"Update Memory","description":"Update a specific memory in both database and vector store.","operationId":"update_memory_assistants__assistant_id__memories__memory_id__put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/memories/operations/{operation_id}":{"get":{"tags":["Memories"],"summary":"Get Memory Operation Status","description":"Get the status of a memory add/update/delete operation by operation_id.","operationId":"get_memory_operation_status_assistants_memories_operations__operation_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Operation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryOperationStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/assistants/{assistant_id}/memories/search":{"post":{"tags":["Memories"],"summary":"Search Memories","description":"Search memories for a specific assistant using a query string.","operationId":"search_memories_assistants__assistant_id__memories_search_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"assistant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assistant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/balance":{"get":{"tags":["Billing"],"summary":"Get Balance","operationId":"get_balance_billing_balance_get","parameters":[{"name":"client_id","in":"query","required":false,"schema":{"type":"string","description":"Client ID to get balance for or 'all' for aggregated data (superadmin only)","title":"Client Id"},"description":"Client ID to get balance for or 'all' for aggregated data (superadmin only)"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditWallet"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/usage/recent":{"get":{"tags":["Billing"],"summary":"Get Recent Usage","operationId":"get_recent_usage_billing_usage_recent_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-indexed)","default":1,"title":"Page"},"description":"Page number (1-indexed)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Page Size"},"description":"Items per page"},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date YYYY-MM-DD (inclusive)","title":"Start"},"description":"Start date YYYY-MM-DD (inclusive)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date YYYY-MM-DD (inclusive)","title":"End"},"description":"End date YYYY-MM-DD (inclusive)"},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by model name (substring match)","title":"Model"},"description":"Filter by model name (substring match)"},{"name":"credit_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by credit type: subscription, regular, mixed, none","title":"Credit Type"},"description":"Filter by credit type: subscription, regular, mixed, none"},{"name":"model_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact model name match (distinct from ``model`` which is substring)","title":"Model Name"},"description":"Exact model name match (distinct from ``model`` which is substring)"},{"name":"input_tokens","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Exact input_tokens match","title":"Input Tokens"},"description":"Exact input_tokens match"},{"name":"output_tokens","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Exact output_tokens match","title":"Output Tokens"},"description":"Exact output_tokens match"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","description":"Sort field: date, amount, total_tokens","default":"date","title":"Sort By"},"description":"Sort field: date, amount, total_tokens"},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","description":"Sort direction: asc, desc","default":"desc","title":"Sort Order"},"description":"Sort direction: asc, desc"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUsageSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/usage/insights":{"get":{"tags":["Billing"],"summary":"Get Usage Insights","description":"Aggregated usage intelligence for the API Calls page: spend anatomy,\ntoken mix, credit mix, top models by spend, and heavy usage drivers.","operationId":"get_usage_insights_billing_usage_insights_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date YYYY-MM-DD (inclusive)","title":"Start"},"description":"Start date YYYY-MM-DD (inclusive)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date YYYY-MM-DD (inclusive)","title":"End"},"description":"End date YYYY-MM-DD (inclusive)"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/usage/summary":{"get":{"tags":["Billing"],"summary":"Get Usage Summary","description":"Minimal usage summary for the billing page.\nReturns totals for the selected time window:\n- total_spending_usd\n- token_usage_usd\n- reads_count, reads_cost_usd\n- writes_count, writes_cost_usd","operationId":"get_usage_summary_billing_usage_summary_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","description":"period|7d|30d|all","default":"period","title":"Range"},"description":"period|7d|30d|all"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models":{"get":{"tags":["Models"],"summary":"List All Models","description":"Get a list of all available models with their specifications and pricing information.","operationId":"list_models_models_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"model_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by model type: 'llm', 'embedding', or 'image'","title":"Model Type"},"description":"Filter by model type: 'llm', 'embedding', or 'image'"},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider name","title":"Provider"},"description":"Filter by provider name"},{"name":"supports_tools","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by tool/function calling support","title":"Supports Tools"},"description":"Filter by tool/function calling support"},{"name":"supports_vision","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by image input support","title":"Supports Vision"},"description":"Filter by image input support"},{"name":"supports_audio_input","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by audio input support","title":"Supports Audio Input"},"description":"Filter by audio input support"},{"name":"supports_video_input","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by video input support","title":"Supports Video Input"},"description":"Filter by video input support"},{"name":"supports_image_output","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by image generation support","title":"Supports Image Output"},"description":"Filter by image generation support"},{"name":"supports_audio_output","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by audio output support","title":"Supports Audio Output"},"description":"Filter by audio output support"},{"name":"supports_video_output","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by video output support","title":"Supports Video Output"},"description":"Filter by video output support"},{"name":"supports_thinking","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by reasoning/thinking capability","title":"Supports Thinking"},"description":"Filter by reasoning/thinking capability"},{"name":"supports_json_output","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by JSON object / structured response support (true/false; omit for all)","title":"Supports Json Output"},"description":"Filter by JSON object / structured response support (true/false; omit for all)"},{"name":"min_context","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Minimum context limit","title":"Min Context"},"description":"Minimum context limit"},{"name":"max_context","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum context limit","title":"Max Context"},"description":"Maximum context limit"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip","default":0,"title":"Skip"},"description":"Number of records to skip"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":15000,"minimum":1,"description":"Maximum number of records to return","default":100,"title":"Limit"},"description":"Maximum number of records to return"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/providers":{"get":{"tags":["Models"],"summary":"List All Providers","description":"Get a list of all unique model providers available in the system.","operationId":"list_providers_models_providers_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvidersListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/thinking-metadata":{"get":{"tags":["Models"],"summary":"Get Model Thinking Metadata","description":"Get minimal thinking-control metadata for an exact provider/model pair.","operationId":"get_model_thinking_metadata_models_thinking_metadata_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"provider","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Exact model provider","title":"Provider"},"description":"Exact model provider"},{"name":"model","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Exact model name","title":"Model"},"description":"Exact model name"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelThinkingMetadataRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/provider/{provider_name}":{"get":{"tags":["Models"],"summary":"List Models by Provider","description":"Get all models from a specific provider, including pricing information.","operationId":"list_models_by_provider_models_provider__provider_name__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"provider_name","in":"path","required":true,"schema":{"type":"string","title":"Provider Name"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip","default":0,"title":"Skip"},"description":"Number of records to skip"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":15000,"minimum":1,"description":"Maximum number of records to return","default":100,"title":"Limit"},"description":"Maximum number of records to return"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/{model_name}":{"get":{"tags":["Models"],"summary":"Get Model by Name","description":"Get detailed information about a specific model by its name, including pricing.","operationId":"get_model_by_name_models__model_name__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string","title":"Model Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/image/all":{"get":{"tags":["Models"],"summary":"List All Image Models","description":"Get a list of all available image generation models.","operationId":"list_image_models_models_image_all_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider name","title":"Provider"},"description":"Filter by provider name"},{"name":"supports_vision","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by image input support","title":"Supports Vision"},"description":"Filter by image input support"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip","default":0,"title":"Skip"},"description":"Number of records to skip"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of records to return","default":100,"title":"Limit"},"description":"Maximum number of records to return"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageModelsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/image/providers":{"get":{"tags":["Models"],"summary":"List All Image Model Providers","description":"Get a list of all unique image model providers.","operationId":"list_image_providers_models_image_providers_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvidersListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/image/{model_name}":{"get":{"tags":["Models"],"summary":"Get Image Model by Name","description":"Get detailed information about a specific image generation model.","operationId":"get_image_model_by_name_models_image__model_name__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string","title":"Model Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageModelRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/embedding/all":{"get":{"tags":["Models"],"summary":"List All Embedding Models","description":"Get a list of all available embedding models with their specifications.","operationId":"list_embedding_models_models_embedding_all_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider name","title":"Provider"},"description":"Filter by provider name"},{"name":"min_dimensions","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Minimum embedding dimensions","title":"Min Dimensions"},"description":"Minimum embedding dimensions"},{"name":"max_dimensions","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum embedding dimensions","title":"Max Dimensions"},"description":"Maximum embedding dimensions"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip","default":0,"title":"Skip"},"description":"Number of records to skip"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":15000,"minimum":1,"description":"Maximum number of records to return","default":100,"title":"Limit"},"description":"Maximum number of records to return"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingModelsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/embedding/providers":{"get":{"tags":["Models"],"summary":"List All Embedding Model Providers","description":"Get a list of all unique embedding model providers available in the system.","operationId":"list_embedding_providers_models_embedding_providers_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvidersListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/embedding/{model_name}":{"get":{"tags":["Models"],"summary":"Get Embedding Model by Name","description":"Get detailed information about a specific embedding model by its name.","operationId":"get_embedding_model_by_name_models_embedding__model_name__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string","title":"Model Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x_session_token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingModelRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Assistant":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Name of the assistant"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Optional system prompt (alias for description)"},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolDefinition"},"type":"array"},{"type":"null"}],"title":"Tools","description":"List of tools available to the assistant"},"tok_k":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Tok K","description":"Document search top_k for the internal search_documents tool (default 10).","default":10},"embedding_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Provider","description":"Embedding provider (openai, google, cohere, etc.)"},"embedding_model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Model Name","description":"Embedding model name (e.g., text-embedding-3-large, text-embedding-004)"},"embedding_dims":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Embedding Dims","description":"Embedding dimensions (e.g., 1024 for Cohere, 3072 for OpenAI text-embedding-3-large)"},"custom_fact_extraction_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Fact Extraction Prompt","description":"Custom prompt for fact extraction from conversations. If not set, the default prompt is used."},"custom_update_memory_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Update Memory Prompt","description":"Custom prompt for memory update decisions (add/update/delete). If not set, the default prompt is used."},"assistant_id":{"type":"string","format":"uuid","title":"Assistant Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["name","assistant_id","created_at"],"title":"Assistant"},"AssistantCloneRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"Name for the cloned assistant"},"description":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}],"title":"Description","description":"Optional system prompt override for the cloned assistant"},"system_prompt":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}],"title":"System Prompt","description":"Optional system prompt override (alias for description)"},"copy_documents":{"type":"boolean","title":"Copy Documents","description":"Whether to clone assistant-level knowledge base documents","default":true},"copy_memories":{"type":"boolean","title":"Copy Memories","description":"Whether to clone active assistant memories","default":true}},"type":"object","title":"AssistantCloneRequest"},"AssistantCloneResponse":{"properties":{"assistant":{"$ref":"#/components/schemas/Assistant"},"documents_cloned":{"type":"integer","title":"Documents Cloned","description":"Number of assistant-level document records cloned","default":0},"memories_cloned":{"type":"integer","title":"Memories Cloned","description":"Number of active memories cloned","default":0}},"type":"object","required":["assistant"],"title":"AssistantCloneResponse"},"AssistantCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Name of the assistant"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"Optional system prompt (alias for description)"},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolDefinition"},"type":"array"},{"type":"null"}],"title":"Tools","description":"List of tools available to the assistant"},"tok_k":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Tok K","description":"Document search top_k for the internal search_documents tool (default 10).","default":10},"custom_fact_extraction_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Fact Extraction Prompt","description":"Custom prompt for fact extraction from conversations. If not set, the default prompt is used."},"custom_update_memory_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Update Memory Prompt","description":"Custom prompt for memory update decisions (add/update/delete). If not set, the default prompt is used."}},"type":"object","required":["name"],"title":"AssistantCreate"},"AssistantDeleteResponse":{"properties":{"message":{"type":"string","title":"Message"},"assistant_id":{"type":"string","format":"uuid","title":"Assistant Id"},"deleted_at":{"type":"string","format":"date-time","title":"Deleted At"}},"type":"object","required":["message","assistant_id","deleted_at"],"title":"AssistantDeleteResponse"},"AssistantUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"New name for the assistant"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt","description":"New system prompt (alias for description)"},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolDefinition"},"type":"array"},{"type":"null"}],"title":"Tools","description":"New list of tools for the assistant. Replaces existing tools."},"tok_k":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Tok K","description":"Document search top_k for the internal search_documents tool."},"custom_fact_extraction_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Fact Extraction Prompt","description":"Custom prompt for fact extraction from conversations. Set to empty string to clear."},"custom_update_memory_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Update Memory Prompt","description":"Custom prompt for memory update decisions. Set to empty string to clear."}},"type":"object","title":"AssistantUpdate"},"AttachmentInfo":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id"},"filename":{"type":"string","title":"Filename"},"status":{"type":"string","title":"Status"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["document_id","filename","status","file_size_bytes"],"title":"AttachmentInfo"},"Body_upload_document_to_assistant_assistants__assistant_id__documents_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_document_to_assistant_assistants__assistant_id__documents_post"},"Body_upload_document_to_thread_threads__thread_id__documents_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_document_to_thread_threads__thread_id__documents_post"},"CreditWallet":{"properties":{"id":{"type":"integer","title":"Id"},"client_id":{"type":"integer","title":"Client Id"},"balance_usd":{"type":"number","title":"Balance Usd"},"paid_credit_usd":{"type":"number","title":"Paid Credit Usd","default":0.0},"free_credit_usd":{"type":"number","title":"Free Credit Usd","default":0.0},"subscription_credits_usd":{"type":"number","title":"Subscription Credits Usd","default":0.0},"nash_credit_usd":{"type":"number","title":"Nash Credit Usd","default":0.0},"nash_allocation_usd":{"type":"number","title":"Nash Allocation Usd","default":0.0},"auto_reload_enabled":{"type":"boolean","title":"Auto Reload Enabled","default":false},"auto_reload_threshold_usd":{"type":"number","title":"Auto Reload Threshold Usd","default":0.0},"auto_reload_amount_usd":{"type":"number","title":"Auto Reload Amount Usd","default":0.0},"stripe_payment_method_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Payment Method Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","client_id","balance_usd"],"title":"CreditWallet"},"DocumentDeleteResponse":{"properties":{"message":{"type":"string","title":"Message"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"filename":{"type":"string","title":"Filename"},"document_type":{"type":"string","title":"Document Type"},"deleted_at":{"type":"string","format":"date-time","title":"Deleted At"}},"type":"object","required":["message","document_id","filename","document_type","deleted_at"],"title":"DocumentDeleteResponse"},"DocumentRead":{"properties":{"metadata_":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"filename":{"type":"string","title":"Filename"},"status":{"$ref":"#/components/schemas/DocumentStatus"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["document_id","filename","status","created_at"],"title":"DocumentRead"},"DocumentStatus":{"type":"string","enum":["pending","processing","indexed","error"],"title":"DocumentStatus"},"DocumentStatusResponse":{"properties":{"document_id":{"type":"string","format":"uuid","title":"Document Id"},"filename":{"type":"string","title":"Filename"},"document_type":{"type":"string","title":"Document Type"},"status":{"type":"string","title":"Status"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size Bytes"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens"},"chunk_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Count"},"processing_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processing Started At"},"processing_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processing Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["document_id","filename","document_type","status","created_at"],"title":"DocumentStatusResponse"},"EmbeddingModelRead":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the embedding model"},"provider":{"type":"string","title":"Provider","description":"Provider of the model (e.g., openai, cohere, google)"},"embedding_dimensions":{"type":"integer","title":"Embedding Dimensions","description":"Dimension of the embedding vectors"},"context_limit":{"type":"integer","title":"Context Limit","description":"Maximum context window size in tokens"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated","description":"Last time the model was updated"}},"type":"object","required":["name","provider","embedding_dimensions","context_limit"],"title":"EmbeddingModelRead","description":"Schema specifically for reading embedding model information."},"EmbeddingModelsListResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/EmbeddingModelRead"},"type":"array","title":"Models","description":"List of available embedding models"},"total":{"type":"integer","title":"Total","description":"Total number of embedding models"}},"type":"object","required":["models","total"],"title":"EmbeddingModelsListResponse","description":"Response schema for listing embedding models."},"FunctionDefinition":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the function to be called"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of what the function does"},"parameters":{"$ref":"#/components/schemas/ToolParameters","description":"Parameters the function accepts"}},"type":"object","required":["name","parameters"],"title":"FunctionDefinition"},"GeneratedMediaInfo":{"properties":{"document_id":{"type":"string","title":"Document Id"},"media_type":{"type":"string","title":"Media Type"},"mime_type":{"type":"string","title":"Mime Type"},"url":{"type":"string","title":"Url"},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size Bytes"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"}},"type":"object","required":["document_id","media_type","mime_type","url"],"title":"GeneratedMediaInfo"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageModelRead":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the model"},"provider":{"type":"string","title":"Provider","description":"Provider of the model"},"model_type":{"type":"string","title":"Model Type","description":"Type of model: 'image'"},"context_limit":{"type":"integer","title":"Context Limit","description":"Maximum context window size in tokens"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens","description":"Maximum number of output tokens"},"api_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Mode","description":"API mode/routing hint for this image model"},"supports_vision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Vision","description":"Whether the model accepts image input"},"supports_image_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Image Output","description":"Whether the model can generate images"},"supports_tools":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Tools","description":"Whether the model supports tool/function calling"},"image_input_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Image Input Cost Per 1M Tokens","description":"Image input cost per 1M tokens (USD)"},"input_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Cost Per 1M Tokens","description":"Text input cost per 1M tokens (USD)"},"cached_input_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cached Input Cost Per 1M Tokens","description":"Cached text input cost per 1M tokens (USD)"},"cache_write_input_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Input Cost Per 1M Tokens","description":"Cache-write text input cost per 1M tokens (USD)"},"output_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Cost Per 1M Tokens","description":"Text output cost per 1M tokens (USD)"},"image_output_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Image Output Cost Per 1M Tokens","description":"Image output cost per 1M tokens (USD)"},"cost_per_image":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Image","description":"Flat cost per generated image (USD)"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated","description":"Last time the model was updated"}},"type":"object","required":["name","provider","model_type","context_limit"],"title":"ImageModelRead","description":"Schema for reading image generation model information."},"ImageModelsListResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ImageModelRead"},"type":"array","title":"Models","description":"List of available image generation models"},"total":{"type":"integer","title":"Total","description":"Total number of image models"}},"type":"object","required":["models","total"],"title":"ImageModelsListResponse","description":"Response schema for listing image generation models."},"MemoriesListResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/MemoryResponse"},"type":"array","title":"Memories","description":"List of memories","default":[]},"total_count":{"type":"integer","title":"Total Count","description":"Total number of memories","default":0},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"Current page number (1-indexed)"},"page_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Size","description":"Items per page"},"total_pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Pages","description":"Total number of pages"}},"type":"object","title":"MemoriesListResponse","description":"Schema for listing memories with optional pagination"},"MemoryCreate":{"properties":{"content":{"type":"string","title":"Content","description":"The memory content/text"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata for the memory"}},"type":"object","required":["content"],"title":"MemoryCreate","description":"Schema for creating a new memory"},"MemoryDeleteResponse":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the deletion was successful"},"message":{"type":"string","title":"Message","description":"Status message"}},"type":"object","required":["success","message"],"title":"MemoryDeleteResponse","description":"Schema for memory deletion response"},"MemoryOperationStatusResponse":{"properties":{"operation_id":{"type":"string","format":"uuid","title":"Operation Id"},"status":{"type":"string","title":"Status"},"memory_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Memory Ids"},"result_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Result Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["operation_id","status","created_at"],"title":"MemoryOperationStatusResponse"},"MemoryResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Unique memory identifier"},"content":{"type":"string","title":"Content","description":"The memory content"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Memory metadata"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score","description":"Relevance score for search results"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"Memory creation timestamp"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"Memory update timestamp"}},"type":"object","required":["id","content"],"title":"MemoryResponse","description":"Schema for memory responses from backboard_memory"},"MemorySearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query text"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","description":"Maximum number of memories to return","default":5}},"type":"object","required":["query"],"title":"MemorySearchRequest","description":"Schema for searching memories"},"MemorySearchResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/MemorySearchResultItem"},"type":"array","title":"Memories","description":"List of relevant memories, without metadata","default":[]},"total_count":{"type":"integer","title":"Total Count","description":"Total number of memories found","default":0}},"type":"object","title":"MemorySearchResponse","description":"Schema for memory search results"},"MemorySearchResultItem":{"properties":{"id":{"type":"string","title":"Id","description":"Unique memory identifier"},"content":{"type":"string","title":"Content","description":"The memory content"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score","description":"Relevance score"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"Memory creation timestamp"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"Memory update timestamp"}},"type":"object","required":["id","content"],"title":"MemorySearchResultItem","description":"Schema for a single memory search result (no metadata, used in search responses)"},"MemoryUpdate":{"properties":{"content":{"type":"string","title":"Content","description":"The memory content/text"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata for the memory"}},"type":"object","required":["content"],"title":"MemoryUpdate","description":"Schema for updating an existing memory"},"MessageResponse":{"properties":{"message":{"type":"string","title":"Message"},"thread_id":{"type":"string","format":"uuid","title":"Thread Id"},"assistant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assistant Id"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Message Id"},"role":{"anyOf":[{"$ref":"#/components/schemas/MessageRole"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/MessageStatus"},{"type":"null"}]},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"memory_operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Operation Id"},"retrieved_memories":{"anyOf":[{"items":{"$ref":"#/components/schemas/RetrievedMemory"},"type":"array"},{"type":"null"}],"title":"Retrieved Memories"},"retrieved_files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Retrieved Files"},"retrieved_files_count":{"type":"integer","title":"Retrieved Files Count","default":0},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning"},"model_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Provider"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"attachments":{"anyOf":[{"items":{"$ref":"#/components/schemas/AttachmentInfo"},"type":"array"},{"type":"null"}],"title":"Attachments"},"generated_media":{"anyOf":[{"items":{"$ref":"#/components/schemas/GeneratedMediaInfo"},"type":"array"},{"type":"null"}],"title":"Generated Media"},"voice_records":{"anyOf":[{"$ref":"#/components/schemas/VoiceRecord"},{"type":"null"}],"description":"STT/TTS outcome: stt (transcript, input audio_url, usage) and/or tts (output audio_url, usage)."},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"context_usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Usage"}},"type":"object","required":["message","thread_id","timestamp"],"title":"MessageResponse","description":"Response for message operations - includes content at top level for easy access"},"MessageRole":{"type":"string","enum":["user","assistant","tool"],"title":"MessageRole"},"MessageStatus":{"type":"string","enum":["IN_PROGRESS","REQUIRES_ACTION","COMPLETED","FAILED","CANCELLED"],"title":"MessageStatus"},"MessageWithAttachments":{"properties":{"role":{"$ref":"#/components/schemas/MessageRole"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"metadata_":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Stores tool_calls, tool_call_id, run_id, error details etc."},"status":{"anyOf":[{"$ref":"#/components/schemas/MessageStatus"},{"type":"null"}],"default":"COMPLETED"},"message_id":{"type":"string","format":"uuid","title":"Message Id"},"model_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Provider"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentInfo"},"type":"array","title":"Attachments","default":[]}},"type":"object","required":["role","message_id","created_at"],"title":"MessageWithAttachments"},"ModelRead":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the model"},"provider":{"type":"string","title":"Provider","description":"Provider of the model (e.g., openai, anthropic)"},"model_type":{"type":"string","title":"Model Type","description":"Type of model: 'llm', 'embedding', or 'image'"},"context_limit":{"type":"integer","title":"Context Limit","description":"Maximum context window size in tokens"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens","description":"Maximum number of output tokens"},"supports_tools":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Tools","description":"Whether the model supports tool/function calling"},"supports_vision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Vision","description":"Whether the model accepts image input"},"supports_audio_input":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Audio Input","description":"Whether the model accepts audio input"},"supports_video_input":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Video Input","description":"Whether the model accepts video input"},"supports_image_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Image Output","description":"Whether the model can generate images"},"supports_audio_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Audio Output","description":"Whether the model can generate audio/speech"},"supports_video_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Video Output","description":"Whether the model can generate video"},"supports_thinking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Thinking","description":"Whether the model is marked as reasoning/thinking capable"},"thinking_controls":{"$ref":"#/components/schemas/ThinkingControlsRead","description":"Derived metadata describing whether the model exposes configurable thinking controls."},"supports_json_output":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Json Output","description":"Whether the catalog marks this model as supporting JSON object / structured text responses (null if unknown)"},"api_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Mode","description":"API mode/routing hint (e.g., chat_completions, responses, completions)"},"embedding_dimensions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Embedding Dimensions","description":"Embedding dimensions (for embedding models)"},"input_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Cost Per 1M Tokens","description":"Text input cost per 1M tokens (USD)"},"cached_input_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cached Input Cost Per 1M Tokens","description":"Cached text input cost per 1M tokens (USD)"},"cache_write_input_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Input Cost Per 1M Tokens","description":"Cache-write text input cost per 1M tokens (USD)"},"image_input_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Image Input Cost Per 1M Tokens","description":"Image input cost per 1M tokens (USD)"},"output_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Cost Per 1M Tokens","description":"Text output cost per 1M tokens (USD)"},"image_output_cost_per_1m_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Image Output Cost Per 1M Tokens","description":"Image output cost per 1M tokens (USD)"},"cost_per_image":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Image","description":"Flat cost per generated image (USD), for dall-e style models"},"tier_change_token_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tier Change Token Threshold","description":"Token threshold after which tier-2 pricing applies"},"input_cost_per_1m_tokens_tier2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Cost Per 1M Tokens Tier2","description":"Tier-2 input cost per 1 million tokens"},"cached_input_cost_per_1m_tokens_tier2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cached Input Cost Per 1M Tokens Tier2","description":"Tier-2 cached input cost per 1 million tokens"},"cache_write_input_cost_per_1m_tokens_tier2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cache Write Input Cost Per 1M Tokens Tier2","description":"Tier-2 cache-write input cost per 1 million tokens"},"output_cost_per_1m_tokens_tier2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Cost Per 1M Tokens Tier2","description":"Tier-2 output cost per 1 million tokens"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated","description":"Last time the model was updated"}},"type":"object","required":["name","provider","model_type","context_limit"],"title":"ModelRead","description":"Schema for reading model information including pricing."},"ModelThinkingMetadataRead":{"properties":{"provider":{"type":"string","title":"Provider","description":"Provider of the model"},"model":{"type":"string","title":"Model","description":"Name of the model"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens","description":"Maximum number of output tokens"},"supports_thinking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Thinking","description":"Whether the model supports thinking"},"thinking_controls":{"$ref":"#/components/schemas/ThinkingControlsRead","description":"Derived metadata describing supported thinking controls."}},"type":"object","required":["provider","model"],"title":"ModelThinkingMetadataRead","description":"Minimal model metadata needed to resolve thinking controls."},"ModelsListResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelRead"},"type":"array","title":"Models","description":"List of available models"},"total":{"type":"integer","title":"Total","description":"Total number of models"}},"type":"object","required":["models","total"],"title":"ModelsListResponse","description":"Response schema for listing models."},"PaginatedUsageSummaryResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UsageEventSummary"},"type":"array","title":"Data"},"pagination":{"$ref":"#/components/schemas/PaginationMeta"}},"type":"object","required":["data","pagination"],"title":"PaginatedUsageSummaryResponse"},"PaginationMeta":{"properties":{"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total":{"type":"integer","title":"Total"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["page","page_size","total","total_pages"],"title":"PaginationMeta"},"ProvidersListResponse":{"properties":{"providers":{"items":{"type":"string"},"type":"array","title":"Providers","description":"List of unique providers"},"total":{"type":"integer","title":"Total","description":"Total number of providers"}},"type":"object","required":["providers","total"],"title":"ProvidersListResponse","description":"Response schema for listing providers."},"RetrievedMemory":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"memory":{"type":"string","title":"Memory"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"}},"type":"object","required":["memory"],"title":"RetrievedMemory"},"STTUsageInfo":{"properties":{"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url","description":"Presigned URL for the user's original audio input"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"audio_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audio Input Tokens"},"provider_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Output","description":"Provider-specific response data (e.g. words, segments, entities, logprobs)."}},"type":"object","required":["provider","model"],"title":"STTUsageInfo","description":"STT result: transcript, input audio URL, billing dimensions, and raw provider output."},"SubmitToolOutputsRequest":{"properties":{"tool_outputs":{"items":{"$ref":"#/components/schemas/ToolOutput"},"type":"array","title":"Tool Outputs","description":"A list of tool outputs to submit."},"thinking":{"anyOf":[{"$ref":"#/components/schemas/ThinkingConfig"},{"type":"null"}],"description":"Optional per-step reasoning override for this continuation. Omit to reuse the run's original thinking config; send null to disable thinking for this continuation; send {} for provider defaults."},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Optional override for the assistant's tool list, applied only to this run.  Each entry is an OpenAI-style tool definition (e.g. `{type: 'function', function: {...}}`)."}},"type":"object","required":["tool_outputs"],"title":"SubmitToolOutputsRequest"},"SubmitToolOutputsSimpleRequest":{"properties":{"thread_id":{"type":"string","format":"uuid","title":"Thread Id","description":"Thread UUID the outputs belong to."},"tool_outputs":{"items":{"$ref":"#/components/schemas/ToolOutput"},"type":"array","title":"Tool Outputs","description":"Tool outputs to submit. Each item is {tool_call_id, output}."},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"Whether to stream the response.","default":false},"thinking":{"anyOf":[{"$ref":"#/components/schemas/ThinkingConfig"},{"type":"null"}],"description":"Optional per-step reasoning override for this continuation. Omit to reuse the run's original thinking config; send null to disable thinking for this continuation; send {} for provider defaults."}},"additionalProperties":false,"type":"object","required":["thread_id","tool_outputs"],"title":"SubmitToolOutputsSimpleRequest","description":"Simplified tool-output submission.\n\nShares the canonical ``{tool_call_id, output}`` entry shape with the\noriginal ``submit-tool-outputs`` endpoint. The only differences vs. the\noriginal are:\n\n1. ``thread_id`` lives in the body instead of the URL.\n2. ``run_id`` is resolved server-side to the latest ``REQUIRES_ACTION``\n   run on the thread — callers never pass it.\n\nIf you need to pin to a specific ``run_id`` or override the assistant's\ntool list for a run, use the original\n``POST /threads/{thread_id}/runs/{run_id}/submit-tool-outputs`` instead."},"TTSUsageInfo":{"properties":{"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url","description":"Presigned URL for synthesized speech output"},"voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice"},"output_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Format"},"characters":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Characters"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"audio_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audio Output Tokens"},"provider_output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Output","description":"Provider-specific response data."}},"type":"object","required":["provider","model"],"title":"TTSUsageInfo","description":"TTS result: synthesized audio URL, billing dimensions, and raw provider output."},"ThinkingConfig":{"properties":{"effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effort","description":"Reasoning effort level: low, medium, high, or max."},"budget_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Budget Tokens","description":"Reasoning token budget for providers that use token budgets."},"max_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Tokens","description":"Reasoning max_tokens cap for providers that support it."},"exclude_reasoning":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exclude Reasoning","description":"Whether reasoning tokens should be excluded when supported."}},"additionalProperties":false,"type":"object","title":"ThinkingConfig"},"ThinkingControlsRead":{"properties":{"supported":{"type":"boolean","title":"Supported","description":"Whether the model exposes configurable thinking controls"},"allowed_fields":{"items":{"type":"string"},"type":"array","title":"Allowed Fields","description":"Public thinking fields accepted by this model"},"defaults_only":{"type":"boolean","title":"Defaults Only","description":"Whether the model supports reasoning defaults only, without tunable controls"}},"type":"object","required":["supported","defaults_only"],"title":"ThinkingControlsRead"},"Thread":{"properties":{"metadata_":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"thread_id":{"type":"string","format":"uuid","title":"Thread Id"},"assistant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assistant Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"first_user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First User Message"},"message_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Message Count"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"messages":{"items":{"$ref":"#/components/schemas/MessageWithAttachments"},"type":"array","title":"Messages","default":[]}},"type":"object","required":["thread_id","created_at"],"title":"Thread"},"ThreadCreateForAssistant":{"properties":{},"type":"object","title":"ThreadCreateForAssistant"},"ThreadDeleteResponse":{"properties":{"message":{"type":"string","title":"Message"},"thread_id":{"type":"string","format":"uuid","title":"Thread Id"},"deleted_at":{"type":"string","format":"date-time","title":"Deleted At"}},"type":"object","required":["message","thread_id","deleted_at"],"title":"ThreadDeleteResponse"},"ToolDefinition":{"properties":{"type":{"type":"string","title":"Type","description":"Type of the tool, e.g., 'function'","default":"function"},"function":{"$ref":"#/components/schemas/FunctionDefinition"}},"type":"object","required":["function"],"title":"ToolDefinition"},"ToolOutput":{"properties":{"tool_call_id":{"type":"string","title":"Tool Call Id","description":"The ID of the tool call this output is for."},"output":{"type":"string","title":"Output","description":"The output of the tool call (stringified)."}},"type":"object","required":["tool_call_id","output"],"title":"ToolOutput"},"ToolOutputsResponse":{"properties":{"message":{"type":"string","title":"Message"},"thread_id":{"type":"string","format":"uuid","title":"Thread Id"},"run_id":{"type":"string","title":"Run Id"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Message Id"},"role":{"anyOf":[{"$ref":"#/components/schemas/MessageRole"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/MessageStatus"},{"type":"null"}]},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"memory_operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Operation Id"},"retrieved_memories":{"anyOf":[{"items":{"$ref":"#/components/schemas/RetrievedMemory"},"type":"array"},{"type":"null"}],"title":"Retrieved Memories"},"retrieved_files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Retrieved Files"},"retrieved_files_count":{"type":"integer","title":"Retrieved Files Count","default":0},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning"},"model_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Provider"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tokens"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"generated_media":{"anyOf":[{"items":{"$ref":"#/components/schemas/GeneratedMediaInfo"},"type":"array"},{"type":"null"}],"title":"Generated Media"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"context_usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Usage"}},"type":"object","required":["message","thread_id","run_id","timestamp"],"title":"ToolOutputsResponse","description":"Response for tool outputs submission"},"ToolParameterProperties":{"properties":{"type":{"type":"string","title":"Type","description":"Parameter type, e.g., 'string', 'integer', 'object'"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the parameter"},"enum":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enum","description":"Allowed enum values for the parameter"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties","description":"Nested properties for object types"},"items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Items","description":"Defines the schema of array items if type is array"}},"type":"object","required":["type"],"title":"ToolParameterProperties"},"ToolParameters":{"properties":{"type":{"type":"string","title":"Type","description":"The type of the parameters object, typically 'object'","default":"object"},"properties":{"additionalProperties":{"$ref":"#/components/schemas/ToolParameterProperties"},"type":"object","title":"Properties","description":"Parameter definitions"},"required":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Required","description":"List of required parameter names"}},"type":"object","required":["properties"],"title":"ToolParameters"},"UsageEventSummary":{"properties":{"date":{"type":"string","format":"date-time","title":"Date"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"input_tokens":{"type":"integer","title":"Input Tokens"},"cached_input_tokens":{"type":"integer","title":"Cached Input Tokens","default":0},"cache_write_input_tokens":{"type":"integer","title":"Cache Write Input Tokens","default":0},"output_tokens":{"type":"integer","title":"Output Tokens"},"vector_reads":{"type":"integer","title":"Vector Reads"},"vector_cost_usd":{"type":"number","title":"Vector Cost Usd"},"memory_write_cost_usd":{"type":"number","title":"Memory Write Cost Usd"},"credit_type":{"type":"string","title":"Credit Type"},"amount_deducted_usd":{"type":"number","title":"Amount Deducted Usd"}},"type":"object","required":["date","input_tokens","output_tokens","vector_reads","vector_cost_usd","memory_write_cost_usd","credit_type","amount_deducted_usd"],"title":"UsageEventSummary","description":"Slim projection returned by GET /billing/usage/recent."},"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"},"VoiceRecord":{"properties":{"stt":{"anyOf":[{"$ref":"#/components/schemas/STTUsageInfo"},{"type":"null"}]},"tts":{"anyOf":[{"$ref":"#/components/schemas/TTSUsageInfo"},{"type":"null"}]}},"type":"object","title":"VoiceRecord","description":"Voice pipeline outcome for this turn: STT and/or TTS (artifacts + billing dimensions)."}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"security":[{"APIKeyHeader":[]}]}