{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/v1/messages":{"post":{"operationId":"chat_messages_v1_messages_post","summary":"Messages","description":"Generate a chat completion from a conversation history.\n\nThis endpoint enables multi-turn conversations with the AI model, with\noptional tool support and comprehensive message validation.\n\nKey Features:\n* Multi-turn conversations: Support for system, user, and assistant\n  messages\n* Tool Support: Full tool use/result validation with automatic or manual\n  selection\n* Citations: Enable `system.citations.enabled` to include references in\n  responses\n* Streaming: Enable `stream` for partial updates in real-time\n* Default Prompts: Enable `system.use_default_prompt` for using Zylon\n  prompts\n* Thinking: Enable `thinking.enabled` for step-by-step reasoning\n  capabilities\n* Sampling Parameters: Control randomness with temperature, top_p,\n  top_k, etc.\n\nNotes:\n* Tool use/result blocks must be properly paired within assistant\n  messages\n* Tool choice type must be 'auto', 'tool', or 'none'\n* When tool_choice.type is 'tool', tool_choice.name must specify a\n  valid tool\n* All message content is validated for completeness and proper structure\n* Last message must be from user or assistant for proper conversation\n  flow\n* MCP servers provide external tool capabilities via Model Context\n  Protocol\n* Sampling parameters control response randomness and token selection","tags":["messages"],"responses":{"200":{"description":"Successful chat message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"description":"Request body for chat completion supporting multi-turn conversations with AI models.\n\nContains message history, tool definitions, system prompts, and response configuration. Supports both streaming and non-streaming responses with optional tool usage, citations, and advanced sampling parameters.\n\nThe request body defines the complete conversation context and AI behavior parameters for generating responses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatBody"}}}}}},"/v1/messages/count_tokens":{"post":{"operationId":"count_message_tokens_v1_messages_count_tokens_post","summary":"Count tokens in a Message","description":"Count tokens in a Message","tags":["messages"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountTokensOutput"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"description":"Request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountTokensInput"}}}}}},"/v1/messages/validate":{"post":{"operationId":"validate_messages_v1_messages_validate_post","summary":"Validate Messages Request","description":"Validate a chat completion request without executing it.\n\nThis endpoint performs a dry-run validation of the chat request,\nchecking for:\n\n* Message structure and content validation\n* Tool definitions and tool_choice compatibility\n* Parameter ranges and combinations\n* Conversation flow and message ordering\n* Response format compatibility with other options\n\nReturns detailed validation results including errors. Use this endpoint to\nvalidate requests before sending them to the main chat endpoint.\n\nNotes:\n* No tokens are consumed during validation\n* All validation rules match the main /messages endpoint\n* Warnings indicate potential issues but don't prevent execution\n* Request summary provides insights into the parsed request structure","tags":["messages"],"responses":{"200":{"description":"Validation completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatValidationResult"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"description":"Request body for chat completion supporting multi-turn conversations with AI models.\n\nContains message history, tool definitions, system prompts, and response configuration. Supports both streaming and non-streaming responses with optional tool usage, citations, and advanced sampling parameters.\n\nThe request body defines the complete conversation context and AI behavior parameters for generating responses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatBody"}}}}}},"/v1/complete":{"post":{"operationId":"create_completion_v1_complete_post","summary":"Create a Text Completion","description":"Create a Text Completion","tags":["completions"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionOutput"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"description":"Request payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionInput"}}}}}},"/v1/models":{"get":{"operationId":"list_models_v1_models_get","summary":"List Models","description":"List Models","tags":["models"],"parameters":[{"name":"before_id","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"after_id","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":100}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelListOutput"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models/{model_id}":{"get":{"operationId":"get_model_v1_models__model_id__get","summary":"Get a Model","description":"Get a Model","tags":["models"],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelInfoOutput"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages/async":{"post":{"operationId":"chat_messages_v1_messages_async_post","summary":"Initiate Async Chat Stream","description":"Initiate an asynchronous chat completion stream.\n\nThis endpoint starts an asynchronous chat completion process that streams\nevents. Unlike synchronous chat, this endpoint returns immediately\nwith a message_id that can be used to observe the stream progress.\n\nKey Features:\n* Asynchronous Processing: Non-blocking request handling with immediate response\n* Stream Observation: Use returned message_id to observe real-time events\n* Works exactly like synchronous chat, but in an async manner\n\nNotes:\n* Optional message_id query parameter for custom stream identification\n* Stream events follow the same format as synchronous chat responses\n* Stream status can be monitored via status endpoint","tags":["asyncMessages"],"parameters":[{"name":"message_id","in":"query","description":"Optional custom identifier for the stream. If not provided, a unique ID will be generated automatically.","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Chat stream initiated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error - Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}}},"requestBody":{"description":"Request body for initiating asynchronous chat completion with multi-turn conversation support.\n\nContains message history, tool definitions, system prompts, and response configuration. The request initiates a background process that streams events, which can be observed via the stream endpoint.\n\nThe request body defines the complete conversation context and AI behavior parameters for generating asynchronous responses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatBody"}}}}}},"/v1/messages/async/{message_id}/stream":{"get":{"operationId":"observe_stream_v1_messages_async__message_id__stream_get","summary":"Observe Async Chat Stream Events","description":"Observe an asynchronous chat stream via Server-Sent Events.\n\nThis endpoint provides a Server-Sent Events stream that delivers\nchat completion events in real-time. The events follow\nthe same format as synchronous chat streaming responses.\n\nStream Lifecycle:\n1. Stream initiated via POST /v1/messages/async\n2. Events begin flowing when processing starts\n3. Stream automatically closes when message completes\n4. Stream can be cancelled via POST /v1/messages/async/{message_id}/cancel\n\nNotes:\n* Stream remains active until message completion or cancellation\n* Events are delivered in chronological order\n* Connection will automatically close when stream ends\n* Use appropriate SSE client libraries for robust event handling","tags":["asyncMessages"],"parameters":[{"name":"message_id","in":"path","description":"Message ID of the asynchronous chat stream to observe. ","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Server-sent events stream with chat completion data","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"Stream not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages/async/{message_id}/status":{"get":{"operationId":"get_stream_status_v1_messages_async__message_id__status_get","summary":"Get Async Chat Stream Status","description":"Get the current status and metadata of an asynchronous chat stream.\n\nThis endpoint returns comprehensive information about a chat stream's\ncurrent state, including processing status, timestamps, error information,\nand additional metadata collected during processing.\n\nStatus Values:\n* pending: Stream created but processing not yet started\n* processing: Active processing with events being generated\n* completed: Stream finished successfully\n* cancelled: Stream was cancelled by user request\n* error: Stream encountered an error and stopped\n\nUse Cases:\n* Monitor stream progress without consuming events\n* Check completion status before attempting to observe\n* Debugging failed streams via error messages\n* Performance monitoring through metadata","tags":["asyncMessages"],"parameters":[{"name":"message_id","in":"path","description":"Message ID of the asynchronous chat stream to check status for. ","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stream status and metadata information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamMetadata"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"Stream not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages/async/{message_id}/cancel":{"post":{"operationId":"cancel_stream_v1_messages_async__message_id__cancel_post","summary":"Cancel Async Chat Stream","description":"Cancel an active asynchronous chat stream.\n\nThis endpoint gracefully cancels an ongoing chat completion stream by:\n1. Setting the cancellation token to stop the event generation loop\n2. Cancelling the underlying asyncio task\n3. Updating the stream status to 'cancelled'\n\nNotes:\n* Cancellation is irreversible - stream cannot be resumed\n* Any active SSE connections will receive a final event and close\n* Stream status will be updated to reflect cancellation\n* Use DELETE endpoint to remove cancelled streams from storage","tags":["asyncMessages"],"parameters":[{"name":"message_id","in":"path","description":"Message ID of the asynchronous chat stream to cancel. ","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stream cancelled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCancellationResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"Stream not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"description":"Empty request body for stream cancellation. No additional parameters are required to cancel a stream.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"/v1/messages/async/{message_id}/delete":{"delete":{"operationId":"delete_stream_v1_messages_async__message_id__delete_delete","summary":"Delete Async Chat Stream","description":"Delete an asynchronous chat stream and clean up all associated resources.\n\nThis endpoint permanently removes a chat stream from storage and cleans\nup all associated resources including:\n* Stream metadata and status information\n* Cached events and message content\n* Task references and cancellation tokens\n\nNotes:\n* Stream must exist to be deleted (returns 404 otherwise)\n* Active streams are automatically cancelled before deletion\n* No response body returned on successful deletion (204 status)\n* Use status endpoint to verify deletion if needed","tags":["asyncMessages"],"parameters":[{"name":"message_id","in":"path","description":"Message ID of the asynchronous chat stream to delete. ","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"Stream not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/embeddings":{"post":{"operationId":"generationV1EmbeddingsPost","summary":"Generate embeddings for text input","description":"Generate vector embeddings from input text.\n\nThis endpoint converts text into high-dimensional vector representations\nthat capture semantic meaning. These embeddings preserve semantic\nrelationships between texts and can be used for various machine learning\ntasks.\n\nNotes:\n* Empty strings or arrays are not accepted\n* Results include index numbers for mapping back to original inputs\n* All embeddings are generated as query vectors. If the embeddings have two modes\n(e.g., query and document), this endpoint only returns query vectors.","tags":["embeddings"],"responses":{"200":{"description":"Successfully generated embeddings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error - Invalid input format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}}},"requestBody":{"description":"Request body for generating vector embeddings from text.\n\nContains input text(s) to be converted into high-dimensional vector representations. Supports both single string input and batch processing with arrays of strings for efficient embedding generation.\n\nThe request body defines text input and processing options for generating semantic embeddings that capture meaning and relationships between texts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsBody"}}}}}},"/v1/artifacts/ingest":{"post":{"operationId":"ingest_content_v1_artifacts_ingest_post","summary":"Ingest Content","description":"Unified endpoint to ingest files, text, URIs, or already processed content","tags":["artifacts"],"responses":{"200":{"description":"Content successfully ingested and processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"description":"JSON request body supporting multiple input types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestBody"}}}}}},"/v1/artifacts/ingest/async":{"post":{"operationId":"ingest_content_async_v1_artifacts_ingest_async_post","summary":"Ingest Content Asynchronously","description":"Initiate asynchronous ingestion of content from multiple sources","tags":["artifacts"],"responses":{"200":{"description":"Successfully initiated ingestion task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"description":"JSON request body containing ingestion parameters and callback configuration for asynchronous processing notifications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestAsyncBody"}}}}}},"/v1/artifacts/ingest/async/{task_id}":{"get":{"operationId":"get_ingest_async_status_v1_artifacts_ingest_async__task_id__get","summary":"Check Ingestion Task Status","description":"Retrieve the current status and results of an asynchronous ingestion task","tags":["artifacts"],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved task status and results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskStatus_IngestResponse_"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/list":{"get":{"operationId":"list_ingested_v1_artifacts_list_get","summary":"List Ingested Documents","description":"Retrieve a list of all documents ingested into a specific collection","tags":["artifacts"],"parameters":[{"name":"collection","in":"query","required":true,"schema":{"type":"string","default":"pgpt_collection"}}],"responses":{"200":{"description":"Successfully retrieved document list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}}}}},"/v1/artifacts/delete":{"post":{"operationId":"delete_ingested_v1_artifacts_delete_post","summary":"Delete Ingested Document","description":"Remove a specific document and all its associated data from the system","tags":["artifacts"],"responses":{"200":{"description":"Document successfully deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts_delete_ingested_v1_artifacts_delete_post_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"description":"JSON request body specifying the collection and artifact to be deleted from the system","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteIngestedDocumentBody"}}}}}},"/v1/artifacts/delete/async":{"post":{"operationId":"delete_ingested_async_v1_artifacts_delete_async_post","summary":"Delete Document Asynchronously","description":"Initiates asynchronous deletion of a document and all associated data.\n\nThis endpoint queues a deletion task for background processing, making it\nsuitable for large documents or when non-blocking operation is required.\nThe task can be monitored using the returned task ID.\n\nIf an ingestion task is currently running for the same document, it will\nbe automatically revoked before initiating the deletion.","tags":["artifacts"],"responses":{"200":{"description":"Successfully initiated deletion task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"description":"JSON request body containing deletion parameters and optional callback configuration for asynchronous processing notifications","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteIngestedDocumentAsyncBody"}}}}}},"/v1/artifacts/delete/async/{task_id}":{"get":{"operationId":"get_delete_async_status_v1_artifacts_delete_async__task_id__get","summary":"Check Deletion Task Status","description":"Retrieve the current status of an asynchronous deletion task","tags":["artifacts"],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved task status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskStatus_NoneType_"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/readers":{"get":{"operationId":"list_readers_v1_artifacts_readers_get","summary":"List Available Readers","description":"Returns all registered readers and the file extensions each one supports.","tags":["artifacts"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadersResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}}}}},"/v1/artifacts/convert":{"post":{"operationId":"convert_content_v1_artifacts_convert_post","summary":"Convert File to Markdown or Tree","description":"Parse a file using the document readers and return its content as markdown text or a structured content tree, without ingesting it into the knowledge base.","tags":["artifacts"],"responses":{"200":{"description":"Successful conversion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}}},"requestBody":{"description":"Request body for converting a file to markdown or structured tree.\n\nInput Types:\n* file: Base64-encoded file content — set 'file_name' in metadata to specify the extension\n* uri: Remote URL or S3 URI pointing to the file\n* text: Plain text or markdown content\n\nFormat Options:\n* markdown (default): Returns parsed content as a flat markdown string\n* object: Returns a hierarchical content tree with typed nodes\n\nReader Selection:\n* Omit 'reader' to use the default reader for the detected file type\n* Use GET /v1/artifacts/readers to list available readers and their supported extensions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertBody"}}}}}},"/v1/artifacts/content":{"post":{"operationId":"content_retrieval_v1_artifacts_content_post","summary":"Retrieve Full Document Content","description":"Retrieve the full content of filtered documents.\n\nThis endpoint provides access to complete document content rather than\nsemantic chunks. Use this when you need the entire context of documents\nrather than relevant excerpts.\n\nKey Features:\n* Full Content: Get complete documents rather than chunks\n* Multiple Formats: Return as markdown text or structured objects\n* Node Type Filtering: Include or exclude images, tables, and other node types\n* Node ID Filtering: Retrieve specific sections by their node IDs\n* Filtered Retrieval: Select specific documents using metadata filters\n* Bulk Retrieval: Get multiple documents in one request\n\nFormat Options:\n* markdown (default): Returns flattened markdown text representation\n* object: Returns hierarchical tree structure with typed nodes\n\nContent Filtering:\n* Use include to retrieve only specific node types\n* Use exclude to omit unwanted content types\n* Use node_ids to retrieve specific sections or nodes by ID\n* Supports TextNode, ImageNode, TableNode, and other node types\n\nSubtree Filtering:\n* Specify node_ids to retrieve only certain sections/nodes\n* Set include_children=True (default) to get full subtrees\n* Set include_children=False to get only specified nodes\n* Set include_ancestors=True to include parent context\n\nNotes:\n* Node type filtering is applied to all retrieved documents\n* Object format preserves document structure and hierarchy\n* Markdown format provides a flattened, readable text representation\n* When node_ids is specified, returns filtered tree structure","tags":["artifacts"],"responses":{"200":{"description":"Successful content retrieval","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error - Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}}},"requestBody":{"description":"Request body for retrieving full document content.\n\nContains context filtering options to select specific documents by collection, artifacts, and metadata criteria. Unlike chunk retrieval, this returns complete document content rather than excerpts.\n\nFormat Options:\n* markdown (default): Returns content as formatted markdown text\n* object: Returns structured tree representation of document hierarchy\n\nContent Filtering:\n* include: Specify node types to include (TextNode, ImageNode, TableNode, etc.)\n* exclude: Specify node types to exclude from the response\n* node_ids: Specify exact node IDs to retrieve specific sections or parts\n* include_children: Whether to include full subtrees below selected nodes\n* include_ancestors: Whether to include ancestor path for context\n\nThe request body defines filtering criteria for bulk document content retrieval from the ingested knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentBody"}}}}}},"/v1/artifacts/chunked-content":{"post":{"operationId":"chunked_content_retrieval_v1_artifacts_chunked_content_post","summary":"Retrieve Full Document Content in Chunks","description":"Retrieve full document content split into chat-optimized chunks.\n\nThis endpoint provides access to complete document content split into\nmanageable chunks suitable for chat interfaces. Unlike semantic chunk\nretrieval, this returns complete documents divided sequentially.\n\nKey Features:\n* Chat-Optimized Chunking: Documents split into conversational pieces\n* Node Type Filtering: Include or exclude images, tables, and other node types\n* Token-Aware Splitting: Respects token limits for chat context management\n* Sequential Chunks: Maintains document order and narrative flow\n* Filtered Retrieval: Select specific documents using metadata filters\n* Token Limiting: Optional max_tokens parameter to control response size\n\nContent Filtering:\n* Use include to retrieve only specific node types\n* Use exclude to omit unwanted content types\n* Supports TextNode, ImageNode, TableNode, and other node types\n* Filtering is applied before chunking\n\nChunking Process:\n1. Retrieve filtered documents based on context criteria\n2. Apply node type filters (include/exclude)\n3. Split documents into chat-appropriate segments respecting max_tokens\n4. Return structured chunks with metadata and citations\n\nNotes:\n* Chunks maintain document structure and logical flow\n* Token limiting prevents context window overflow\n* Node type filtering reduces payload size and improves relevance\n* Use `/artifacts/search` endpoint for semantic search instead","tags":["artifacts"],"responses":{"200":{"description":"Successful chunked content retrieval","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkedContentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error - Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}}},"requestBody":{"description":"Request body for retrieving chunked document content.\n\nContains context filtering options to select specific documents by collection, artifacts, and metadata criteria, plus optional token limiting for chat optimization.\n\nContent Filtering:\n* include: Specify node types to include (TextNode, ImageNode, TableNode, etc.)\n* exclude: Specify node types to exclude from the response\n\nToken Management:\n* max_tokens: Optional parameter to limit total tokens in response\n* Prevents context window overflow in chat interfaces\n\nThe request body defines filtering criteria and chunking parameters for retrieving documents split into chat-ready content blocks with citations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentBody"}}}}}},"/v1/primitives/search":{"post":{"operationId":"search_v1_primitives_search_post","summary":"Retrieve Chunks using Semantic, Keyword, or Hybrid Search","description":"Perform document chunk search using semantic, keyword, or hybrid strategies.\n\nThis endpoint provides flexible search capabilities across ingested documents\nwith support for different search strategies based on use case requirements.\n\nSearch Types:\n* **Semantic Search**: Uses vector embeddings to find chunks with similar meaning\n  to the provided text query, regardless of exact keyword matches\n* **Keyword Search**: Finds chunks containing specific keywords with exact or\n  fuzzy matching capabilities (implementation pending)\n* **Hybrid Search**: Combines semantic similarity with keyword matching for\n  comprehensive results (implementation pending)\n\nKey Features:\n* **Score-based Ranking**: Results include similarity/relevance scores\n* **Context Filtering**: Narrow search to specific collections,\nartifacts, or metadata\n* **Adjacent Context**: Optionally retrieve surrounding chunks for richer context\n* **Configurable Limits**: Control result count (1-100 chunks)\n* **Flexible Matching**: Choose optimal strategy based on query type\n\nSearch Process:\n1. Parse request to determine search strategy and parameters\n2. Apply context filters to narrow search scope\n3. Execute search using appropriate algorithm (semantic/keyword/hybrid)\n4. Rank results by relevance score\n5. Optionally expand results with adjacent chunks for context\n\nCurrent Implementation Status:\n* ✅ Semantic Search: Fully implemented and production-ready\n* 🚧 Keyword Search: Planned feature, returns 400 if requested\n* 🚧 Hybrid Search: Planned feature, returns 400 if requested\n\nNotes:\n* Higher scores indicate better matches\n* Expansion increases response time but provides richer context\n* Use `/artifacts/list` to discover available collections and metadata\n* Semantic search works best for conceptual queries\n* Keyword search (when available) will excel at exact term matching","tags":["primitives"],"responses":{"200":{"description":"Successful chunk retrieval","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"description":"Request body for searching document chunks using different strategies.\n\nSupports three search types:\n- **semantic_search**: Find chunks based on semantic similarity to the text query\n- **keywords_search**: Find chunks containing specific keywords (coming soon)\n- **hybrid_search**: Combine semantic and keyword matching (coming soon)\n\nThe request body defines search criteria, context filtering options, result limits, and expansion settings for retrieving relevant document chunks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Primitives_search_v1_primitives_search_post_Request"}}}}}},"/v1/tools/semantic-search":{"post":{"operationId":"semantic_search_v1_tools_semantic_search_post","summary":"Semantic Search","description":"Run a semantic search using natural language and contextual filters. Supports citation formatting.","tags":["tools"],"responses":{"200":{"description":"Semantic search completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error - Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}}},"requestBody":{"description":"Request body for semantic search. Includes the query, optional filters, and response formatting preferences.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SemanticSearchBody"}}}}}},"/v1/tools/tabular-data-analysis":{"post":{"operationId":"tabular_data_analysis_v1_tools_tabular_data_analysis_post","summary":"Tabular Data Analysis","description":"Analyze structured tabular data using a natural language query.","tags":["tools"],"responses":{"200":{"description":"Tabular analysis completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error - Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}}},"requestBody":{"description":"Request body for analyzing tabular data using a natural language query. Includes filters to scope the documents containing structured data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TabularDataAnalysisBody"}}}}}},"/v1/tools/database-query":{"post":{"operationId":"database_query_v1_tools_database_query_post","summary":"Database Query","description":"Run a natural language query against connected SQL databases.","tags":["tools"],"responses":{"200":{"description":"Database query completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error - Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}}},"requestBody":{"description":"Request body for querying connected SQL databases using natural language. Requires at least one SQL database artifact in the tool context.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseQueryBody"}}}}}},"/v1/tools/web-fetch":{"post":{"operationId":"web_fetch_v1_tools_web_fetch_post","summary":"Web Fetch","description":"Fetch and extract content from a specified web URL.","tags":["tools"],"responses":{"200":{"description":"Web content fetched successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error - Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}}},"requestBody":{"description":"Request body for fetching web content. The last user message must contain a valid URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebFetchBody"}}}}}},"/v1/tools/web-search":{"post":{"operationId":"web_search_v1_tools_web_search_post","summary":"Web Search","description":"Search the web for information related to a natural language query and return aggregated results from multiple sources.","tags":["tools"],"responses":{"200":{"description":"Web search completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error - Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAPIValidationErrorResponse"}}}}},"requestBody":{"description":"Request body for web search. Includes the natural language query to search the web.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebSearchQueryBody"}}}}}},"/v1/skills":{"get":{"operationId":"list_skills_v1_skills_get","summary":"List Skills","description":"List skills for a collection with cursor pagination.","tags":["skills"],"parameters":[{"name":"collection","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":20}},{"name":"page","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":["array","null"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated list of skills.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSkillsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"operationId":"create_skill_v1_skills_post","summary":"Create Skill","description":"Create a new skill in a collection from multipart form fields and uploaded files.","tags":["skills"],"parameters":[{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":["array","null"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Skill created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"description":"Multipart form payload used to create a skill and its initial files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_skill_v1_skills_post"}}}}}},"/v1/skills/validate":{"post":{"operationId":"validate_skill_v1_skills_validate_post","summary":"Validate Skill","description":"Dry-run validation of skill files and metadata without persisting.","tags":["skills"],"responses":{"200":{"description":"Validation result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillValidationResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"description":"Multipart form payload to validate before creating a skill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_validate_skill_v1_skills_validate_post"}}}}}},"/v1/skills/{skill_id}":{"get":{"operationId":"get_skill_v1_skills__skill_id__get","summary":"Get Skill","description":"Retrieve a single skill by identifier within a collection.","tags":["skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"collection","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":["array","null"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Skill found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"operationId":"delete_skill_v1_skills__skill_id__delete","summary":"Delete Skill","description":"Delete a non-readonly skill from a collection.","tags":["skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"collection","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":["array","null"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Skill deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillDeletedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/skills/{skill_id}/versions":{"get":{"operationId":"list_skill_versions_v1_skills__skill_id__versions_get","summary":"List Skill Versions","description":"List versions for a skill with cursor pagination.","tags":["skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"collection","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":20}},{"name":"page","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":["array","null"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated list of skill versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSkillVersionsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"operationId":"create_skill_version_v1_skills__skill_id__versions_post","summary":"Create Skill Version","description":"Create a new version for an existing skill using multipart uploads.","tags":["skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":["array","null"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Skill version created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"description":"Multipart form payload used to create a new skill version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_create_skill_version_v1_skills__skill_id__versions_post"}}}}}},"/v1/skills/{skill_id}/versions/{version}":{"get":{"operationId":"get_skill_version_v1_skills__skill_id__versions__version__get","summary":"Get Skill Version","description":"Retrieve a specific version for a skill.","tags":["skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"collection","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":["array","null"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Skill version found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"operationId":"delete_skill_version_v1_skills__skill_id__versions__version__delete","summary":"Delete Skill Version","description":"Delete a specific skill version.","tags":["skills"],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}},{"name":"collection","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":["array","null"],"items":{"type":"string"}}}],"responses":{"200":{"description":"Skill version deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillVersionDeletedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/files/namespaces":{"get":{"operationId":"list_namespaces_v1_files_namespaces_get","summary":"List namespaces","description":"List all registered filesystem namespaces and their local roots. Namespaces are configured under `filesystems.namespaces` in settings; well-known names include 'session' and 'skills'; additional namespaces may be added in settings.","tags":["files"],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamespaceListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}}}}},"/v1/files":{"get":{"operationId":"list_files_v1_files_get","summary":"List files in a session","description":"List all files associated with a session, combining uploaded input files and sandbox-generated output files. Results are sorted by creation time and support cursor-based pagination.","tags":["files"],"parameters":[{"name":"scope_id","in":"query","description":"Session / container identifier.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Maximum number of files to return per page.","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":20}},{"name":"after_id","in":"query","description":"Return files created after this file ID (exclusive). Used for forward pagination.","required":false,"schema":{"type":["string","null"]}},{"name":"before_id","in":"query","description":"Return files created before this file ID (exclusive). Used for backward pagination.","required":false,"schema":{"type":["string","null"]}},{"name":"namespace","in":"query","description":"Namespace to list files from. Defaults to 'session'.","required":false,"schema":{"type":"string","default":"session"}},{"name":"prefix","in":"query","description":"Object-storage-style key prefix filter. When set, only files whose key starts with this prefix are returned (e.g. `data/2024/` lists everything uploaded under that virtual folder). Works like S3 `list-objects-v2 --prefix`. The prefix is matched against the relative upload key, not the full canonical path.","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"operationId":"upload_file_v1_files_post","summary":"Upload a file","description":"Upload a file into the session's uploads directory. By default the file is stored under `uploads/{filename}` within the session scope; pass `path` to push it to a custom object-storage-style key (e.g. `data/2024/report.pdf`), relative to the uploads mount (`/mnt/user-data/uploads/` inside the sandbox). The relative path is returned as the file ID. Uploading a file to an existing key overwrites it.","tags":["files"],"parameters":[{"name":"scope_id","in":"query","description":"Session / container identifier (matches the `container` field in chat requests).","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","description":"Object-storage-style key for the uploaded file, relative to the uploads mount. Defaults to `uploads/{filename}`. Nested keys are supported and parent directories are created automatically. May be prefixed with `uploads/` for convenience. Must be relative (no leading `/`), must not contain `..` components, and must not end with `/`.","required":false,"schema":{"type":["string","null"]}},{"name":"namespace","in":"query","description":"Namespace for the file. Defaults to 'session'.","required":false,"schema":{"type":"string","default":"session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileMetadata"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"description":"Request payload.","content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"file field."}},"required":["file"]}}}}},"delete":{"operationId":"delete_by_prefix_v1_files_delete","summary":"Delete all files matching a prefix (bulk delete)","description":"S3/blob-style bulk delete: remove every uploaded file whose key starts with *prefix* (e.g. `data/2024/` deletes all files in that virtual folder). Only upload-side files are affected; sandbox output files cannot be bulk-deleted. Returns the count of files actually removed. Anthropic SDK callers can reach this via `client.beta.files.with_raw_response` or a plain `httpx` call with `extra_query={...prefix: data/2024/...}`.","tags":["files"],"parameters":[{"name":"scope_id","in":"query","description":"Session / container identifier.","required":true,"schema":{"type":"string"}},{"name":"prefix","in":"query","description":"Key prefix to delete. All uploaded files whose relative path starts with this string are removed. Must be non-empty. A trailing `/` is recommended to avoid accidentally deleting sibling keys that share the same prefix string (e.g. use `data/2024/` not `data/2024`).","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"query","description":"Namespace to delete from. Defaults to 'session'.","required":false,"schema":{"type":"string","default":"session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedPrefix"}}}},"400":{"description":"prefix is missing or empty.","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"503":{"description":"Files API not configured.","content":{"application/json":{"schema":{"description":"Any type"}}}}}}},"/v1/files/{file_id}":{"get":{"operationId":"get_file_metadata_v1_files__file_id__get","summary":"Get file metadata","description":"Retrieve metadata for a specific file by its relative path ID, e.g. `uploads/data.csv` or `outputs/result.png`.","tags":["files"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"scope_id","in":"query","description":"Session / container identifier.","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"query","description":"Namespace the file belongs to. Defaults to 'session'.","required":false,"schema":{"type":"string","default":"session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileMetadata"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"File not found in the session.","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"503":{"description":"Files API not configured (session namespace not set).","content":{"application/json":{"schema":{"description":"Any type"}}}}}},"put":{"operationId":"put_file_v1_files__file_id__put","summary":"Put a file at a specific path (object-storage style)","description":"S3/blob-style put-object: store the raw request body at the given key. The key is relative to the session's uploads mount (`/mnt/user-data/uploads/` inside the sandbox) and may be nested, e.g. `data/2024/report.pdf`; an explicit `uploads/` prefix is accepted and normalized away. Parent directories are created automatically and existing keys are overwritten. The response is the same `FileMetadata` as `POST /v1/files`, so the returned `id` can be used with the other file endpoints.","tags":["files"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"scope_id","in":"query","description":"Session / container identifier.","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"query","description":"Namespace for the file. Defaults to 'session'.","required":false,"schema":{"type":"string","default":"session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileMetadata"}}}},"400":{"description":"Invalid path key (absolute, `..`, or directory key).","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"Namespace not found.","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"503":{"description":"Files API not configured (session namespace not set).","content":{"application/json":{"schema":{"description":"Any type"}}}}},"requestBody":{"description":"Request payload.","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"delete":{"operationId":"delete_file_v1_files__file_id__delete","summary":"Delete a file","description":"Permanently delete a file from the session. Both uploaded files and sandbox-generated output files can be deleted through this endpoint.","tags":["files"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"scope_id","in":"query","description":"Session / container identifier.","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"query","description":"Namespace the file belongs to. Defaults to 'session'.","required":false,"schema":{"type":"string","default":"session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedFile"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"File not found.","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"503":{"description":"Files API not configured (session namespace not set).","content":{"application/json":{"schema":{"description":"Any type"}}}}}},"head":{"operationId":"head_file_v1_files__file_id__head","summary":"Check file existence and get metadata headers","description":"Lightweight existence check and metadata retrieval. Returns the same metadata as `GET /{file_id}` but as HTTP response headers and with no body — useful for existence checks and ETag-based conditional requests without transferring file content. Mirrors S3 `HeadObject` semantics. Headers returned: `X-File-Id`, `X-File-Mime-Type`, `X-File-Size`, `X-File-Etag`, `X-File-Namespace`, `X-File-Filename`, `X-File-Created-At`.","tags":["files"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"scope_id","in":"query","description":"Session / container identifier.","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"query","description":"Namespace the file belongs to. Defaults to 'session'.","required":false,"schema":{"type":"string","default":"session"}}],"responses":{"200":{"description":"File exists; metadata in response headers.","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"File not found.","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/files/{file_id}/content":{"get":{"operationId":"get_file_content_v1_files__file_id__content_get","summary":"Download file content","description":"Download the raw binary content of a file. The response includes an appropriate `Content-Type` header detected via libmagic and a `Content-Disposition: attachment` header with the original filename.","tags":["files"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"scope_id","in":"query","description":"Session / container identifier.","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"query","description":"Namespace the file belongs to. Defaults to 'session'.","required":false,"schema":{"type":"string","default":"session"}},{"name":"disposition","in":"query","description":"Content-Disposition mode for the response: `attachment` (default, browser download) or `inline` (open in browser / preview). Corresponds to RFC 6266.","required":false,"schema":{"type":"string","default":"attachment"}}],"responses":{"200":{"description":"Raw file bytes with MIME-typed content.","content":{"application/json":{"schema":{"description":"Any type"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Any type"}}}},"404":{"description":"File not found in the session.","content":{"application/json":{"schema":{"description":"Any type"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"503":{"description":"Files API not configured (session namespace not set).","content":{"application/json":{"schema":{"description":"Any type"}}}}}}}},"components":{"schemas":{"MessageInputRole":{"type":"string","enum":["system","user","assistant"],"description":"The role of the message sender","title":"MessageInputRole"},"MessageInputContentOneOf1Items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["audio"],"description":"Discriminator value: audio"}},"required":["type"],"description":"audio variant"},{"type":"object","properties":{"type":{"type":"string","enum":["binary"],"description":"Discriminator value: binary"}},"required":["type"],"description":"binary variant"},{"type":"object","properties":{"type":{"type":"string","enum":["container_upload"],"description":"Discriminator value: container_upload"}},"required":["type"],"description":"container_upload variant"},{"type":"object","properties":{"type":{"type":"string","enum":["document"],"description":"Discriminator value: document"}},"required":["type"],"description":"document variant"},{"type":"object","properties":{"type":{"type":"string","enum":["image"],"description":"Discriminator value: image"}},"required":["type"],"description":"image variant"},{"type":"object","properties":{"type":{"type":"string","enum":["local_resource"],"description":"Discriminator value: local_resource"}},"required":["type"],"description":"local_resource variant"},{"type":"object","properties":{"type":{"type":"string","enum":["mid_conv_system"],"description":"Discriminator value: mid_conv_system"}},"required":["type"],"description":"mid_conv_system variant"},{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"],"description":"Discriminator value: redacted_thinking"}},"required":["type"],"description":"redacted_thinking variant"},{"type":"object","properties":{"type":{"type":"string","enum":["resource"],"description":"Discriminator value: resource"}},"required":["type"],"description":"resource variant"},{"type":"object","properties":{"type":{"type":"string","enum":["resource_link"],"description":"Discriminator value: resource_link"}},"required":["type"],"description":"resource_link variant"},{"type":"object","properties":{"type":{"type":"string","enum":["search_result"],"description":"Discriminator value: search_result"}},"required":["type"],"description":"search_result variant"},{"type":"object","properties":{"type":{"type":"string","enum":["server_tool_use"],"description":"Discriminator value: server_tool_use"}},"required":["type"],"description":"server_tool_use variant"},{"type":"object","properties":{"type":{"type":"string","enum":["source"],"description":"Discriminator value: source"}},"required":["type"],"description":"source variant"},{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"}},"required":["type"],"description":"text variant"},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"],"description":"Discriminator value: thinking"}},"required":["type"],"description":"thinking variant"},{"type":"object","properties":{"type":{"type":"string","enum":["tldr"],"description":"Discriminator value: tldr"}},"required":["type"],"description":"tldr variant"},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"],"description":"Discriminator value: tool_result"}},"required":["type"],"description":"tool_result variant"},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"],"description":"Discriminator value: tool_use"}},"required":["type"],"description":"tool_use variant"}],"discriminator":{"propertyName":"type"},"title":"MessageInputContentOneOf1Items"},"MessageInputContent1":{"type":"array","items":{"$ref":"#/components/schemas/MessageInputContentOneOf1Items"},"title":"MessageInputContent1"},"MessageInputContent":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/MessageInputContent1"}],"description":"The message content","title":"MessageInputContent"},"MessageInput":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/MessageInputRole","description":"The role of the message sender"},"content":{"$ref":"#/components/schemas/MessageInputContent","description":"The message content"}},"required":["role","content"],"description":"Input message for AI conversations.","title":"MessageInput"},"ZylonCitation":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Unique identifier for the citation"},"index":{"type":["integer","null"],"description":"Index of the citation in the document"},"artifact_id":{"type":["string","null"],"description":"Identifier of the artifact associated with the citation"},"source_id":{"type":["string","null"],"description":"Identifier of the source document from which the citation is derived"}},"description":"ZylonCitation represents a citation in the Zylon format.","title":"ZylonCitation"},"Citations":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Enable citations in responses"},"known_citations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ZylonCitation"},"description":"List of known citations to use in the response"}},"description":"Configuration for citation generation in AI responses.","title":"Citations"},"SystemExtensions":{"type":"string","enum":["zylon"],"description":"Enumeration of supported system extensions.","title":"SystemExtensions"},"BlobVisibilityMode":{"type":"string","enum":["binary","internal","public"],"description":"Controls visibility and storage mode for binary large objects (blobs).","title":"BlobVisibilityMode"},"PromptConfig":{"type":"object","properties":{"tools":{"type":"boolean","default":false,"description":"Enable per-tool instruction injection for all available tools."},"citations":{"type":"boolean","default":false,"description":"Enable citation formatting guidelines injection."},"thinking":{"type":"boolean","default":false,"description":"Enable thinking/reasoning guidelines when thinking is enabled."},"code_execution":{"type":"boolean","default":false,"description":"Enable code execution environment instructions (filesystem layout, available paths) when any code execution tool is present."},"skills":{"type":"boolean","default":false,"description":"Enable skill management instructions (when to load/unload skills, workflow guidance) when any skill management tool is present."}},"description":"Controls which platform-level prompt features are injected.\n\nThese flags represent optional AI features adding internal instructions\nto the system prompt. All flags default to ``False`` — opt-in explicitly.","title":"PromptConfig"},"System":{"type":"object","properties":{"use_default_prompt":{"type":"boolean","default":false,"description":"Deprecated: legacy toggle for built-in default prompt injection. Use system.prompt to control per-category prompt injection.","deprecated":true},"text":{"type":["string","null"],"description":"System prompt to use for the chat completion"},"citations":{"$ref":"#/components/schemas/Citations","description":"Citation configuration for source attribution in responses"},"extensions":{"type":"array","items":{"$ref":"#/components/schemas/SystemExtensions"},"description":"Set of enabled extensions"},"blob_visibility":{"$ref":"#/components/schemas/BlobVisibilityMode","description":"Controls how blobs are exposed: binary (raw data), internal (private S3 URI), or public (public S3 URL)"},"prompt":{"$ref":"#/components/schemas/PromptConfig","description":"Controls which platform-level prompt features are injected."}},"description":"System message configuration for AI behavior and prompting.","title":"System"},"ContextFilter":{"type":"object","properties":{"collection":{"type":"string","default":"pgpt_collection","description":"The name of the collection to filter on."},"artifacts":{"type":["array","null"],"items":{"type":"string"},"description":"Artifacts ids to filter on."},"metadata_filter":{"type":["array","null"],"items":{"type":"object","additionalProperties":{"description":"Any type"}},"description":"Metadata filter to apply on the context."}},"description":"Filter by collection, artifacts and metadata in the ingested context.\n\nThe main filter is the collection the context is part of.\n\nAll artifacts ids are ensured to be part of the context. If any of the ids is not\nusable in the context (i.e. doesn't exist), the related task will fail.\n\nThe metadata filter will look for all context matching the metadata, if any, and\nadd it to the context. The filter is a dictionary of key-value pairs.\nThe key is the metadata key, and the value is the metadata value.\n\nIf both artifacts and metadata filters are provided, the result will be the\nintersection of the two filters.","title":"ContextFilter"},"SkillFilter":{"type":"object","properties":{"collection":{"type":"string","minLength":1,"maxLength":255,"description":"Tenant collection boundary used to recover skills."},"skill_or_version_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Optional whitelist of identifiers inside collection. Each item may be a skill id (resolved to latest version) or a skill version id."}},"required":["collection"],"description":"Collection-scoped filter used to resolve active skills and versions.","title":"SkillFilter"},"ToolSpecBodyContextItems":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["file"],"description":"Discriminator value: file"},"value":{"type":"string","description":"Base64 encoded file content"}},"required":["type","value"],"description":"Input for base64 encoded files."},{"type":"object","properties":{"type":{"type":"string","enum":["ingested_artifact"],"description":"Discriminator value: ingested_artifact"},"context_filter":{"$ref":"#/components/schemas/ContextFilter","description":"Already processed ContextFilter"}},"required":["type","context_filter"],"description":"Input for already ingested content."},{"type":"object","properties":{"type":{"type":"string","enum":["skill"],"description":"Discriminator value: skill"},"skill_filter":{"$ref":"#/components/schemas/SkillFilter","description":"Skill filter declaring the collection and optional skill_or_version_ids whitelist."}},"required":["type","skill_filter"],"description":"Input for skill activation using SkillFilter."},{"type":"object","properties":{"type":{"type":"string","enum":["sql_database"],"description":"Discriminator value: sql_database"},"connection_string":{"type":"string","description":"SQL database connection string"},"schemas":{"type":["array","null"],"items":{"type":"string"},"description":"List of specific schemas to include, if None includes all non-system schemas"},"ssl":{"type":"boolean","default":false,"description":"Whether to use SSL for the database connection"},"enable_tables":{"type":"boolean","default":true,"description":"Whether to include tables in the inspection"},"enable_views":{"type":"boolean","default":true,"description":"Whether to include views in the inspection"},"enable_functions":{"type":"boolean","default":true,"description":"Whether to include functions in the inspection"},"enable_procedures":{"type":"boolean","default":true,"description":"Whether to include stored procedures in the inspection"},"description":{"type":"string","default":"","description":"Optional description of the database"}},"required":["type","connection_string"],"description":"Input for SQL database content."},{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"},"value":{"type":"string","description":"Plain text content"}},"required":["type","value"],"description":"Input for plain text content."},{"type":"object","properties":{"type":{"type":"string","enum":["uri"],"default":"uri","description":"Input type discriminator"},"value":{"type":"string","description":"URI to download from"}},"required":["type","value"],"description":"Input for remote URIs."}],"discriminator":{"propertyName":"type"},"title":"ToolSpecBodyContextItems"},"ToolSpecBody":{"type":"object","properties":{"name":{"type":"string","description":"Unique name identifier for the tool"},"type":{"type":["string","null"],"description":"Type of the tool, use to identify internal tools database_query_v1 or semantic_search_v1"},"description":{"type":["string","null"],"description":"Human-readable description of what the tool does"},"inputSchema":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"JSON schema defining the input parameters the tool accepts"},"context":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ToolSpecBodyContextItems"},"description":"Additional context or metadata for the tool"},"deferLoading":{"type":"boolean","default":false,"description":"When true, hide this tool from the model until at least one skill is loaded in the current conversation."},"instructions":{"type":["string","null"],"description":"Optional instructions injected into the system prompt when this tool is available. For internal tools a default template is used; providing a value here overrides that default. Set to an empty string to disable."}},"required":["name"],"description":"Definition for a tool the client can call.","title":"ToolSpecBody"},"ThinkingEffort":{"type":"string","enum":["low","medium","high","max","xhigh"],"description":"Deprecated. Use output_config.effort instead. Kept for backward compatibility with legacy clients.","title":"ThinkingEffort","deprecated":true},"Thinking":{"type":"object","properties":{"enabled":{"type":"boolean","default":false,"description":"Enable reasoning capabilities for the model, allowing it to think step-by-step"},"effort":{"oneOf":[{"$ref":"#/components/schemas/ThinkingEffort"},{"type":"null"}],"description":"Deprecated. Use output_config.effort instead. Kept for backward compatibility with legacy clients.","deprecated":true}},"description":"Configuration for AI reasoning and step-by-step thinking capabilities.","title":"Thinking"},"ToolChoiceType":{"type":"string","enum":["auto","any","tool","none"],"default":"auto","description":"Tool selection strategy","title":"ToolChoiceType"},"ToolChoiceValidationMode":{"type":"string","enum":["eager","lazy"],"default":"lazy","description":"Tool validation mode. 'eager' validates tool calls before execution, 'lazy' validates if tool call is made.","title":"ToolChoiceValidationMode"},"ToolChoice":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ToolChoiceType","default":"auto","description":"Tool selection strategy"},"name":{"type":["string","null"],"description":"Name of the tool to use if not auto-selecting"},"disable_parallel_tool_use":{"type":"boolean","default":false,"description":"When true, prevents the AI from using multiple tools simultaneously"},"validation_mode":{"$ref":"#/components/schemas/ToolChoiceValidationMode","default":"lazy","description":"Tool validation mode. 'eager' validates tool calls before execution, 'lazy' validates if tool call is made."}},"description":"Configuration for tool selection behavior during AI interactions.","title":"ToolChoice"},"OutputConfigInputEffort":{"type":"string","enum":["low","medium","high","max","xhigh"],"description":"Reasoning effort level for output generation.","title":"OutputConfigInputEffort"},"JsonObjectFormat":{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"],"description":"Output format type. Always \"json_schema\"."},"schema":{"type":"object","additionalProperties":{"description":"Any type"},"description":"JSON schema used to constrain the model output."}},"required":["type","schema"],"description":"Structured JSON object format compatible with Anthropic output_config.format.","title":"JsonObjectFormat"},"OutputConfigInput":{"type":"object","properties":{"effort":{"oneOf":[{"$ref":"#/components/schemas/OutputConfigInputEffort"},{"type":"null"}],"description":"Reasoning effort level for output generation."},"format":{"oneOf":[{"$ref":"#/components/schemas/JsonObjectFormat"},{"type":"null"}],"description":"Optional structured output format schema."}},"description":"Output configuration shared across Anthropic-compatible request models.","title":"OutputConfigInput"},"ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl":{"type":"string","enum":["5m","1h"],"default":"5m","description":"ttl field.","title":"ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl"},"ChatBodyCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"Optional request-level cache control.","title":"ChatBodyCacheControl"},"ChatBodyToolContextItems":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["file"],"description":"Discriminator value: file"},"value":{"type":"string","description":"Base64 encoded file content"}},"required":["type","value"],"description":"Input for base64 encoded files."},{"type":"object","properties":{"type":{"type":"string","enum":["ingested_artifact"],"description":"Discriminator value: ingested_artifact"},"context_filter":{"$ref":"#/components/schemas/ContextFilter","description":"Already processed ContextFilter"}},"required":["type","context_filter"],"description":"Input for already ingested content."},{"type":"object","properties":{"type":{"type":"string","enum":["skill"],"description":"Discriminator value: skill"},"skill_filter":{"$ref":"#/components/schemas/SkillFilter","description":"Skill filter declaring the collection and optional skill_or_version_ids whitelist."}},"required":["type","skill_filter"],"description":"Input for skill activation using SkillFilter."},{"type":"object","properties":{"type":{"type":"string","enum":["sql_database"],"description":"Discriminator value: sql_database"},"connection_string":{"type":"string","description":"SQL database connection string"},"schemas":{"type":["array","null"],"items":{"type":"string"},"description":"List of specific schemas to include, if None includes all non-system schemas"},"ssl":{"type":"boolean","default":false,"description":"Whether to use SSL for the database connection"},"enable_tables":{"type":"boolean","default":true,"description":"Whether to include tables in the inspection"},"enable_views":{"type":"boolean","default":true,"description":"Whether to include views in the inspection"},"enable_functions":{"type":"boolean","default":true,"description":"Whether to include functions in the inspection"},"enable_procedures":{"type":"boolean","default":true,"description":"Whether to include stored procedures in the inspection"},"description":{"type":"string","default":"","description":"Optional description of the database"}},"required":["type","connection_string"],"description":"Input for SQL database content."},{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"},"value":{"type":"string","description":"Plain text content"}},"required":["type","value"],"description":"Input for plain text content."},{"type":"object","properties":{"type":{"type":"string","enum":["uri"],"default":"uri","description":"Input type discriminator"},"value":{"type":"string","description":"URI to download from"}},"required":["type","value"],"description":"Input for remote URIs."}],"discriminator":{"propertyName":"type"},"title":"ChatBodyToolContextItems"},"McpServerToolConfig":{"type":"object","properties":{"enabled":{"type":"boolean","default":true,"description":"Enable tool filtering for the MCP server."},"allowed_tools":{"type":["array","null"],"items":{"type":"string"},"description":"List of enabled tools to filter from the MCP server."}},"description":"Configuration for tool filtering from the MCP server.","title":"McpServerToolConfig"},"McpServerConfig":{"type":"object","properties":{"name":{"type":["string","null"],"default":"mcp","description":"A name for the MCP server configuration."},"url":{"type":"string","description":"The URL of the MCP server to connect to."},"authorization_token":{"type":["string","null"],"description":"The authorization token to use when connecting to the MCP server."},"tool_configuration":{"$ref":"#/components/schemas/McpServerToolConfig","description":"Configuration for tool filtering from the MCP server"}},"required":["url"],"description":"Configuration for the MCP server.","title":"McpServerConfig"},"MountEntryMode":{"type":"string","enum":["rw","ro"],"default":"rw","description":"Access mode.","title":"MountEntryMode"},"MountEntry":{"type":"object","properties":{"namespace":{"type":"string","description":"Registered namespace name (e.g. 'session', 'skills', or a custom namespace)."},"scope":{"type":"string","description":"Opaque scope id within the namespace (e.g. thread-id)."},"path":{"type":"string","description":"Relative path within the scope."},"target":{"type":"string","description":"Absolute container path where the content should be visible."},"mode":{"$ref":"#/components/schemas/MountEntryMode","default":"rw","description":"Access mode."},"etag":{"type":["string","null"],"description":"Optional content checksum."},"uri":{"type":["string","null"],"description":"Content origin: s3://, https://, data: or a local disk path. When set, the mount is lazy — content is fetched only if the backing folder is absent or empty."}},"required":["namespace","scope","path","target"],"description":"Declares a file or folder to mount into the sandbox.\n\nPart of the chat request body (``mounts`` field). Declares *what*\ncontent should be visible inside the sandbox and *where* it should\nappear. Content is located one of two ways:\n\n- ``uri`` (preferred): a content origin (``s3://...``, ``https://...``,\n  ``data:...`` or a local disk path). The mount is lazy — content is\n  fetched only when the backing folder is absent or empty.\n- ``namespace``/``scope``/``path``: a reference into a registered\n  filesystem namespace, resolved to the exact host file/folder.","title":"MountEntry"},"ResponseFormatType":{"type":"string","enum":["text","json_schema"],"description":"Enumeration of supported response formats.","title":"ResponseFormatType"},"ResponseFormat":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ResponseFormatType","description":"Response format type"},"json_schema":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"JSON schema definition when type is 'json_schema'"}},"description":"Deprecated response format model. Use JsonObjectFormat.","title":"ResponseFormat","deprecated":true},"CompletionMetadata":{"type":"object","properties":{"user_id":{"type":["string","null"],"maxLength":512,"description":"Opaque user identifier for request attribution."}},"description":"CompletionMetadata schema.","title":"CompletionMetadata"},"ChatBodyServiceTier":{"type":"string","enum":["auto","standard_only"],"default":"auto","description":"Service tier preference (for example, \"auto\" or \"standard_only\").","title":"ChatBodyServiceTier"},"ChatBody":{"type":"object","properties":{"model":{"type":"string","default":"default","description":"Model identifier or alias."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageInput"},"description":"Conversation messages for the request."},"system":{"type":"array","items":{"$ref":"#/components/schemas/System"},"description":"System prompt input. Accepts str, list[str], System, list[System], or null. It is normalized internally to list[System]."},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ToolSpecBody"},"description":"Optional tool definitions."},"thinking":{"$ref":"#/components/schemas/Thinking","description":"Thinking configuration."},"tool_choice":{"$ref":"#/components/schemas/ToolChoice","description":"Tool selection policy."},"output_config":{"$ref":"#/components/schemas/OutputConfigInput","description":"Optional output configuration options."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/ChatBodyCacheControl"},{"type":"null"}],"description":"Optional request-level cache control."},"stream":{"type":"boolean","default":false,"description":"Whether to stream the response back to the client."},"tool_context":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ChatBodyToolContextItems"},"description":"Context to provide to the tools, such as documents,\n        databases connection strings, or data relevant to tool usage."},"mcp_servers":{"type":"array","items":{"$ref":"#/components/schemas/McpServerConfig"},"description":"List of MCP servers to use for tool retrieval. Each server can have its own configuration."},"container":{"type":["string","null"],"description":"Container identifier for reuse across requests."},"mounts":{"type":["array","null"],"items":{"$ref":"#/components/schemas/MountEntry"},"description":"Mount entries requesting files or folders to be available inside the sandbox."},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"Deprecated response format. Use output_config.format instead.","deprecated":true},"priority":{"type":["integer","null"],"description":"Priority of the request, used for prioritizing responses."},"seed":{"type":["integer","null"],"description":"Random seed for reproducibility."},"min_p":{"type":["number","null"],"format":"double","description":"Minimum probability threshold for token selection. Tokens with probability below this value are filtered out."},"top_p":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Nucleus sampling parameter. Only tokens with cumulative probability up to this value are considered."},"temperature":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Controls randomness in generation. Higher values make output more random, lower values more deterministic."},"top_k":{"type":"integer","minimum":0,"description":"Limits token selection to the top K most likely tokens at each step."},"repetition_penalty":{"type":["number","null"],"format":"double","description":"Penalty applied to tokens that have already appeared in the sequence to reduce repetition."},"presence_penalty":{"type":["number","null"],"format":"double","description":"Penalty applied based on whether a token has appeared in the text, encouraging topic diversity."},"frequency_penalty":{"type":["number","null"],"format":"double","description":"Penalty applied based on how frequently a token appears in the text, reducing repetitive content."},"max_tokens":{"type":"integer","minimum":1,"description":"Maximum number of tokens to generate in the response."},"stop_sequences":{"type":"array","items":{"type":"string"},"description":"Custom stop sequences that stop generation when matched."},"metadata":{"$ref":"#/components/schemas/CompletionMetadata","description":"Request metadata (for example, user_id)."},"service_tier":{"$ref":"#/components/schemas/ChatBodyServiceTier","default":"auto","description":"Service tier preference (for example, \"auto\" or \"standard_only\")."},"inference_geo":{"type":["string","null"],"description":"Geographic region hint for inference processing."},"correlation_id":{"type":["string","null"],"description":"Correlation ID for tracking the request across systems."},"maximum_loaded_skills":{"type":["integer","null"],"minimum":1,"description":"Optional cap for concurrently loaded skills in a conversation. When exceeded, the oldest loaded skill is evicted."}},"required":["model","messages","max_tokens"],"description":"Chat request body model for handling chat interactions.","title":"ChatBody"},"TextBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"TextBlockCacheControl"},"TextBlock":{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/TextBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"text":{"type":"string","default":"","description":"Text payload for this block."},"citations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ZylonCitation"},"default":[],"description":"citations field."}},"required":["type"],"description":"Plain-text content block.","title":"TextBlock"},"ImageBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"ImageBlockCacheControl"},"ImageBlockSourceDiscriminatorMappingBase64MediaType":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"],"description":"media type field.","title":"ImageBlockSourceDiscriminatorMappingBase64MediaType"},"ImageBlockSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"],"description":"Discriminator value: base64"},"data":{"type":"string","format":"byte","description":"Base64-encoded image bytes"},"media_type":{"$ref":"#/components/schemas/ImageBlockSourceDiscriminatorMappingBase64MediaType","description":"media type field."}},"required":["type","data","media_type"],"description":"Anthropic base64 image source payload."},{"type":"object","properties":{"type":{"type":"string","enum":["url"],"description":"type field."},"url":{"type":"string","description":"Publicly reachable URL"}},"required":["type","url"],"description":"Shared URL source payload (accepts url/uri input)."}],"discriminator":{"propertyName":"type"},"description":"Anthropic image source payload","title":"ImageBlockSource"},"ImageBlock":{"type":"object","properties":{"type":{"type":"string","enum":["image"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/ImageBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"source":{"$ref":"#/components/schemas/ImageBlockSource","description":"Anthropic image source payload"}},"required":["type","source"],"description":"Anthropic-compatible image content block.","title":"ImageBlock"},"AudioBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"AudioBlockCacheControl"},"AudioBlockSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"],"description":"type field."},"data":{"type":"string","description":"Base64-encoded audio bytes"},"media_type":{"type":"string","description":"Audio MIME type, e.g. 'audio/mpeg'"}},"required":["type","data","media_type"],"description":"Anthropic-style base64 audio source payload."},{"type":"object","properties":{"type":{"type":"string","enum":["url"],"description":"type field."},"url":{"type":"string","description":"Publicly reachable URL"}},"required":["type","url"],"description":"Shared URL source payload (accepts url/uri input)."}],"discriminator":{"propertyName":"type"},"description":"Audio source payload","title":"AudioBlockSource"},"AudioBlock":{"type":"object","properties":{"type":{"type":"string","enum":["audio"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/AudioBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"source":{"$ref":"#/components/schemas/AudioBlockSource","description":"Audio source payload"}},"required":["type","source"],"description":"Anthropic-compatible audio content block.","title":"AudioBlock"},"BinaryBlockSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"],"description":"Discriminator value: base64"},"data":{"type":"string","description":"Base64-encoded binary data"},"media_type":{"type":"string","description":"MIME type, e.g. 'application/pdf'"}},"required":["type","data","media_type"],"description":"Base64 source payload for arbitrary binary data."},{"type":"object","properties":{"type":{"type":"string","enum":["url"],"description":"Discriminator value: url"}},"required":["type"],"description":"url variant"}],"discriminator":{"propertyName":"type"},"description":"Binary source payload","title":"BinaryBlockSource"},"BinaryBlock":{"type":"object","properties":{"type":{"type":"string","enum":["binary"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"filename":{"type":["string","null"],"description":"filename field."},"source":{"$ref":"#/components/schemas/BinaryBlockSource","description":"Binary source payload"}},"required":["type","source"],"description":"Arbitrary binary payload (PDF, ZIP, …) encoded as base64.","title":"BinaryBlock"},"LocalResourceBlock":{"type":"object","properties":{"type":{"type":"string","enum":["local_resource"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"file_path":{"type":"string","description":"Absolute path to the file inside the execution environment"},"file_id":{"type":["string","null"],"description":"Base64url-encoded storage file ID used to download the file via the files API"},"name":{"type":"string","description":"Human-readable file name (stem, without extension)"},"mime_type":{"type":"string","description":"MIME type of the file"}},"required":["type","file_path","name","mime_type"],"description":"Reference to a local file produced by code execution.","title":"LocalResourceBlock"},"ResourceLinkBlock":{"type":"object","properties":{"type":{"type":"string","enum":["resource_link"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"uri":{"type":"string","description":"URI of the external resource"},"name":{"type":"string","description":"Human-readable resource name"},"description":{"type":["string","null"],"description":"description field."},"mime_type":{"type":["string","null"],"description":"mime type field."}},"required":["type","uri","name"],"description":"Reference to an external resource by URI (not embedded).","title":"ResourceLinkBlock"},"Resource":{"type":"object","properties":{"uri":{"type":"string","description":"uri field."},"name":{"type":"string","description":"name field."},"description":{"type":["string","null"],"description":"description field."},"mime_type":{"type":["string","null"],"description":"mime type field."}},"required":["uri","name"],"description":"Resource schema.","title":"Resource"},"ResourceBlock":{"type":"object","properties":{"type":{"type":"string","enum":["resource"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"resource":{"$ref":"#/components/schemas/Resource","description":"Embedded resource metadata"}},"required":["type","resource"],"description":"Embedded resource with metadata.","title":"ResourceBlock"},"IngestedDoc":{"type":"object","properties":{"object":{"type":"string","enum":["ingest.document"],"default":"ingest.document","description":"Type of the object, indicating this is an ingested document."},"artifact":{"type":"string","description":"Unique identifier for the ingested document artifact."},"doc_metadata":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Metadata associated with the ingested document, such as title, author, and other"}},"required":["artifact"],"description":"Represents a document that has been ingested into the system.","title":"IngestedDoc"},"Chunk":{"type":"object","properties":{"object":{"type":"string","enum":["context.chunk"],"description":"Object type identifier, always 'context.chunk' for chunk responses"},"id":{"type":["string","null"],"description":"Unique identifier for the chunk within the document"},"score":{"type":"number","format":"double","minimum":-0.01,"maximum":1.01,"description":"Relevance score indicating how well this chunk matches the query (0.0 to 1.0, higher is better)"},"document":{"$ref":"#/components/schemas/IngestedDoc","description":"Reference to the parent document containing metadata and ingestion information"},"text":{"type":"string","description":"The actual text content of the chunk extracted from the document"},"content_type":{"type":"string","default":"text/plain","description":"MIME type indicating the format of the chunk content"},"previous_texts":{"type":["array","null"],"items":{"type":"string"},"description":"List of text chunks that appear before this chunk in the document, providing preceding context"},"next_texts":{"type":["array","null"],"items":{"type":"string"},"description":"List of text chunks that appear after this chunk in the document, providing following context"},"metadata":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Additional metadata about the chunk including positioning information and document properties"}},"required":["object","score","document","text"],"description":"Represents a chunk of text content from an ingested document.","title":"Chunk"},"Website":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the website source"},"object":{"type":"string","enum":["context.website"],"description":"Object type identifier, always 'context.website' for website sources"},"url":{"type":"string","description":"The URL of the website"},"favicon_url":{"type":["string","null"],"description":"The URL of the website's favicon"},"title":{"type":["string","null"],"description":"The title of the website or webpage"},"description":{"type":["string","null"],"description":"A brief description or summary of the website content"},"metadata":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Additional metadata about the website source"},"content_type":{"type":["string","null"],"description":"MIME type indicating the format of the website content"},"content":{"type":["string","null"],"description":"The actual text content extracted from the website"}},"required":["id","object","url"],"description":"Represents a website URL source.","title":"Website"},"SourceBlockSourcesItems":{"oneOf":[{"$ref":"#/components/schemas/Chunk"},{"$ref":"#/components/schemas/Website"}],"title":"SourceBlockSourcesItems"},"SourceBlock":{"type":"object","properties":{"type":{"type":"string","enum":["source"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceBlockSourcesItems"},"description":"Document chunks used as context for this response"}},"required":["type","sources"],"description":"Document chunks surfaced as RAG context attribution.","title":"SourceBlock"},"ThinkingBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"ThinkingBlockCacheControl"},"ThinkingBlock":{"type":"object","properties":{"type":{"type":"string","enum":["thinking"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/ThinkingBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"thinking":{"type":"string","default":"","description":"Thinking payload"},"signature":{"type":"string","description":"Anthropic reasoning signature required for extended thinking compatibility"},"citations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ZylonCitation"},"default":[],"description":"citations field."}},"required":["type","signature"],"description":"Extended thinking block containing the model's reasoning process.","title":"ThinkingBlock"},"RedactedThinkingBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"RedactedThinkingBlockCacheControl"},"RedactedThinkingBlock":{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/RedactedThinkingBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"data":{"type":"string","description":"Encrypted thinking payload"}},"required":["type","data"],"description":"Redacted thinking block returned when thinking content is encrypted.","title":"RedactedThinkingBlock"},"ToolUseBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"ToolUseBlockCacheControl"},"ToolUseBlockCaller":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["code_execution_20250825"],"description":"Discriminator value: code_execution_20250825"},"tool_id":{"type":"string","pattern":"^srvtoolu_[a-zA-Z0-9_]+$","description":"Server tool identifier."}},"required":["type","tool_id"],"description":"ServerToolCaller schema."},{"type":"object","properties":{"type":{"type":"string","enum":["code_execution_20260120"],"description":"Discriminator value: code_execution_20260120"},"tool_id":{"type":"string","pattern":"^srvtoolu_[a-zA-Z0-9_]+$","description":"Server tool identifier."}},"required":["type","tool_id"],"description":"ServerToolCaller20260120 schema."},{"type":"object","properties":{"type":{"type":"string","enum":["direct"],"description":"Discriminator value: direct"}},"required":["type"],"description":"DirectCaller schema."}],"discriminator":{"propertyName":"type"},"description":"caller field.","title":"ToolUseBlockCaller"},"ToolUseBlock":{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/ToolUseBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"id":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"Unique identifier for this tool use"},"name":{"type":"string","minLength":1,"maxLength":200,"description":"Name of the tool being called"},"input":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Input payload for the tool call"},"caller":{"oneOf":[{"$ref":"#/components/schemas/ToolUseBlockCaller"},{"type":"null"}],"description":"caller field."}},"required":["type","id","name","input"],"description":"Represents a model-initiated tool call.","title":"ToolUseBlock"},"ServerToolUseBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"ServerToolUseBlockCacheControl"},"ServerToolUseBlockName":{"type":"string","enum":["web_search","web_fetch","code_execution","bash_code_execution","text_editor_code_execution","tool_search_tool_regex","tool_search_tool_bm25"],"description":"Name of the server tool being called","title":"ServerToolUseBlockName"},"ServerToolUseBlockCaller":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["code_execution_20250825"],"description":"Discriminator value: code_execution_20250825"},"tool_id":{"type":"string","pattern":"^srvtoolu_[a-zA-Z0-9_]+$","description":"Server tool identifier."}},"required":["type","tool_id"],"description":"ServerToolCaller schema."},{"type":"object","properties":{"type":{"type":"string","enum":["code_execution_20260120"],"description":"Discriminator value: code_execution_20260120"},"tool_id":{"type":"string","pattern":"^srvtoolu_[a-zA-Z0-9_]+$","description":"Server tool identifier."}},"required":["type","tool_id"],"description":"ServerToolCaller20260120 schema."},{"type":"object","properties":{"type":{"type":"string","enum":["direct"],"description":"Discriminator value: direct"}},"required":["type"],"description":"DirectCaller schema."}],"discriminator":{"propertyName":"type"},"description":"caller field.","title":"ServerToolUseBlockCaller"},"ServerToolUseBlock":{"type":"object","properties":{"type":{"type":"string","enum":["server_tool_use"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/ServerToolUseBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"id":{"type":"string","pattern":"^srvtoolu_[a-zA-Z0-9_]+$","description":"Unique identifier for this server tool use"},"name":{"$ref":"#/components/schemas/ServerToolUseBlockName","description":"Name of the server tool being called"},"input":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Input payload for the server tool call"},"caller":{"oneOf":[{"$ref":"#/components/schemas/ServerToolUseBlockCaller"},{"type":"null"}],"description":"caller field."}},"required":["type","id","name","input"],"description":"Represents a server-side (built-in) tool call initiated by the model.","title":"ServerToolUseBlock"},"ContainerUploadBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"ContainerUploadBlockCacheControl"},"ContainerUploadBlock":{"type":"object","properties":{"type":{"type":"string","enum":["container_upload"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/ContainerUploadBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"file_id":{"type":"string","description":"Container file identifier"}},"required":["type","file_id"],"description":"References a file that was uploaded to an Anthropic container.","title":"ContainerUploadBlock"},"DocumentBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"DocumentBlockCacheControl"},"DocumentBlockSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"],"description":"Discriminator value: base64"},"data":{"type":"string","format":"byte","description":"data field."},"media_type":{"type":"string","description":"media type field."}},"required":["type","data","media_type"],"description":"Base64Source schema."},{"type":"object","properties":{"type":{"type":"string","enum":["content"],"description":"Discriminator value: content"}},"required":["type"],"description":"content variant"},{"type":"object","properties":{"type":{"type":"string","enum":["text"],"default":"text","description":"type field."},"data":{"type":"string","description":"data field."},"media_type":{"type":"string","enum":["text/plain"],"description":"media type field."}},"required":["type","data","media_type"],"description":"PlainTextSource schema."},{"type":"object","properties":{"type":{"type":"string","enum":["url"],"default":"url","description":"type field."},"url":{"type":"string","description":"url field."}},"required":["type","url"],"description":"URLDocumentSource schema."}],"discriminator":{"propertyName":"type"},"description":"Document source payload","title":"DocumentBlockSource"},"DocumentBlock":{"type":"object","properties":{"type":{"type":"string","enum":["document"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"source":{"$ref":"#/components/schemas/DocumentBlockSource","description":"Document source payload"},"title":{"type":["string","null"],"description":"title field."},"context":{"type":["string","null"],"minLength":1,"description":"context field."},"citations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ZylonCitation"},"description":"citations field."}},"required":["type","source"],"description":"Anthropic document block (used for document-grounded generation).","title":"DocumentBlock"},"SearchResultBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"SearchResultBlockCacheControl"},"SearchResultBlock":{"type":"object","properties":{"type":{"type":"string","enum":["search_result"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/SearchResultBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"source":{"type":"string","description":"Search result source payload"},"title":{"type":"string","description":"Search result title"},"content":{"type":"array","items":{"$ref":"#/components/schemas/TextBlock"},"description":"Search result content"},"citations":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ZylonCitation"},"description":"citations field."}},"required":["type","source","title","content"],"description":"Anthropic search result block.","title":"SearchResultBlock"},"MidConvSystemBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"MidConvSystemBlockCacheControl"},"MidConvSystemBlock":{"type":"object","properties":{"type":{"type":"string","enum":["mid_conv_system"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/MidConvSystemBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"content":{"type":"array","items":{"$ref":"#/components/schemas/TextBlock"},"description":"System instruction text blocks."}},"required":["type","content"],"description":"System instructions injected at a specific point mid-conversation.","title":"MidConvSystemBlock"},"TldrBlockContentItems":{"oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageBlock"},{"$ref":"#/components/schemas/AudioBlock"},{"$ref":"#/components/schemas/BinaryBlock"},{"$ref":"#/components/schemas/LocalResourceBlock"},{"$ref":"#/components/schemas/ResourceLinkBlock"},{"$ref":"#/components/schemas/ResourceBlock"},{"$ref":"#/components/schemas/SourceBlock"},{"$ref":"#/components/schemas/ThinkingBlock"},{"$ref":"#/components/schemas/RedactedThinkingBlock"},{"$ref":"#/components/schemas/ToolUseBlock"},{"$ref":"#/components/schemas/ServerToolUseBlock"},{"$ref":"#/components/schemas/ContainerUploadBlock"},{"$ref":"#/components/schemas/DocumentBlock"},{"$ref":"#/components/schemas/SearchResultBlock"},{"$ref":"#/components/schemas/MidConvSystemBlock"}],"title":"TldrBlockContentItems"},"TldrBlockTldrSide":{"type":"string","enum":["left","right"],"default":"left","description":"tldr side field.","title":"TldrBlockTldrSide"},"TLDRBlock":{"type":"object","properties":{"type":{"type":"string","enum":["tldr"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"content":{"type":"array","items":{"$ref":"#/components/schemas/TldrBlockContentItems"},"description":"content field."},"tldr_side":{"$ref":"#/components/schemas/TldrBlockTldrSide","default":"left","description":"tldr side field."}},"required":["type"],"description":"Condensed summary block.","title":"TLDRBlock"},"ToolResultBlockCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"cache control field.","title":"ToolResultBlockCacheControl"},"ToolResultBlockContentOneOf1Items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["audio"],"description":"Discriminator value: audio"}},"required":["type"],"description":"audio variant"},{"type":"object","properties":{"type":{"type":"string","enum":["binary"],"description":"Discriminator value: binary"}},"required":["type"],"description":"binary variant"},{"type":"object","properties":{"type":{"type":"string","enum":["container_upload"],"description":"Discriminator value: container_upload"}},"required":["type"],"description":"container_upload variant"},{"type":"object","properties":{"type":{"type":"string","enum":["document"],"description":"Discriminator value: document"}},"required":["type"],"description":"document variant"},{"type":"object","properties":{"type":{"type":"string","enum":["image"],"description":"Discriminator value: image"}},"required":["type"],"description":"image variant"},{"type":"object","properties":{"type":{"type":"string","enum":["local_resource"],"description":"Discriminator value: local_resource"}},"required":["type"],"description":"local_resource variant"},{"type":"object","properties":{"type":{"type":"string","enum":["mid_conv_system"],"description":"Discriminator value: mid_conv_system"}},"required":["type"],"description":"mid_conv_system variant"},{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"],"description":"Discriminator value: redacted_thinking"}},"required":["type"],"description":"redacted_thinking variant"},{"type":"object","properties":{"type":{"type":"string","enum":["resource"],"description":"Discriminator value: resource"}},"required":["type"],"description":"resource variant"},{"type":"object","properties":{"type":{"type":"string","enum":["resource_link"],"description":"Discriminator value: resource_link"}},"required":["type"],"description":"resource_link variant"},{"type":"object","properties":{"type":{"type":"string","enum":["search_result"],"description":"Discriminator value: search_result"}},"required":["type"],"description":"search_result variant"},{"type":"object","properties":{"type":{"type":"string","enum":["server_tool_use"],"description":"Discriminator value: server_tool_use"}},"required":["type"],"description":"server_tool_use variant"},{"type":"object","properties":{"type":{"type":"string","enum":["source"],"description":"Discriminator value: source"}},"required":["type"],"description":"source variant"},{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"}},"required":["type"],"description":"text variant"},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"],"description":"Discriminator value: thinking"}},"required":["type"],"description":"thinking variant"},{"type":"object","properties":{"type":{"type":"string","enum":["tldr"],"description":"Discriminator value: tldr"}},"required":["type"],"description":"tldr variant"},{"type":"object","properties":{"type":{"type":"string","enum":["tool_reference"],"description":"Discriminator value: tool_reference"}},"required":["type"],"description":"tool_reference variant"},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"],"description":"Discriminator value: tool_use"}},"required":["type"],"description":"tool_use variant"}],"discriminator":{"propertyName":"type"},"title":"ToolResultBlockContentOneOf1Items"},"ToolResultBlockContent1":{"type":"array","items":{"$ref":"#/components/schemas/ToolResultBlockContentOneOf1Items"},"title":"ToolResultBlockContent1"},"ToolResultBlockContent":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ToolResultBlockContent1"}],"description":"Tool execution result","title":"ToolResultBlockContent"},"ToolResultBlock":{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"],"description":"type field."},"start_timestamp":{"type":["string","null"],"format":"date-time","description":"start timestamp field."},"stop_timestamp":{"type":["string","null"],"format":"date-time","description":"stop timestamp field."},"_meta":{"type":"object","additionalProperties":{"description":"Any type"},"description":" meta field."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/ToolResultBlockCacheControl"},{"type":"null"}],"description":"cache control field."},"tool_use_id":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"ID of the ToolUseBlock this result answers"},"content":{"$ref":"#/components/schemas/ToolResultBlockContent","default":"","description":"Tool execution result"},"is_error":{"type":"boolean","default":false,"description":"Whether the tool result indicates an error."}},"required":["type","tool_use_id"],"description":"Result produced by a prior tool_use block.","title":"ToolResultBlock"},"MessageContentItems":{"oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageBlock"},{"$ref":"#/components/schemas/AudioBlock"},{"$ref":"#/components/schemas/BinaryBlock"},{"$ref":"#/components/schemas/LocalResourceBlock"},{"$ref":"#/components/schemas/ResourceLinkBlock"},{"$ref":"#/components/schemas/ResourceBlock"},{"$ref":"#/components/schemas/SourceBlock"},{"$ref":"#/components/schemas/ThinkingBlock"},{"$ref":"#/components/schemas/RedactedThinkingBlock"},{"$ref":"#/components/schemas/ToolUseBlock"},{"$ref":"#/components/schemas/ServerToolUseBlock"},{"$ref":"#/components/schemas/ContainerUploadBlock"},{"$ref":"#/components/schemas/DocumentBlock"},{"$ref":"#/components/schemas/SearchResultBlock"},{"$ref":"#/components/schemas/MidConvSystemBlock"},{"$ref":"#/components/schemas/TLDRBlock"},{"$ref":"#/components/schemas/ToolResultBlock"}],"title":"MessageContentItems"},"Container":{"type":"object","properties":{"id":{"type":"string","description":"Container identifier."},"expires_at":{"type":"string","format":"date-time","description":"Container expiration timestamp."}},"required":["id","expires_at"],"description":"Container handle for request reuse.","title":"Container"},"RefusalStopDetailsCategory":{"type":"string","enum":["cyber","bio"],"description":"Optional refusal category.","title":"RefusalStopDetailsCategory"},"RefusalStopDetails":{"type":"object","properties":{"type":{"type":"string","enum":["refusal"],"description":"Stop-details discriminator."},"category":{"oneOf":[{"$ref":"#/components/schemas/RefusalStopDetailsCategory"},{"type":"null"}],"description":"Optional refusal category."},"explanation":{"type":["string","null"],"description":"Optional human-readable refusal explanation."}},"required":["type"],"description":"Additional metadata when generation stops due to refusal.","title":"RefusalStopDetails"},"CacheCreation":{"type":"object","properties":{"ephemeral_1h_input_tokens":{"type":"integer","description":"Input tokens cached with 1-hour TTL."},"ephemeral_5m_input_tokens":{"type":"integer","description":"Input tokens cached with 5-minute TTL."}},"required":["ephemeral_1h_input_tokens","ephemeral_5m_input_tokens"],"description":"Token counts cached by ephemeral policy.","title":"CacheCreation"},"OutputTokensDetails":{"type":"object","properties":{"reasoning_tokens":{"type":["integer","null"],"description":"Output tokens spent on internal reasoning."}},"description":"Breakdown of output tokens by category.","title":"OutputTokensDetails"},"ServerToolUsage":{"type":"object","properties":{"web_fetch_requests":{"type":"integer","description":"Number of web fetch requests used."},"web_search_requests":{"type":"integer","description":"Number of web search requests used."}},"required":["web_fetch_requests","web_search_requests"],"description":"Usage counters for server-side tools.","title":"ServerToolUsage"},"UsageServiceTier":{"type":"string","enum":["standard","priority","batch"],"description":"Service tier used for this response.","title":"UsageServiceTier"},"Usage":{"type":"object","properties":{"cache_creation":{"oneOf":[{"$ref":"#/components/schemas/CacheCreation"},{"type":"null"}],"description":"Cache creation details, when present."},"cache_creation_input_tokens":{"type":["integer","null"],"description":"Number of input tokens written to cache."},"cache_read_input_tokens":{"type":["integer","null"],"description":"Number of input tokens read from cache."},"inference_geo":{"type":["string","null"],"description":"Inference region code, when available."},"input_tokens":{"type":["integer","null"],"description":"Input token count for this response."},"output_tokens":{"type":["integer","null"],"description":"Output token count for this response."},"output_tokens_details":{"oneOf":[{"$ref":"#/components/schemas/OutputTokensDetails"},{"type":"null"}],"description":"Breakdown of output tokens by category."},"server_tool_use":{"oneOf":[{"$ref":"#/components/schemas/ServerToolUsage"},{"type":"null"}],"description":"Usage counters for server-side tool calls."},"service_tier":{"oneOf":[{"$ref":"#/components/schemas/UsageServiceTier"},{"type":"null"}],"description":"Service tier used for this response."}},"description":"Token usage statistics.","title":"Usage"},"Message":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier."},"type":{"type":"string","enum":["message"],"default":"message","description":"Object type."},"role":{"type":"string","enum":["assistant"],"default":"assistant","description":"Message author role."},"content":{"type":"array","items":{"$ref":"#/components/schemas/MessageContentItems"},"description":"Assistant content blocks."},"model":{"type":"string","default":"private-gpt","description":"Model name used."},"container":{"oneOf":[{"$ref":"#/components/schemas/Container"},{"type":"null"}],"description":"Optional execution container."},"stop_details":{"oneOf":[{"$ref":"#/components/schemas/RefusalStopDetails"},{"type":"null"}],"description":"Optional structured stop details."},"stop_reason":{"type":["string","null"],"description":"Message stop reason."},"stop_sequence":{"type":["string","null"],"description":"Matched stop sequence, if any."},"usage":{"$ref":"#/components/schemas/Usage","description":"Token usage stats."}},"description":"Anthropic-compatible message response.","title":"Message"},"CountTokensInputCacheControl":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"],"description":"Discriminator value: ephemeral"},"ttl":{"$ref":"#/components/schemas/ToolUseBlockCacheControlDiscriminatorMappingEphemeralTtl","default":"5m","description":"ttl field."}},"required":["type"],"description":"CacheControlEphemeral schema."}],"discriminator":{"propertyName":"type"},"description":"Optional request-level cache control.","title":"CountTokensInputCacheControl"},"CountTokensInput":{"type":"object","properties":{"model":{"type":"string","default":"default","description":"Model identifier or alias."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageInput"},"description":"Conversation messages for the request."},"system":{"type":"array","items":{"$ref":"#/components/schemas/System"},"description":"System prompt input. Accepts str, list[str], System, list[System], or null. It is normalized internally to list[System]."},"tools":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ToolSpecBody"},"description":"Optional tool definitions."},"thinking":{"$ref":"#/components/schemas/Thinking","description":"Thinking configuration."},"tool_choice":{"$ref":"#/components/schemas/ToolChoice","description":"Tool selection policy."},"output_config":{"$ref":"#/components/schemas/OutputConfigInput","description":"Optional output configuration options."},"cache_control":{"oneOf":[{"$ref":"#/components/schemas/CountTokensInputCacheControl"},{"type":"null"}],"description":"Optional request-level cache control."}},"required":["model","messages"],"description":"Anthropic /messages/count_tokens payload.","title":"CountTokensInput"},"CountTokensOutput":{"type":"object","properties":{"input_tokens":{"type":"integer","description":"Estimated number of input tokens for the provided payload."}},"required":["input_tokens"],"description":"Token count payload.","title":"CountTokensOutput"},"ValidationErrorLocItems":{"oneOf":[{"type":"string"},{"type":"integer"}],"title":"ValidationErrorLocItems"},"ValidationErrorCtx":{"type":"object","properties":{},"description":"ctx field.","title":"ValidationErrorCtx"},"ValidationError":{"type":"object","properties":{"loc":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorLocItems"},"description":"loc field."},"msg":{"type":"string","description":"msg field."},"type":{"type":"string","description":"type field."},"input":{"description":"input field."},"ctx":{"$ref":"#/components/schemas/ValidationErrorCtx","description":"ctx field."}},"required":["loc","msg","type"],"description":"ValidationError schema.","title":"ValidationError"},"HTTPValidationError":{"type":"object","properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"detail field."}},"description":"HTTPValidationError schema.","title":"HTTPValidationError"},"ChatValidationResult":{"type":"object","properties":{"valid":{"type":"boolean","default":false,"description":"Is the request valid"},"errors":{"type":["array","null"],"items":{"type":"string"},"description":"List of validation errors if any"}},"description":"Result of chat request validation.","title":"ChatValidationResult"},"CompletionInput":{"type":"object","properties":{"model":{"type":"string","description":"Model identifier or alias."},"prompt":{"type":"string","minLength":1,"description":"Legacy completion prompt in Human/Assistant format."},"max_tokens_to_sample":{"type":"integer","minimum":1,"description":"Maximum number of tokens to sample."},"metadata":{"oneOf":[{"$ref":"#/components/schemas/CompletionMetadata"},{"type":"null"}],"description":"Metadata object for request attribution."},"stop_sequences":{"type":["array","null"],"items":{"type":"string"},"description":"Stop generation if any sequence is encountered."},"stream":{"type":"boolean","default":false,"description":"Whether to stream the response."},"temperature":{"type":["number","null"],"format":"double","minimum":0,"maximum":1,"description":"Sampling temperature between 0 and 1."},"top_k":{"type":["integer","null"],"minimum":0,"description":"Top-k sampling parameter."},"top_p":{"type":["number","null"],"format":"double","minimum":0,"maximum":1,"description":"Top-p sampling parameter."}},"required":["model","prompt","max_tokens_to_sample"],"description":"Anthropic completion request payload.","title":"CompletionInput"},"CompletionOutput":{"type":"object","properties":{"id":{"type":"string","description":"Completion identifier"},"type":{"type":"string","enum":["completion"],"description":"Object type. Always \"completion\"."},"completion":{"type":"string","description":"Generated completion text."},"stop_reason":{"type":["string","null"],"description":"Reason the generation stopped."},"model":{"type":"string","description":"Resolved model identifier."}},"required":["id","type","completion","stop_reason","model"],"description":"Anthropic completion response payload.","title":"CompletionOutput"},"CapabilitySupportOutput":{"type":"object","properties":{"supported":{"type":"boolean","description":"Whether a capability is supported."}},"required":["supported"],"description":"CapabilitySupportOutput schema.","title":"CapabilitySupportOutput"},"ContextManagementCapabilityOutput":{"type":"object","properties":{"clear_thinking_20251015":{"oneOf":[{"$ref":"#/components/schemas/CapabilitySupportOutput"},{"type":"null"}],"description":"Support for strategy \"clear_thinking_20251015\"."},"clear_tool_uses_20250919":{"oneOf":[{"$ref":"#/components/schemas/CapabilitySupportOutput"},{"type":"null"}],"description":"Support for strategy \"clear_tool_uses_20250919\"."},"compact_20260112":{"oneOf":[{"$ref":"#/components/schemas/CapabilitySupportOutput"},{"type":"null"}],"description":"Support for strategy \"compact_20260112\"."},"supported":{"type":"boolean","description":"Whether context management is supported."}},"required":["clear_thinking_20251015","clear_tool_uses_20250919","compact_20260112","supported"],"description":"ContextManagementCapabilityOutput schema.","title":"ContextManagementCapabilityOutput"},"EffortCapabilityOutput":{"type":"object","properties":{"supported":{"type":"boolean","description":"Whether effort control is supported."},"low":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Support for effort \"low\"."},"medium":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Support for effort \"medium\"."},"high":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Support for effort \"high\"."},"max":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Support for effort \"max\"."},"xhigh":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Support for effort \"xhigh\"."}},"required":["supported","low","medium","high","max","xhigh"],"description":"EffortCapabilityOutput schema.","title":"EffortCapabilityOutput"},"CountCapabilitySupportOutput":{"type":"object","properties":{"supported":{"type":"boolean","description":"Whether a capability is supported."},"maximum":{"type":"integer","default":0,"description":"Maximum number of allowed elements."}},"required":["supported"],"description":"CountCapabilitySupportOutput schema.","title":"CountCapabilitySupportOutput"},"ThinkingTypesOutput":{"type":"object","properties":{"adaptive":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Support for thinking type \"adaptive\"."},"enabled":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Support for thinking type \"enabled\"."}},"required":["adaptive","enabled"],"description":"ThinkingTypesOutput schema.","title":"ThinkingTypesOutput"},"ThinkingCapabilityOutput":{"type":"object","properties":{"supported":{"type":"boolean","description":"Whether thinking is supported."},"types":{"$ref":"#/components/schemas/ThinkingTypesOutput","description":"Thinking type support configuration."}},"required":["supported","types"],"description":"ThinkingCapabilityOutput schema.","title":"ThinkingCapabilityOutput"},"ModelCapabilitiesOutput":{"type":"object","properties":{"batch":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Batch API support."},"citations":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Citation support."},"code_execution":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Code execution support."},"context_management":{"$ref":"#/components/schemas/ContextManagementCapabilityOutput","description":"Context management capabilities."},"effort":{"$ref":"#/components/schemas/EffortCapabilityOutput","description":"Reasoning effort capabilities."},"image_input":{"$ref":"#/components/schemas/CountCapabilitySupportOutput","description":"Image input support."},"audio_input":{"oneOf":[{"$ref":"#/components/schemas/CountCapabilitySupportOutput"},{"type":"null"}],"description":"Audio input support."},"pdf_input":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"PDF input support."},"structured_outputs":{"$ref":"#/components/schemas/CapabilitySupportOutput","description":"Structured output support."},"thinking":{"$ref":"#/components/schemas/ThinkingCapabilityOutput","description":"Thinking support."}},"required":["batch","citations","code_execution","context_management","effort","image_input","pdf_input","structured_outputs","thinking"],"description":"ModelCapabilitiesOutput schema.","title":"ModelCapabilitiesOutput"},"ModelInfoOutput":{"type":"object","properties":{"id":{"type":"string","description":"Unique model identifier."},"created_at":{"type":"string","format":"date-time","description":"Model release timestamp (RFC3339)."},"display_name":{"type":"string","description":"Human-readable model name."},"type":{"type":"string","enum":["model"],"description":"Object type \"model\"."},"max_tokens":{"type":["integer","null"],"description":"Maximum value allowed for max_tokens for this model."},"max_input_tokens":{"type":["integer","null"],"description":"Maximum input context window for this model."},"embed_dim":{"type":["integer","null"],"description":"Embedding vector dimension for embedding models."},"capabilities":{"oneOf":[{"$ref":"#/components/schemas/ModelCapabilitiesOutput"},{"type":"null"}],"description":"Detailed model capability map."}},"required":["id","created_at","display_name","type","max_tokens","max_input_tokens","capabilities"],"description":"Model metadata payload.","title":"ModelInfoOutput"},"ModelListOutput":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ModelInfoOutput"},"description":"List of model objects."},"first_id":{"type":["string","null"],"description":"First model id in page, usable as before_id."},"has_more":{"type":"boolean","description":"Whether more models are available."},"last_id":{"type":["string","null"],"description":"Last model id in page, usable as after_id."}},"required":["data","first_id","has_more","last_id"],"description":"Paginated model list payload.","title":"ModelListOutput"},"StreamStatus":{"type":"string","enum":["pending","processing","completed","failed","cancelled","error"],"description":"Enumeration of possible stream statuses.","title":"StreamStatus"},"ChatResponse":{"type":"object","properties":{"message_id":{"type":"string","description":"Unique identifier for the initiated stream"},"status":{"$ref":"#/components/schemas/StreamStatus","description":"Initial status of the stream (typically 'pending')"},"message":{"type":"string","default":"Request initiated successfully","description":"Confirmation message for successful stream initiation"}},"required":["message_id","status"],"description":"Response model for initiated asynchronous chat completion streams","title":"ChatResponse"},"OpenApiValidationErrorResponseDetail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":{"description":"Any type"}}}],"description":"Error detail — a string message or a list of validation error objects.","title":"OpenApiValidationErrorResponseDetail"},"OpenAPIValidationErrorResponse":{"type":"object","properties":{"detail":{"$ref":"#/components/schemas/OpenApiValidationErrorResponseDetail","description":"Error detail — a string message or a list of validation error objects."}},"required":["detail"],"description":"Standard 422 validation error response.","title":"OpenAPIValidationErrorResponse"},"StreamMetadata":{"type":"object","properties":{"message_id":{"type":"string","description":"Unique identifier for the stream"},"status":{"$ref":"#/components/schemas/StreamStatus","description":"Current status of the stream"},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the stream was created"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp when the stream was last updated"},"completed_at":{"type":["string","null"],"format":"date-time","description":"Timestamp when the stream was completed, if applicable"},"error_message":{"type":["string","null"],"description":"Error message if the stream encountered an error"},"stream_type":{"type":"string","default":"default","description":"Type of the stream, used for categorization"},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Additional metadata associated with the stream"}},"required":["message_id","status","created_at","updated_at"],"description":"Stream metadata and status information for asynchronous chat completions","title":"StreamMetadata"},"ChatCancellationResponse":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation message for successful stream cancellation"},"message_id":{"type":"string","description":"Unique identifier of the cancelled stream"}},"required":["message","message_id"],"description":"Response model for cancelled asynchronous chat streams","title":"ChatCancellationResponse"},"EmbeddingsBodyInput":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The text(s) to generate embeddings for. Can be a single string or an array of strings. Each text should be a meaningful unit of text (sentence, paragraph, etc).","title":"EmbeddingsBodyInput"},"EmbeddingsBody":{"type":"object","properties":{"model":{"type":"string","default":"default","description":"Model identifier or alias."},"input":{"$ref":"#/components/schemas/EmbeddingsBodyInput","description":"The text(s) to generate embeddings for. Can be a single string or an array of strings. Each text should be a meaningful unit of text (sentence, paragraph, etc)."}},"required":["input"],"description":"Request body for generating vector embeddings from text input.","title":"EmbeddingsBody"},"Embedding":{"type":"object","properties":{"index":{"type":"integer","description":"Sequential index of this embedding in the batch, starting from 0"},"object":{"type":"string","enum":["embedding"],"default":"embedding","description":"Type identifier for this object, always 'embedding'"},"embedding":{"type":"array","items":{"type":"number","format":"double"},"description":"High-dimensional vector representation of the text content as a list of floating-point numbers"}},"required":["index","embedding"],"description":"Represents a vector embedding for a piece of text content.","title":"Embedding"},"EmbeddingsResponse":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"default":"list","description":"The type of object returned"},"model":{"type":"string","enum":["private-gpt"],"default":"private-gpt","description":"The model used to generate embeddings"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Embedding"},"description":"List of embeddings, one for each input text"}},"required":["data"],"description":"Response containing generated embeddings for input text(s).","title":"EmbeddingsResponse"},"IngestBodyInput":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["file"],"description":"Discriminator value: file"},"value":{"type":"string","description":"Base64 encoded file content"}},"required":["type","value"],"description":"Input for base64 encoded files."},{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"},"value":{"type":"string","description":"Plain text content"}},"required":["type","value"],"description":"Input for plain text content."},{"type":"object","properties":{"type":{"type":"string","enum":["uri"],"default":"uri","description":"Input type discriminator"},"value":{"type":"string","description":"URI to download from"}},"required":["type","value"],"description":"Input for remote URIs."}],"discriminator":{"propertyName":"type"},"description":"Raw input data to be processed and ingested into the system. Can be a file (base64), URI, or plain text","title":"IngestBodyInput"},"IngestBody":{"type":"object","properties":{"artifact":{"type":"string","minLength":1,"maxLength":255,"description":"Unique identifier for the text being ingested within the collection"},"collection":{"type":"string","minLength":1,"maxLength":255,"default":"pgpt_collection","description":"Collection name to group related documents for better organization and filtering"},"input":{"$ref":"#/components/schemas/IngestBodyInput","description":"Raw input data to be processed and ingested into the system. Can be a file (base64), URI, or plain text"},"metadata":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Optional metadata dictionary containing additional document information. If provided, must include 'file_name' with a valid file extension"}},"required":["artifact","input"],"description":"Request body for ingesting content into the system for AI context.","title":"IngestBody"},"IngestResponse":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"default":"list","description":"Response object type, always 'list' for ingestion responses"},"model":{"type":"string","enum":["private-gpt"],"default":"private-gpt","description":"Model identifier, always 'private-gpt'"},"data":{"type":"array","items":{"$ref":"#/components/schemas/IngestedDoc"},"description":"List of ingested documents with their metadata and processing information"}},"required":["data"],"description":"Response model for successful document ingestion operations.","title":"IngestResponse"},"AMQP":{"type":"object","properties":{"exchange":{"type":"string","description":"AMQP exchange name where task notifications will be published"},"routing_key_done":{"type":["string","null"],"description":"Routing key used when publishing task completion notifications"},"routing_key_progress":{"type":["string","null"],"description":"Routing key used when publishing task progress update notifications"},"routing_key_error":{"type":["string","null"],"description":"Routing key used when publishing task error notifications"}},"required":["exchange"],"description":"AMQP configuration for message queue notifications.","title":"AMQP"},"Callback":{"type":"object","properties":{"amqp":{"$ref":"#/components/schemas/AMQP","description":"AMQP (Advanced Message Queuing Protocol) configuration for task status notifications"},"properties":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Additional properties and metadata to include with callback notifications"}},"required":["amqp"],"description":"Callback configuration for asynchronous task notifications.","title":"Callback"},"ObjectType":{"type":"string","enum":["1","2","3","4","5"],"description":"ObjectType schema.","title":"ObjectType"},"RelatedNodeInfoNodeType":{"oneOf":[{"$ref":"#/components/schemas/ObjectType"},{"type":"string"}],"description":"node type field.","title":"RelatedNodeInfoNodeType"},"RelatedNodeInfo":{"type":"object","properties":{"node_id":{"type":"string","description":"node id field."},"node_type":{"oneOf":[{"$ref":"#/components/schemas/RelatedNodeInfoNodeType"},{"type":"null"}],"description":"node type field."},"metadata":{"type":"object","additionalProperties":{"description":"Any type"},"description":"metadata field."},"hash":{"type":["string","null"],"description":"hash field."},"class_name":{"type":"string","default":"RelatedNodeInfo","description":"class name field."}},"required":["node_id"],"description":"RelatedNodeInfo schema.","title":"RelatedNodeInfo"},"BaseNodeRelationships1":{"type":"array","items":{"$ref":"#/components/schemas/RelatedNodeInfo"},"title":"BaseNodeRelationships1"},"BaseNodeRelationships":{"oneOf":[{"$ref":"#/components/schemas/RelatedNodeInfo"},{"$ref":"#/components/schemas/BaseNodeRelationships1"}],"title":"BaseNodeRelationships"},"BaseNode":{"type":"object","properties":{"id_":{"type":"string","description":"Unique ID of the node."},"embedding":{"type":["array","null"],"items":{"type":"number","format":"double"},"description":"Embedding of the node."},"extra_info":{"type":"object","additionalProperties":{"description":"Any type"},"description":"A flat dictionary of metadata fields"},"excluded_embed_metadata_keys":{"type":"array","items":{"type":"string"},"description":"Metadata keys that are excluded from text for the embed model."},"excluded_llm_metadata_keys":{"type":"array","items":{"type":"string"},"description":"Metadata keys that are excluded from text for the LLM."},"relationships":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/BaseNodeRelationships"},"description":"A mapping of relationships to other node information."},"metadata_template":{"type":"string","default":"{key}: {value}","description":"Template for how metadata is formatted, with {key} and {value} placeholders."},"metadata_seperator":{"type":"string","default":"\n","description":"Separator between metadata fields when converting to string."},"class_name":{"type":"string","default":"base_component","description":"class name field."}},"description":"Base node Object.\n\nGeneric abstract interface for retrievable nodes","title":"BaseNode"},"IngestAsyncBody":{"type":"object","properties":{"callback":{"oneOf":[{"$ref":"#/components/schemas/Callback"},{"type":"null"}],"description":"Optional callback configuration for receiving asynchronous task notifications"},"ingest_body":{"$ref":"#/components/schemas/IngestBody","description":"Document ingestion parameters including artifact, collection, input data, and optional metadata"},"nodes":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BaseNode"},"description":"Parsed nodes produced by parse_task, consumed by store_vectors_task."}},"required":["ingest_body"],"description":"Request body for asynchronous URI ingestion.","title":"IngestAsyncBody"},"Task":{"type":"object","properties":{"task_id":{"type":"string","description":"Unique identifier for the asynchronous task, used to track progress and retrieve results"}},"required":["task_id"],"description":"Represents an asynchronous task that has been queued.","title":"Task"},"TaskStatusIngestResponseTaskResult":{"oneOf":[{"$ref":"#/components/schemas/IngestResponse"},{"type":"string"}],"description":"Task execution result. Contains typed result data on success, error message string on failure, or None for pending/deletion tasks","title":"TaskStatusIngestResponseTaskResult"},"TaskStatus_IngestResponse_":{"type":"object","properties":{"task_id":{"type":"string","description":"Unique identifier of the task being monitored"},"task_status":{"type":"string","description":"Current execution status of the task. Common values: PENDING, SUCCESS, FAILURE, REVOKED"},"task_result":{"oneOf":[{"$ref":"#/components/schemas/TaskStatusIngestResponseTaskResult"},{"type":"null"}],"description":"Task execution result. Contains typed result data on success, error message string on failure, or None for pending/deletion tasks"}},"required":["task_id","task_status","task_result"],"description":"Represents the status of an asynchronous task, including its ID, status, and result.","title":"TaskStatus_IngestResponse_"},"DeleteIngestedDocumentBody":{"type":"object","properties":{"collection":{"type":"string","minLength":1,"maxLength":255,"description":"Name of the collection containing the document to be deleted"},"artifact":{"type":"string","minLength":1,"maxLength":255,"description":"Unique identifier of the document to delete from the specified collection"}},"required":["collection","artifact"],"description":"Request body for deleting specific ingested documents from the system.","title":"DeleteIngestedDocumentBody"},"Artifacts_delete_ingested_v1_artifacts_delete_post_Response_200":{"type":"object","properties":{},"description":"Empty response body","title":"Artifacts_delete_ingested_v1_artifacts_delete_post_Response_200"},"DeleteIngestedDocumentAsyncBody":{"type":"object","properties":{"callback":{"oneOf":[{"$ref":"#/components/schemas/Callback"},{"type":"null"}],"description":"Optional callback configuration for receiving asynchronous task notifications"},"delete_body":{"$ref":"#/components/schemas/DeleteIngestedDocumentBody","description":"Document deletion parameters including collection and artifact identifiers"}},"required":["delete_body"],"description":"Request body for asynchronous document deletion.","title":"DeleteIngestedDocumentAsyncBody"},"TaskStatus_NoneType_":{"type":"object","properties":{"task_id":{"type":"string","description":"Unique identifier of the task being monitored"},"task_status":{"type":"string","description":"Current execution status of the task. Common values: PENDING, SUCCESS, FAILURE, REVOKED"},"task_result":{"type":["string","null"],"description":"Task execution result. Contains typed result data on success, error message string on failure, or None for pending/deletion tasks"}},"required":["task_id","task_status","task_result"],"description":"Represents the status of an asynchronous task, including its ID, status, and result.","title":"TaskStatus_NoneType_"},"ReaderInfo":{"type":"object","properties":{"extensions":{"type":"array","items":{"type":"string"},"description":"File extensions this reader can process"}},"required":["extensions"],"description":"ReaderInfo schema.","title":"ReaderInfo"},"ReadersResponse":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ReaderInfo"},"description":"Available readers and the extensions each one supports"}},"required":["data"],"description":"ReadersResponse schema.","title":"ReadersResponse"},"ConvertBodyInput":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["file"],"description":"Discriminator value: file"},"value":{"type":"string","description":"Base64 encoded file content"}},"required":["type","value"],"description":"Input for base64 encoded files."},{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"},"value":{"type":"string","description":"Plain text content"}},"required":["type","value"],"description":"Input for plain text content."},{"type":"object","properties":{"type":{"type":"string","enum":["uri"],"default":"uri","description":"Input type discriminator"},"value":{"type":"string","description":"URI to download from"}},"required":["type","value"],"description":"Input for remote URIs."}],"discriminator":{"propertyName":"type"},"description":"File content as base64, remote URI, or plain text","title":"ConvertBodyInput"},"ContentFormat":{"type":"string","enum":["object","markdown"],"description":"Enumeration of content retrieval formats.","title":"ContentFormat"},"ConvertBody":{"type":"object","properties":{"input":{"$ref":"#/components/schemas/ConvertBodyInput","description":"File content as base64, remote URI, or plain text"},"metadata":{"type":["object","null"],"additionalProperties":{"description":"Any type"},"description":"Optional metadata, must include 'file_name' to resolve file extension"},"reader":{"type":["string","null"],"description":"Reader to use for parsing. If omitted the default reader for the file type is used."},"format":{"$ref":"#/components/schemas/ContentFormat","description":"Output format: 'markdown' returns text, 'object' returns a content tree."}},"required":["input"],"description":"ConvertBody schema.","title":"ConvertBody"},"ContentTree":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the node"},"type":{"type":"string","description":"Type of the node (e.g., section, paragraph)"},"content":{"type":"string","description":"Text content of the node"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ContentTree"},"description":"Child nodes representing nested content structure"}},"required":["id","type","content"],"description":"Structured representation of document content as a tree.","title":"ContentTree"},"ConvertResponseContent":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentTree"}],"description":"Parsed file content in the requested format","title":"ConvertResponseContent"},"ConvertResponse":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/ConvertResponseContent","description":"Parsed file content in the requested format"},"reader":{"type":"string","description":"Reader that was used to parse the file"}},"required":["content","reader"],"description":"ConvertResponse schema.","title":"ConvertResponse"},"ContentFilterIncludeItems":{"type":"string","enum":["ImageNode","ListItemNode","ListNode","SectionNode","TableNode","TableRowNode","TextNode"],"title":"ContentFilterIncludeItems"},"ContentFilterExcludeItems":{"type":"string","enum":["ImageNode","ListItemNode","ListNode","SectionNode","TableNode","TableRowNode","TextNode"],"title":"ContentFilterExcludeItems"},"ContentFilter":{"type":"object","properties":{"include":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ContentFilterIncludeItems"},"description":"List of node types to include in the content response. If not specified, all node types will be included. Example node types include TextNode, ImageNode, TableNode, etc."},"exclude":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ContentFilterExcludeItems"},"description":"List of node types to exclude from the content response. If not specified, no node types will be excluded. Example node types include TextNode, ImageNode, TableNode, etc."},"node_ids":{"type":["array","null"],"items":{"type":"string"},"description":"List of specific node IDs to retrieve from the document tree. When specified, only these nodes (and optionally their children) will be returned. Useful for retrieving specific sections or parts of a document. Example: ['382b0aab-3c63-44a1-ae2e-1ee234009d6e', '6d2a3086-10bc-4d76-885b-2208c211b648']"},"include_children":{"type":"boolean","default":true,"description":"When node_ids is specified, determines whether to include the full subtree below each selected node. If True (default), returns complete subtrees. If False, returns only the specified nodes without their descendants."},"include_ancestors":{"type":"boolean","default":false,"description":"When node_ids is specified, determines whether to include ancestor nodes in the path from each selected node to the document root. If True, provides structural context. If False (default), returns only selected subtrees."}},"description":"Filter the content by node types to include in the response.","title":"ContentFilter"},"ContentBody":{"type":"object","properties":{"context_filter":{"$ref":"#/components/schemas/ContextFilter","description":"Filter to select documents to retrieve. Supports filtering by collection, artifacts, and metadata."},"format":{"$ref":"#/components/schemas/ContentFormat","description":"Format for returned content. 'object' returns structured data, 'markdown' returns content formatted as markdown text."},"filter":{"oneOf":[{"$ref":"#/components/schemas/ContentFilter"},{"type":"null"}],"description":"Content filtering options to include or exclude specific node types. Use this to control the types of content returned in the response."},"max_tokens":{"type":["integer","null"],"minimum":1,"description":"Maximum number of tokens to return in the content. If not set, returns full content of the documents."}},"required":["context_filter"],"description":"Request body for retrieving full document content with filtering options.","title":"ContentBody"},"ContentDocumentResponseContent":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentTree"}],"description":"Full text content of the document","title":"ContentDocumentResponseContent"},"ContentDocumentResponse":{"type":"object","properties":{"artifact_id":{"type":"string","description":"Identifier of the document"},"content":{"$ref":"#/components/schemas/ContentDocumentResponseContent","description":"Full text content of the document"}},"required":["artifact_id","content"],"description":"Individual document response with full content.","title":"ContentDocumentResponse"},"ContentResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContentDocumentResponse"},"description":"List of documents with their full content"}},"required":["data"],"description":"Response containing full document content for filtered documents.","title":"ContentResponse"},"ChunkedContentDocumentResponseContentItems":{"oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageBlock"},{"$ref":"#/components/schemas/AudioBlock"},{"$ref":"#/components/schemas/BinaryBlock"},{"$ref":"#/components/schemas/LocalResourceBlock"},{"$ref":"#/components/schemas/ResourceLinkBlock"},{"$ref":"#/components/schemas/ResourceBlock"},{"$ref":"#/components/schemas/SourceBlock"},{"$ref":"#/components/schemas/ThinkingBlock"},{"$ref":"#/components/schemas/RedactedThinkingBlock"},{"$ref":"#/components/schemas/ToolUseBlock"},{"$ref":"#/components/schemas/ServerToolUseBlock"},{"$ref":"#/components/schemas/ContainerUploadBlock"},{"$ref":"#/components/schemas/DocumentBlock"},{"$ref":"#/components/schemas/SearchResultBlock"},{"$ref":"#/components/schemas/MidConvSystemBlock"},{"$ref":"#/components/schemas/TLDRBlock"}],"title":"ChunkedContentDocumentResponseContentItems"},"ChunkedContentDocumentResponse":{"type":"object","properties":{"artifact_id":{"type":"string","description":"Identifier of the document"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ChunkedContentDocumentResponseContentItems"},"description":"Chunked content of the document, split into manageable pieces"}},"required":["artifact_id","content"],"description":"Response model for chunked document content.","title":"ChunkedContentDocumentResponse"},"ChunkedContentResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChunkedContentDocumentResponse"},"description":"List of documents with their content split into chunks for chat usage"}},"required":["data"],"description":"Response containing chunked document content for chat usage.","title":"ChunkedContentResponse"},"SemanticSearch":{"type":"object","properties":{"type":{"type":"string","enum":["semantic_search"],"default":"semantic_search","description":"Type of search operation, always 'semantic_search' for semantic searches"},"text":{"type":"string","description":"The text query to find relevant chunks"},"context_filter":{"$ref":"#/components/schemas/ContextFilter","description":"Filter to select specific context from ingested documents. Can filter by collection, artifacts, and metadata."},"limit":{"type":"integer","minimum":1,"default":10,"description":"Maximum number of chunks to return"},"score_threshold":{"type":"number","format":"double","minimum":0,"maximum":1,"default":0,"description":"Minimum similarity score threshold for returned chunks"},"expand":{"type":"boolean","default":false,"description":"Whether to include adjacent chunks for more context"}},"required":["text","context_filter"],"description":"Represents a semantic search operation.","title":"SemanticSearch"},"KeywordSearch":{"type":"object","properties":{"type":{"type":"string","enum":["keywords_search"],"default":"keywords_search","description":"Type of search operation, always 'keywords_search' for keyword searches"},"keywords":{"type":"array","items":{"type":"string"},"description":"List of keywords to find relevant chunks"},"context_filter":{"$ref":"#/components/schemas/ContextFilter","description":"Filter to select specific context from ingested documents. Can filter by collection, artifacts, and metadata."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Maximum number of chunks to return"}},"required":["keywords","context_filter"],"description":"Represents a keyword-based search operation.","title":"KeywordSearch"},"HybridSearch":{"type":"object","properties":{"type":{"type":"string","enum":["hybrid_search"],"default":"hybrid_search","description":"Type of search operation, always 'hybrid_search' for combined searches"},"text":{"type":"string","description":"The text query to find relevant chunks"},"keywords":{"type":"array","items":{"type":"string"},"description":"List of keywords to find relevant chunks"},"context_filter":{"$ref":"#/components/schemas/ContextFilter","description":"Filter to select specific context from ingested documents. Can filter by collection, artifacts, and metadata."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":10,"description":"Maximum number of chunks to return"},"expand":{"type":"boolean","default":false,"description":"Whether to include adjacent chunks for more context"}},"required":["text","keywords","context_filter"],"description":"Represents a hybrid search operation combining semantic and keyword search.","title":"HybridSearch"},"Primitives_search_v1_primitives_search_post_Request":{"oneOf":[{"$ref":"#/components/schemas/SemanticSearch"},{"$ref":"#/components/schemas/KeywordSearch"},{"$ref":"#/components/schemas/HybridSearch"}],"description":"Request body for searching document chunks using different strategies.\n\nSupports three search types:\n- **semantic_search**: Find chunks based on semantic similarity to the text query\n- **keywords_search**: Find chunks containing specific keywords (coming soon)\n- **hybrid_search**: Combine semantic and keyword matching (coming soon)\n\nThe request body defines search criteria, context filtering options, result limits, and expansion settings for retrieving relevant document chunks.","title":"Primitives_search_v1_primitives_search_post_Request"},"SemanticSearchBodyFormat":{"type":"string","enum":["default","citations"],"default":"default","description":"Format of the result content.\n'default' returns standard content blocks.\n'citations' returns blocks annotated for citation formatting.","title":"SemanticSearchBodyFormat"},"SemanticSearchBody":{"type":"object","properties":{"query":{"type":"string","description":"The natural language query to search for relevant content."},"context_filter":{"$ref":"#/components/schemas/ContextFilter","description":"Filters to narrow the search context (collections, artifacts, metadata)."},"format":{"$ref":"#/components/schemas/SemanticSearchBodyFormat","default":"default","description":"Format of the result content.\n'default' returns standard content blocks.\n'citations' returns blocks annotated for citation formatting."}},"required":["query","context_filter"],"description":"Request body for semantic search.","title":"SemanticSearchBody"},"ToolResponseContentItems":{"oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageBlock"},{"$ref":"#/components/schemas/AudioBlock"},{"$ref":"#/components/schemas/BinaryBlock"},{"$ref":"#/components/schemas/LocalResourceBlock"},{"$ref":"#/components/schemas/ResourceLinkBlock"},{"$ref":"#/components/schemas/ResourceBlock"},{"$ref":"#/components/schemas/SourceBlock"},{"$ref":"#/components/schemas/ThinkingBlock"},{"$ref":"#/components/schemas/RedactedThinkingBlock"},{"$ref":"#/components/schemas/ToolUseBlock"},{"$ref":"#/components/schemas/ServerToolUseBlock"},{"$ref":"#/components/schemas/ContainerUploadBlock"},{"$ref":"#/components/schemas/DocumentBlock"},{"$ref":"#/components/schemas/SearchResultBlock"},{"$ref":"#/components/schemas/MidConvSystemBlock"},{"$ref":"#/components/schemas/TLDRBlock"}],"title":"ToolResponseContentItems"},"ToolResponse":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/ToolResponseContentItems"},"description":"List of content blocks generated by the tool. Blocks can include plain text, citations, source attributions, or images."},"is_error":{"type":"boolean","default":false,"description":"True if the tool encountered an error during execution."}},"required":["content"],"description":"Response returned from tool-based operations.","title":"ToolResponse"},"TabularDataAnalysisBody":{"type":"object","properties":{"query":{"type":"string","description":"The analysis question or prompt related to tabular data."},"context_filter":{"$ref":"#/components/schemas/ContextFilter","description":"Filters to select specific context from ingested documents."}},"required":["query","context_filter"],"description":"Request body for tabular data analysis using the tool.","title":"TabularDataAnalysisBody"},"DatabaseQueryBodyArtifactsItems":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["file"],"description":"Discriminator value: file"},"value":{"type":"string","description":"Base64 encoded file content"}},"required":["type","value"],"description":"Input for base64 encoded files."},{"type":"object","properties":{"type":{"type":"string","enum":["ingested_artifact"],"description":"Discriminator value: ingested_artifact"},"context_filter":{"$ref":"#/components/schemas/ContextFilter","description":"Already processed ContextFilter"}},"required":["type","context_filter"],"description":"Input for already ingested content."},{"type":"object","properties":{"type":{"type":"string","enum":["skill"],"description":"Discriminator value: skill"},"skill_filter":{"$ref":"#/components/schemas/SkillFilter","description":"Skill filter declaring the collection and optional skill_or_version_ids whitelist."}},"required":["type","skill_filter"],"description":"Input for skill activation using SkillFilter."},{"type":"object","properties":{"type":{"type":"string","enum":["sql_database"],"description":"Discriminator value: sql_database"},"connection_string":{"type":"string","description":"SQL database connection string"},"schemas":{"type":["array","null"],"items":{"type":"string"},"description":"List of specific schemas to include, if None includes all non-system schemas"},"ssl":{"type":"boolean","default":false,"description":"Whether to use SSL for the database connection"},"enable_tables":{"type":"boolean","default":true,"description":"Whether to include tables in the inspection"},"enable_views":{"type":"boolean","default":true,"description":"Whether to include views in the inspection"},"enable_functions":{"type":"boolean","default":true,"description":"Whether to include functions in the inspection"},"enable_procedures":{"type":"boolean","default":true,"description":"Whether to include stored procedures in the inspection"},"description":{"type":"string","default":"","description":"Optional description of the database"}},"required":["type","connection_string"],"description":"Input for SQL database content."},{"type":"object","properties":{"type":{"type":"string","enum":["text"],"description":"Discriminator value: text"},"value":{"type":"string","description":"Plain text content"}},"required":["type","value"],"description":"Input for plain text content."},{"type":"object","properties":{"type":{"type":"string","enum":["uri"],"default":"uri","description":"Input type discriminator"},"value":{"type":"string","description":"URI to download from"}},"required":["type","value"],"description":"Input for remote URIs."}],"discriminator":{"propertyName":"type"},"title":"DatabaseQueryBodyArtifactsItems"},"DatabaseQueryBody":{"type":"object","properties":{"query":{"type":"string","description":"The natural language query to run against connected databases."},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/DatabaseQueryBodyArtifactsItems"},"description":"List of SQL database artifacts to query against. At least one artifact of type 'sql_database' is required."}},"required":["query","artifacts"],"description":"Request body for database query using the tool.","title":"DatabaseQueryBody"},"WebFetchBody":{"type":"object","properties":{"url":{"type":"string","description":"The URL of the web page to fetch and extract content from."}},"required":["url"],"description":"Request body for web content fetching using the tool.","title":"WebFetchBody"},"WebSearchQueryBody":{"type":"object","properties":{"query":{"type":"string","description":"The natural language query to search the web."}},"required":["query"],"description":"Request body for web search using the tool.","title":"WebSearchQueryBody"},"SkillResponseSource":{"type":"string","enum":["custom","anthropic","zylon"],"description":"Source of the skill.","title":"SkillResponseSource"},"SkillResponseLoading":{"type":"string","enum":["eager","lazy"],"description":"Instruction loading strategy.","title":"SkillResponseLoading"},"SkillResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique skill identifier."},"created_at":{"type":"string","format":"date-time","description":"Creation timestamp."},"display_title":{"type":"string","description":"Human display title."},"latest_version":{"type":["string","null"],"description":"Latest version token for this skill."},"source":{"$ref":"#/components/schemas/SkillResponseSource","description":"Source of the skill."},"type":{"type":"string","enum":["skill"],"default":"skill","description":"Object type."},"updated_at":{"type":"string","format":"date-time","description":"Update timestamp."},"collection":{"type":"string","description":"Tenant identifier (org_id boundary)."},"loading":{"$ref":"#/components/schemas/SkillResponseLoading","description":"Instruction loading strategy."},"readonly":{"type":"boolean","description":"Readonly flag."}},"required":["id","created_at","display_title","source","updated_at","collection","loading","readonly"],"description":"Serialized skill object returned by skills endpoints.","title":"SkillResponse"},"ListSkillsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SkillResponse"},"description":"Skills page data."},"has_more":{"type":"boolean","description":"Whether there is a next page."},"next_page":{"type":["string","null"],"description":"Token for next page."}},"required":["has_more"],"description":"Paginated list response containing skill objects.","title":"ListSkillsResponse"},"BodyCreateSkillV1SkillsPostSource":{"type":"string","enum":["custom","anthropic","zylon"],"default":"custom","description":"source field.","title":"BodyCreateSkillV1SkillsPostSource"},"BodyCreateSkillV1SkillsPostLoading":{"type":"string","enum":["eager","lazy"],"default":"lazy","description":"loading field.","title":"BodyCreateSkillV1SkillsPostLoading"},"Body_create_skill_v1_skills_post":{"type":"object","properties":{"display_title":{"type":"string","minLength":1,"maxLength":255,"description":"display title field."},"collection":{"type":"string","minLength":1,"maxLength":255,"description":"collection field."},"source":{"$ref":"#/components/schemas/BodyCreateSkillV1SkillsPostSource","default":"custom","description":"source field."},"loading":{"$ref":"#/components/schemas/BodyCreateSkillV1SkillsPostLoading","default":"lazy","description":"loading field."},"readonly":{"type":"boolean","default":false,"description":"readonly field."}},"required":["display_title","collection"],"description":"Body_create_skill_v1_skills_post schema.","title":"Body_create_skill_v1_skills_post"},"BodyValidateSkillV1SkillsValidatePostLoading":{"type":"string","enum":["eager","lazy"],"default":"lazy","description":"loading field.","title":"BodyValidateSkillV1SkillsValidatePostLoading"},"Body_validate_skill_v1_skills_validate_post":{"type":"object","properties":{"display_title":{"type":"string","minLength":1,"maxLength":255,"description":"display title field."},"collection":{"type":"string","minLength":1,"maxLength":255,"description":"collection field."},"loading":{"$ref":"#/components/schemas/BodyValidateSkillV1SkillsValidatePostLoading","default":"lazy","description":"loading field."}},"required":["display_title","collection"],"description":"Body_validate_skill_v1_skills_validate_post schema.","title":"Body_validate_skill_v1_skills_validate_post"},"SkillValidationError":{"type":"object","properties":{"code":{"type":"string","description":"Uppercase error code identifying the failure kind."},"message":{"type":"string","description":"Human-readable description of the error."},"params":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Optional i18n interpolation parameters (e.g. {'size': '10'})."}},"required":["code","message"],"description":"A single structured validation error with stable code and message.","title":"SkillValidationError"},"SkillValidationResponse":{"type":"object","properties":{"valid":{"type":"boolean","description":"Whether the skill payload would be accepted."},"name":{"type":["string","null"],"description":"Parsed skill name from SKILL.md frontmatter (when valid)."},"description":{"type":["string","null"],"description":"Parsed skill description from SKILL.md frontmatter (when valid)."},"errors":{"type":"array","items":{"$ref":"#/components/schemas/SkillValidationError"},"description":"Validation errors (when invalid)."}},"required":["valid"],"description":"Result of a dry-run skill validation.","title":"SkillValidationResponse"},"SkillDeletedResponse":{"type":"object","properties":{"id":{"type":"string","description":"Deleted skill identifier."},"type":{"type":"string","enum":["skill_deleted"],"default":"skill_deleted","description":"Deleted object type."}},"required":["id"],"description":"Deletion marker returned after a skill is removed.","title":"SkillDeletedResponse"},"SkillVersionResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique skill version identifier."},"created_at":{"type":"string","format":"date-time","description":"Creation timestamp."},"description":{"type":"string","description":"Skill version description from frontmatter."},"directory":{"type":"string","description":"Top-level directory name for this version."},"name":{"type":"string","description":"Skill name from frontmatter."},"skill_id":{"type":"string","description":"Parent skill identifier."},"type":{"type":"string","enum":["skill_version"],"default":"skill_version","description":"Object type."},"version":{"type":"string","description":"Version token."}},"required":["id","created_at","description","directory","name","skill_id","version"],"description":"Serialized skill version object returned by version endpoints.","title":"SkillVersionResponse"},"ListSkillVersionsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SkillVersionResponse"},"description":"Skill version page data."},"has_more":{"type":"boolean","description":"Whether there is a next page."},"next_page":{"type":["string","null"],"description":"Token for next page."}},"required":["has_more"],"description":"Paginated list response containing skill version objects.","title":"ListSkillVersionsResponse"},"Body_create_skill_version_v1_skills__skill_id__versions_post":{"type":"object","properties":{"collection":{"type":"string","minLength":1,"maxLength":255,"description":"collection field."}},"required":["collection"],"description":"Body_create_skill_version_v1_skills__skill_id__versions_post schema.","title":"Body_create_skill_version_v1_skills__skill_id__versions_post"},"SkillVersionDeletedResponse":{"type":"object","properties":{"id":{"type":"string","description":"Deleted version token."},"type":{"type":"string","enum":["skill_version_deleted"],"default":"skill_version_deleted","description":"Deleted object type."}},"required":["id"],"description":"Deletion marker returned after a skill version is removed.","title":"SkillVersionDeletedResponse"},"NamespaceInfoDefaultMode":{"type":"string","enum":["rw","ro"],"description":"Default access mode: 'rw' (read-write) or 'ro' (read-only).","title":"NamespaceInfoDefaultMode"},"NamespaceInfo":{"type":"object","properties":{"name":{"type":"string","description":"Logical namespace name (e.g. 'session', 'skills', or a custom name)."},"root":{"type":"string","description":"Absolute local path that backs this namespace."},"default_mode":{"$ref":"#/components/schemas/NamespaceInfoDefaultMode","description":"Default access mode: 'rw' (read-write) or 'ro' (read-only)."}},"required":["name","root","default_mode"],"description":"Description of a single filesystem namespace.","title":"NamespaceInfo"},"NamespaceListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NamespaceInfo"},"description":"Registered namespaces, sorted alphabetically by name."}},"description":"List of registered filesystem namespaces.","title":"NamespaceListResponse"},"FileScope":{"type":"object","properties":{"id":{"type":"string","description":"Session / container identifier that owns this file."},"type":{"type":"string","default":"session","description":"Namespace the file belongs to (e.g. 'session', 'skills', or a custom namespace)."}},"required":["id"],"description":"Scope that a file belongs to (always a session).","title":"FileScope"},"FileMetadata":{"type":"object","properties":{"id":{"type":"string","description":"Relative path of the file within the session, e.g. 'uploads/data.csv' or 'outputs/result.png'. Use this value as `file_id` in subsequent requests."},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 timestamp when the file was created or last modified."},"filename":{"type":"string","description":"Filename derived from the path."},"mime_type":{"type":"string","description":"MIME type detected from the file content."},"size_bytes":{"type":"integer","description":"File size in bytes."},"type":{"type":"string","enum":["file"],"default":"file","description":"Object type discriminator, always 'file'."},"downloadable":{"type":"boolean","description":"True for sandbox output files; False for uploaded input files."},"etag":{"type":["string","null"],"description":"Content checksum (MD5 hex or S3 ETag). Present after stat; None if unavailable."},"namespace":{"type":"string","default":"session","description":"Namespace this file belongs to (e.g. 'session', 'skills', or a custom namespace)."},"scope":{"$ref":"#/components/schemas/FileScope","description":"Session scope this file belongs to."}},"required":["id","created_at","filename","mime_type","size_bytes","downloadable","scope"],"description":"Metadata for a file stored in a session (upload or sandbox output).","title":"FileMetadata"},"FileListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FileMetadata"},"description":"List of file metadata objects for the current page."},"first_id":{"type":["string","null"],"description":"ID of the first file in the current page, used for cursor-based pagination."},"last_id":{"type":["string","null"],"description":"ID of the last file in the current page, used for cursor-based pagination."},"has_more":{"type":"boolean","default":false,"description":"True when there are additional pages of results beyond this one."}},"description":"Paginated list of files in a session.","title":"FileListResponse"},"DeletedPrefix":{"type":"object","properties":{"prefix":{"type":"string","description":"The key prefix that was deleted."},"deleted_count":{"type":"integer","description":"Number of files actually removed."},"type":{"type":"string","enum":["prefix_deleted"],"default":"prefix_deleted","description":"Object type discriminator, always 'prefix_deleted'."}},"required":["prefix","deleted_count"],"description":"Confirmation that all files matching a prefix were deleted.","title":"DeletedPrefix"},"DeletedFile":{"type":"object","properties":{"id":{"type":"string","description":"Relative path of the file that was deleted."},"type":{"type":"string","enum":["file_deleted"],"default":"file_deleted","description":"Object type discriminator, always 'file_deleted'."}},"required":["id"],"description":"Confirmation that a file was deleted.","title":"DeletedFile"}}}}