openapi: 3.1.0 info: title: >- Llama Stack Specification - Stable & Experimental APIs version: v1 description: >- This is the specification of the Llama Stack that provides a set of endpoints and their corresponding interfaces that are tailored to best leverage Llama Models. **🔗 COMBINED**: This specification includes both stable production-ready APIs and experimental pre-release APIs. Use stable APIs for production deployments and experimental APIs for testing new features. servers: - url: http://any-hosted-llama-stack.com paths: /v1/batches: get: responses: '200': description: A list of batch objects. content: application/json: schema: $ref: '#/components/schemas/ListBatchesResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Batches summary: List all batches for the current user. description: List all batches for the current user. parameters: - name: after in: query description: >- A cursor for pagination; returns batches after this batch ID. required: false schema: type: string - name: limit in: query description: >- Number of batches to return (default 20, max 100). required: true schema: type: integer deprecated: false post: responses: '200': description: The created batch object. content: application/json: schema: $ref: '#/components/schemas/Batch' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Batches summary: >- Create a new batch for processing multiple API requests. description: >- Create a new batch for processing multiple API requests. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBatchRequest' required: true deprecated: false /v1/batches/{batch_id}: get: responses: '200': description: The batch object. content: application/json: schema: $ref: '#/components/schemas/Batch' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Batches summary: >- Retrieve information about a specific batch. description: >- Retrieve information about a specific batch. parameters: - name: batch_id in: path description: The ID of the batch to retrieve. required: true schema: type: string deprecated: false /v1/batches/{batch_id}/cancel: post: responses: '200': description: The updated batch object. content: application/json: schema: $ref: '#/components/schemas/Batch' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Batches summary: Cancel a batch that is in progress. description: Cancel a batch that is in progress. parameters: - name: batch_id in: path description: The ID of the batch to cancel. required: true schema: type: string deprecated: false /v1/chat/completions: get: responses: '200': description: A ListOpenAIChatCompletionResponse. content: application/json: schema: $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Inference summary: List chat completions. description: >- List chat completions. :param after: The ID of the last chat completion to return. :param limit: The maximum number of chat completions to return. :param model: The model to filter by. :param order: The order to sort the chat completions by: "asc" or "desc". Defaults to "desc". :returns: A ListOpenAIChatCompletionResponse. parameters: - name: after description: >- The ID of the last chat completion to return. required: false schema: type: string in: query - name: limit description: >- The maximum number of chat completions to return. required: false schema: type: integer in: query - name: model description: The model to filter by. required: false schema: type: string in: query - name: order description: >- The order to sort the chat completions by: "asc" or "desc". Defaults to "desc". required: false schema: $ref: '#/components/schemas/Order' in: query deprecated: false post: responses: '200': description: An OpenAIChatCompletion. content: application/json: schema: $ref: '#/components/schemas/llama_stack.apis.inference.inference.OpenAIChatCompletion | collections.abc.AsyncIterator[llama_stack.apis.inference.inference.OpenAIChatCompletionChunk]' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Inference summary: Create chat completions. description: >- Create chat completions. Generate an OpenAI-compatible chat completion for the given messages using the specified model. :returns: An OpenAIChatCompletion. parameters: [] requestBody: content: application/json: schema: id: Annotated required: true deprecated: false /v1/chat/completions/{completion_id}: get: responses: '200': description: A OpenAICompletionWithInputMessages. content: application/json: schema: $ref: '#/components/schemas/OpenAICompletionWithInputMessages' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Inference summary: Get chat completion. description: >- Get chat completion. Describe a chat completion by its ID. :param completion_id: ID of the chat completion. :returns: A OpenAICompletionWithInputMessages. parameters: - name: completion_id description: ID of the chat completion. required: true schema: type: string in: path deprecated: false /v1/completions: post: responses: '200': description: An OpenAICompletion. content: application/json: schema: $ref: '#/components/schemas/OpenAICompletion' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Inference summary: Create completion. description: >- Create completion. Generate an OpenAI-compatible completion for the given prompt using the specified model. :returns: An OpenAICompletion. parameters: [] requestBody: content: application/json: schema: id: Annotated required: true deprecated: false /v1/conversations: post: responses: '200': description: The created conversation object. content: application/json: schema: $ref: '#/components/schemas/Conversation' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Conversations summary: Create a conversation. description: >- Create a conversation. Create a conversation. :param items: Initial items to include in the conversation context. :param metadata: Set of key-value pairs that can be attached to an object. :returns: The created conversation object. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateConversationRequest' required: true deprecated: false /v1/conversations/{conversation_id}: get: responses: '200': description: The conversation object. content: application/json: schema: $ref: '#/components/schemas/Conversation' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Conversations summary: Retrieve a conversation. description: >- Retrieve a conversation. Get a conversation with the given ID. :param conversation_id: The conversation identifier. :returns: The conversation object. parameters: - name: conversation_id description: The conversation identifier. required: true schema: type: string in: path deprecated: false post: responses: '200': description: The updated conversation object. content: application/json: schema: $ref: '#/components/schemas/Conversation' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Conversations summary: Update a conversation. description: >- Update a conversation. Update a conversation's metadata with the given ID. :param conversation_id: The conversation identifier. :param metadata: Set of key-value pairs that can be attached to an object. :returns: The updated conversation object. parameters: - name: conversation_id description: The conversation identifier. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateConversationRequest' required: true deprecated: false delete: responses: '200': description: The deleted conversation resource. content: application/json: schema: $ref: '#/components/schemas/ConversationDeletedResource' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Conversations summary: Delete a conversation. description: >- Delete a conversation. Delete a conversation with the given ID. :param conversation_id: The conversation identifier. :returns: The deleted conversation resource. parameters: - name: conversation_id description: The conversation identifier. required: true schema: type: string in: path deprecated: false /v1/conversations/{conversation_id}/items: get: responses: '200': description: List of conversation items. content: application/json: schema: $ref: '#/components/schemas/ConversationItemList' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Conversations summary: List items. description: >- List items. List items in the conversation. :param conversation_id: The conversation identifier. :param after: An item ID to list items after, used in pagination. :param include: Specify additional output data to include in the response. :param limit: A limit on the number of objects to be returned (1-100, default 20). :param order: The order to return items in (asc or desc, default desc). :returns: List of conversation items. parameters: - name: conversation_id description: The conversation identifier. required: true schema: type: string in: path - name: after description: >- An item ID to list items after, used in pagination. required: false schema: type: string in: query - name: include description: >- Specify additional output data to include in the response. required: false schema: $ref: '#/components/schemas/list' in: query - name: limit description: >- A limit on the number of objects to be returned (1-100, default 20). required: false schema: type: integer in: query - name: order description: >- The order to return items in (asc or desc, default desc). required: false schema: $ref: '#/components/schemas/Literal' in: query deprecated: false post: responses: '200': description: List of created items. content: application/json: schema: $ref: '#/components/schemas/ConversationItemList' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Conversations summary: Create items. description: >- Create items. Create items in the conversation. :param conversation_id: The conversation identifier. :param items: Items to include in the conversation context. :returns: List of created items. parameters: - name: conversation_id description: The conversation identifier. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/AddItemsRequest' required: true deprecated: false /v1/conversations/{conversation_id}/items/{item_id}: get: responses: '200': description: The conversation item. content: application/json: schema: id: Annotated '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Conversations summary: Retrieve an item. description: >- Retrieve an item. Retrieve a conversation item. :param conversation_id: The conversation identifier. :param item_id: The item identifier. :returns: The conversation item. parameters: - name: conversation_id description: The conversation identifier. required: true schema: type: string in: path - name: item_id description: The item identifier. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: The deleted item resource. content: application/json: schema: $ref: '#/components/schemas/ConversationItemDeletedResource' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Conversations summary: Delete an item. description: >- Delete an item. Delete a conversation item. :param conversation_id: The conversation identifier. :param item_id: The item identifier. :returns: The deleted item resource. parameters: - name: conversation_id description: The conversation identifier. required: true schema: type: string in: path - name: item_id description: The item identifier. required: true schema: type: string in: path deprecated: false /v1/embeddings: post: responses: '200': description: >- An OpenAIEmbeddingsResponse containing the embeddings. content: application/json: schema: $ref: '#/components/schemas/OpenAIEmbeddingsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Inference summary: Create embeddings. description: >- Create embeddings. Generate OpenAI-compatible embeddings for the given input using the specified model. :returns: An OpenAIEmbeddingsResponse containing the embeddings. parameters: [] requestBody: content: application/json: schema: id: Annotated required: true deprecated: false /v1/files: get: responses: '200': description: >- An ListOpenAIFileResponse containing the list of files. content: application/json: schema: $ref: '#/components/schemas/ListOpenAIFileResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Files summary: List files. description: >- List files. Returns a list of files that belong to the user's organization. :param after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. :param limit: A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000. :param order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. :param purpose: Only return files with the given purpose. :returns: An ListOpenAIFileResponse containing the list of files. parameters: - name: after description: >- A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. required: false schema: type: string in: query - name: limit description: >- A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000. required: false schema: type: integer in: query - name: order description: >- Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. required: false schema: $ref: '#/components/schemas/Order' in: query - name: purpose description: >- Only return files with the given purpose. required: false schema: $ref: '#/components/schemas/OpenAIFilePurpose' in: query deprecated: false post: responses: '200': description: >- An OpenAIFileObject representing the uploaded file. content: application/json: schema: $ref: '#/components/schemas/OpenAIFileObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Files summary: Upload file. description: >- Upload file. Upload a file that can be used across various endpoints. The file upload should be a multipart form request with: - file: The File object (not file name) to be uploaded. - purpose: The intended purpose of the uploaded file. - expires_after: Optional form values describing expiration for the file. :param file: The uploaded file object containing content and metadata (filename, content_type, etc.). :param purpose: The intended purpose of the uploaded file (e.g., "assistants", "fine-tune"). :param expires_after: Optional form values describing expiration for the file. :returns: An OpenAIFileObject representing the uploaded file. parameters: [] requestBody: content: multipart/form-data: schema: type: object properties: file: type: string format: binary purpose: $ref: '#/components/schemas/OpenAIFilePurpose' expires_after: $ref: '#/components/schemas/ExpiresAfter' required: - file - purpose required: true deprecated: false /v1/files/{file_id}: get: responses: '200': description: >- An OpenAIFileObject containing file information. content: application/json: schema: $ref: '#/components/schemas/OpenAIFileObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Files summary: Retrieve file. description: >- Retrieve file. Returns information about a specific file. :param file_id: The ID of the file to use for this request. :returns: An OpenAIFileObject containing file information. parameters: - name: file_id description: >- The ID of the file to use for this request. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: >- An OpenAIFileDeleteResponse indicating successful deletion. content: application/json: schema: $ref: '#/components/schemas/OpenAIFileDeleteResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Files summary: Delete file. description: >- Delete file. :param file_id: The ID of the file to use for this request. :returns: An OpenAIFileDeleteResponse indicating successful deletion. parameters: - name: file_id description: >- The ID of the file to use for this request. required: true schema: type: string in: path deprecated: false /v1/files/{file_id}/content: get: responses: '200': description: >- The raw file content as a binary response. content: application/json: schema: $ref: '#/components/schemas/Response' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Files summary: Retrieve file content. description: >- Retrieve file content. Returns the contents of the specified file. :param file_id: The ID of the file to use for this request. :returns: The raw file content as a binary response. parameters: - name: file_id description: >- The ID of the file to use for this request. required: true schema: type: string in: path deprecated: false /v1/health: get: responses: '200': description: >- Health information indicating if the service is operational. content: application/json: schema: $ref: '#/components/schemas/HealthInfo' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Inspect summary: Get health status. description: >- Get health status. Get the current health status of the service. :returns: Health information indicating if the service is operational. parameters: [] deprecated: false /v1/inspect/routes: get: responses: '200': description: >- Response containing information about all available routes. content: application/json: schema: $ref: '#/components/schemas/ListRoutesResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Inspect summary: List routes. description: >- List routes. List all available API routes with their methods and implementing providers. parameters: - name: api_filter in: query description: >- Optional filter to control which routes are returned. Can be an API level ('v1', 'v1alpha', 'v1beta') to show non-deprecated routes at that level, or 'deprecated' to show deprecated routes across all levels. If not specified, returns only non-deprecated v1 routes. required: false schema: type: string enum: - v1 - v1alpha - v1beta - deprecated deprecated: false /v1/models: get: responses: '200': description: A OpenAIListModelsResponse. content: application/json: schema: $ref: '#/components/schemas/OpenAIListModelsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Models summary: List models using the OpenAI API. description: List models using the OpenAI API. parameters: [] deprecated: false post: responses: '200': description: A Model. content: application/json: schema: $ref: '#/components/schemas/Model' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Models summary: Register model. description: >- Register model. Register a model. :param model_id: The identifier of the model to register. :param provider_model_id: The identifier of the model in the provider. :param provider_id: The identifier of the provider. :param metadata: Any additional metadata for this model. :param model_type: The type of model to register. :returns: A Model. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/RegisterModelRequest' required: true deprecated: false /v1/models/{model_id}: get: responses: '200': description: A Model. content: application/json: schema: $ref: '#/components/schemas/Model' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Models summary: Get model. description: >- Get model. Get a model by its identifier. :param model_id: The identifier of the model to get. :returns: A Model. parameters: - name: model_id description: The identifier of the model to get. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Models summary: Unregister model. description: >- Unregister model. Unregister a model. :param model_id: The identifier of the model to unregister. parameters: - name: model_id description: >- The identifier of the model to unregister. required: true schema: type: string in: path deprecated: false /v1/moderations: post: responses: '200': description: A moderation object. content: application/json: schema: $ref: '#/components/schemas/ModerationObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Safety summary: Create moderation. description: >- Create moderation. Classifies if text and/or image inputs are potentially harmful. :param input: Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models. :param model: (Optional) The content moderation model you would like to use. :returns: A moderation object. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/RunModerationRequest' required: true deprecated: false /v1/prompts: get: responses: '200': description: >- A ListPromptsResponse containing all prompts. content: application/json: schema: $ref: '#/components/schemas/ListPromptsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Prompts summary: List all prompts. description: >- List all prompts. :returns: A ListPromptsResponse containing all prompts. parameters: [] deprecated: false post: responses: '200': description: The created Prompt resource. content: application/json: schema: $ref: '#/components/schemas/Prompt' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Prompts summary: Create prompt. description: >- Create prompt. Create a new prompt. :param prompt: The prompt text content with variable placeholders. :param variables: List of variable names that can be used in the prompt template. :returns: The created Prompt resource. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CreatePromptRequest' required: true deprecated: false /v1/prompts/{prompt_id}: get: responses: '200': description: A Prompt resource. content: application/json: schema: $ref: '#/components/schemas/Prompt' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Prompts summary: Get prompt. description: >- Get prompt. Get a prompt by its identifier and optional version. :param prompt_id: The identifier of the prompt to get. :param version: The version of the prompt to get (defaults to latest). :returns: A Prompt resource. parameters: - name: prompt_id description: The identifier of the prompt to get. required: true schema: type: string in: path - name: version description: >- The version of the prompt to get (defaults to latest). required: false schema: type: integer in: query deprecated: false post: responses: '200': description: >- The updated Prompt resource with incremented version. content: application/json: schema: $ref: '#/components/schemas/Prompt' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Prompts summary: Update prompt. description: >- Update prompt. Update an existing prompt (increments version). :param prompt_id: The identifier of the prompt to update. :param prompt: The updated prompt text content. :param version: The current version of the prompt being updated. :param variables: Updated list of variable names that can be used in the prompt template. :param set_as_default: Set the new version as the default (default=True). :returns: The updated Prompt resource with incremented version. parameters: - name: prompt_id description: The identifier of the prompt to update. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdatePromptRequest' required: true deprecated: false delete: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Prompts summary: Delete prompt. description: >- Delete prompt. Delete a prompt. :param prompt_id: The identifier of the prompt to delete. parameters: - name: prompt_id description: The identifier of the prompt to delete. required: true schema: type: string in: path deprecated: false /v1/prompts/{prompt_id}/set-default-version: post: responses: '200': description: >- The prompt with the specified version now set as default. content: application/json: schema: $ref: '#/components/schemas/Prompt' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Prompts summary: Set prompt version. description: >- Set prompt version. Set which version of a prompt should be the default in get_prompt (latest). :param prompt_id: The identifier of the prompt. :param version: The version to set as default. :returns: The prompt with the specified version now set as default. parameters: - name: prompt_id description: The identifier of the prompt. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/SetDefaultVersionRequest' required: true deprecated: false /v1/prompts/{prompt_id}/versions: get: responses: '200': description: >- A ListPromptsResponse containing all versions of the prompt. content: application/json: schema: $ref: '#/components/schemas/ListPromptsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Prompts summary: List prompt versions. description: >- List prompt versions. List all versions of a specific prompt. :param prompt_id: The identifier of the prompt to list versions for. :returns: A ListPromptsResponse containing all versions of the prompt. parameters: - name: prompt_id description: >- The identifier of the prompt to list versions for. required: true schema: type: string in: path deprecated: false /v1/providers: get: responses: '200': description: >- A ListProvidersResponse containing information about all providers. content: application/json: schema: $ref: '#/components/schemas/ListProvidersResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Providers summary: List providers. description: >- List providers. List all available providers. :returns: A ListProvidersResponse containing information about all providers. parameters: [] deprecated: false /v1/providers/{provider_id}: get: responses: '200': description: >- A ProviderInfo object containing the provider's details. content: application/json: schema: $ref: '#/components/schemas/ProviderInfo' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Providers summary: Get provider. description: >- Get provider. Get detailed information about a specific provider. :param provider_id: The ID of the provider to inspect. :returns: A ProviderInfo object containing the provider's details. parameters: - name: provider_id description: The ID of the provider to inspect. required: true schema: type: string in: path deprecated: false /v1/responses: get: responses: '200': description: A ListOpenAIResponseObject. content: application/json: schema: $ref: '#/components/schemas/ListOpenAIResponseObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: List all responses. description: >- List all responses. :param after: The ID of the last response to return. :param limit: The number of responses to return. :param model: The model to filter responses by. :param order: The order to sort responses by when sorted by created_at ('asc' or 'desc'). :returns: A ListOpenAIResponseObject. parameters: - name: after description: The ID of the last response to return. required: false schema: type: string in: query - name: limit description: The number of responses to return. required: false schema: type: integer in: query - name: model description: The model to filter responses by. required: false schema: type: string in: query - name: order description: >- The order to sort responses by when sorted by created_at ('asc' or 'desc'). required: false schema: $ref: '#/components/schemas/Order' in: query deprecated: false post: responses: '200': description: An OpenAIResponseObject. content: application/json: schema: $ref: '#/components/schemas/OpenAIResponseObject' text/event-stream: schema: $ref: '#/components/schemas/AsyncIterator' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: Create a model response. description: >- Create a model response. :param input: Input message(s) to create the response. :param model: The underlying LLM used for completions. :param previous_response_id: (Optional) if specified, the new response will be a continuation of the previous response. This can be used to easily fork-off new responses from existing responses. :param conversation: (Optional) The ID of a conversation to add the response to. Must begin with 'conv_'. Input and output messages will be automatically added to the conversation. :param include: (Optional) Additional fields to include in the response. :param guardrails: (Optional) List of guardrails to apply during response generation. Can be guardrail IDs (strings) or guardrail specifications. :returns: An OpenAIResponseObject. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateOpenaiResponseRequest' required: true deprecated: false x-llama-stack-extra-body-params: - name: guardrails schema: id: Annotated description: >- List of guardrails to apply during response generation. Guardrails provide safety and content moderation. required: true /v1/responses/{response_id}: get: responses: '200': description: An OpenAIResponseObject. content: application/json: schema: $ref: '#/components/schemas/OpenAIResponseObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: Get a model response. description: >- Get a model response. :param response_id: The ID of the OpenAI response to retrieve. :returns: An OpenAIResponseObject. parameters: - name: response_id description: >- The ID of the OpenAI response to retrieve. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: An OpenAIDeleteResponseObject content: application/json: schema: $ref: '#/components/schemas/OpenAIDeleteResponseObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: Delete a response. description: >- Delete a response. :param response_id: The ID of the OpenAI response to delete. :returns: An OpenAIDeleteResponseObject parameters: - name: response_id description: The ID of the OpenAI response to delete. required: true schema: type: string in: path deprecated: false /v1/responses/{response_id}/input_items: get: responses: '200': description: An ListOpenAIResponseInputItem. content: application/json: schema: $ref: '#/components/schemas/ListOpenAIResponseInputItem' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: List input items. description: >- List input items. :param response_id: The ID of the response to retrieve input items for. :param after: An item ID to list items after, used for pagination. :param before: An item ID to list items before, used for pagination. :param include: Additional fields to include in the response. :param limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. :param order: The order to return the input items in. Default is desc. :returns: An ListOpenAIResponseInputItem. parameters: - name: response_id description: >- The ID of the response to retrieve input items for. required: true schema: type: string in: path - name: after description: >- An item ID to list items after, used for pagination. required: false schema: type: string in: query - name: before description: >- An item ID to list items before, used for pagination. required: false schema: type: string in: query - name: include description: >- Additional fields to include in the response. required: false schema: $ref: '#/components/schemas/list' in: query - name: limit description: >- A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. required: false schema: type: integer in: query - name: order description: >- The order to return the input items in. Default is desc. required: false schema: $ref: '#/components/schemas/Order' in: query deprecated: false /v1/safety/run-shield: post: responses: '200': description: A RunShieldResponse. content: application/json: schema: $ref: '#/components/schemas/RunShieldResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Safety summary: Run shield. description: >- Run shield. Run a shield. :param shield_id: The identifier of the shield to run. :param messages: The messages to run the shield on. :param params: The parameters of the shield. :returns: A RunShieldResponse. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/RunShieldRequest' required: true deprecated: false /v1/scoring-functions: get: responses: '200': description: A ListScoringFunctionsResponse. content: application/json: schema: $ref: '#/components/schemas/ListScoringFunctionsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ScoringFunctions summary: List all scoring functions. description: >- List all scoring functions. :returns: A ListScoringFunctionsResponse. parameters: [] deprecated: false post: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ScoringFunctions summary: Register a scoring function. description: >- Register a scoring function. :param scoring_fn_id: The ID of the scoring function to register. :param description: The description of the scoring function. :param return_type: The return type of the scoring function. :param provider_scoring_fn_id: The ID of the provider scoring function to use for the scoring function. :param provider_id: The ID of the provider to use for the scoring function. :param params: The parameters for the scoring function for benchmark eval, these can be overridden for app eval. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/RegisterScoringFunctionRequest' required: true deprecated: false /v1/scoring-functions/{scoring_fn_id}: get: responses: '200': description: A ScoringFn. content: application/json: schema: $ref: '#/components/schemas/ScoringFn' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ScoringFunctions summary: Get a scoring function by its ID. description: >- Get a scoring function by its ID. :param scoring_fn_id: The ID of the scoring function to get. :returns: A ScoringFn. parameters: - name: scoring_fn_id description: The ID of the scoring function to get. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ScoringFunctions summary: Unregister a scoring function. description: >- Unregister a scoring function. :param scoring_fn_id: The ID of the scoring function to unregister. parameters: - name: scoring_fn_id description: >- The ID of the scoring function to unregister. required: true schema: type: string in: path deprecated: false /v1/scoring/score: post: responses: '200': description: >- A ScoreResponse object containing rows and aggregated results. content: application/json: schema: $ref: '#/components/schemas/ScoreResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Scoring summary: Score a list of rows. description: >- Score a list of rows. :param input_rows: The rows to score. :param scoring_functions: The scoring functions to use for the scoring. :returns: A ScoreResponse object containing rows and aggregated results. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/ScoreRequest' required: true deprecated: false /v1/scoring/score-batch: post: responses: '200': description: A ScoreBatchResponse. content: application/json: schema: $ref: '#/components/schemas/ScoreBatchResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Scoring summary: Score a batch of rows. description: >- Score a batch of rows. :param dataset_id: The ID of the dataset to score. :param scoring_functions: The scoring functions to use for the scoring. :param save_results_dataset: Whether to save the results to a dataset. :returns: A ScoreBatchResponse. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/ScoreBatchRequest' required: true deprecated: false /v1/shields: get: responses: '200': description: A ListShieldsResponse. content: application/json: schema: $ref: '#/components/schemas/ListShieldsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Shields summary: List all shields. description: >- List all shields. :returns: A ListShieldsResponse. parameters: [] deprecated: false post: responses: '200': description: A Shield. content: application/json: schema: $ref: '#/components/schemas/Shield' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Shields summary: Register a shield. description: >- Register a shield. :param shield_id: The identifier of the shield to register. :param provider_shield_id: The identifier of the shield in the provider. :param provider_id: The identifier of the provider. :param params: The parameters of the shield. :returns: A Shield. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/RegisterShieldRequest' required: true deprecated: false /v1/shields/{identifier}: get: responses: '200': description: A Shield. content: application/json: schema: $ref: '#/components/schemas/Shield' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Shields summary: Get a shield by its identifier. description: >- Get a shield by its identifier. :param identifier: The identifier of the shield to get. :returns: A Shield. parameters: - name: identifier description: The identifier of the shield to get. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Shields summary: Unregister a shield. description: >- Unregister a shield. :param identifier: The identifier of the shield to unregister. parameters: - name: identifier description: >- The identifier of the shield to unregister. required: true schema: type: string in: path deprecated: false /v1/tool-runtime/invoke: post: responses: '200': description: A ToolInvocationResult. content: application/json: schema: $ref: '#/components/schemas/ToolInvocationResult' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ToolRuntime summary: Run a tool with the given arguments. description: >- Run a tool with the given arguments. :param tool_name: The name of the tool to invoke. :param kwargs: A dictionary of arguments to pass to the tool. :returns: A ToolInvocationResult. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/InvokeToolRequest' required: true deprecated: false /v1/tool-runtime/list-tools: get: responses: '200': description: A ListToolDefsResponse. content: application/json: schema: $ref: '#/components/schemas/ListToolDefsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ToolRuntime summary: List all tools in the runtime. description: >- List all tools in the runtime. :param tool_group_id: The ID of the tool group to list tools for. :param mcp_endpoint: The MCP endpoint to use for the tool group. :returns: A ListToolDefsResponse. parameters: - name: tool_group_id description: >- The ID of the tool group to list tools for. required: false schema: type: string in: query - name: mcp_endpoint description: >- The MCP endpoint to use for the tool group. required: false schema: $ref: '#/components/schemas/URL' in: query deprecated: false /v1/tool-runtime/rag-tool/insert: post: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ToolRuntime summary: >- Index documents so they can be used by the RAG system. description: >- Index documents so they can be used by the RAG system. :param documents: List of documents to index in the RAG system :param vector_store_id: ID of the vector database to store the document embeddings :param chunk_size_in_tokens: (Optional) Size in tokens for document chunking during indexing parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/InsertRequest' required: true deprecated: false /v1/tool-runtime/rag-tool/query: post: responses: '200': description: >- RAGQueryResult containing the retrieved content and metadata content: application/json: schema: $ref: '#/components/schemas/RAGQueryResult' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ToolRuntime summary: >- Query the RAG system for context; typically invoked by the agent. description: >- Query the RAG system for context; typically invoked by the agent. :param content: The query content to search for in the indexed documents :param vector_store_ids: List of vector database IDs to search within :param query_config: (Optional) Configuration parameters for the query operation :returns: RAGQueryResult containing the retrieved content and metadata parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/QueryRequest' required: true deprecated: false /v1/toolgroups: get: responses: '200': description: A ListToolGroupsResponse. content: application/json: schema: $ref: '#/components/schemas/ListToolGroupsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ToolGroups summary: List tool groups with optional provider. description: >- List tool groups with optional provider. :returns: A ListToolGroupsResponse. parameters: [] deprecated: false post: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ToolGroups summary: Register a tool group. description: >- Register a tool group. :param toolgroup_id: The ID of the tool group to register. :param provider_id: The ID of the provider to use for the tool group. :param mcp_endpoint: The MCP endpoint to use for the tool group. :param args: A dictionary of arguments to pass to the tool group. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/RegisterToolGroupRequest' required: true deprecated: false /v1/toolgroups/{toolgroup_id}: get: responses: '200': description: A ToolGroup. content: application/json: schema: $ref: '#/components/schemas/ToolGroup' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ToolGroups summary: Get a tool group by its ID. description: >- Get a tool group by its ID. :param toolgroup_id: The ID of the tool group to get. :returns: A ToolGroup. parameters: - name: toolgroup_id description: The ID of the tool group to get. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ToolGroups summary: Unregister a tool group. description: >- Unregister a tool group. :param toolgroup_id: The ID of the tool group to unregister. parameters: - name: toolgroup_id description: The ID of the tool group to unregister. required: true schema: type: string in: path deprecated: false /v1/tools: get: responses: '200': description: A ListToolDefsResponse. content: application/json: schema: $ref: '#/components/schemas/ListToolDefsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ToolGroups summary: List tools with optional tool group. description: >- List tools with optional tool group. :param toolgroup_id: The ID of the tool group to list tools for. :returns: A ListToolDefsResponse. parameters: - name: toolgroup_id description: >- The ID of the tool group to list tools for. required: false schema: type: string in: query deprecated: false /v1/tools/{tool_name}: get: responses: '200': description: A ToolDef. content: application/json: schema: $ref: '#/components/schemas/ToolDef' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - ToolGroups summary: Get a tool by its name. description: >- Get a tool by its name. :param tool_name: The name of the tool to get. :returns: A ToolDef. parameters: - name: tool_name description: The name of the tool to get. required: true schema: type: string in: path deprecated: false /v1/vector-io/insert: post: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Insert chunks into a vector database. description: >- Insert chunks into a vector database. :param vector_store_id: The identifier of the vector database to insert the chunks into. :param chunks: The chunks to insert. Each `Chunk` should contain content which can be interleaved text, images, or other types. `metadata`: `dict[str, Any]` and `embedding`: `List[float]` are optional. If `metadata` is provided, you configure how Llama Stack formats the chunk during generation. If `embedding` is not provided, it will be computed later. :param ttl_seconds: The time to live of the chunks. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/InsertChunksRequest' required: true deprecated: false /v1/vector-io/query: post: responses: '200': description: A QueryChunksResponse. content: application/json: schema: $ref: '#/components/schemas/QueryChunksResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Query chunks from a vector database. description: >- Query chunks from a vector database. :param vector_store_id: The identifier of the vector database to query. :param query: The query to search for. :param params: The parameters of the query. :returns: A QueryChunksResponse. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/QueryChunksRequest' required: true deprecated: false /v1/vector_stores: get: responses: '200': description: >- A VectorStoreListResponse containing the list of vector stores. content: application/json: schema: $ref: '#/components/schemas/VectorStoreListResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Returns a list of vector stores. description: >- Returns a list of vector stores. :param limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. :param order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. :param after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. :param before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. :returns: A VectorStoreListResponse containing the list of vector stores. parameters: - name: limit description: >- A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. required: false schema: type: integer in: query - name: order description: >- Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. required: false schema: type: string in: query - name: after description: >- A cursor for use in pagination. `after` is an object ID that defines your place in the list. required: false schema: type: string in: query - name: before description: >- A cursor for use in pagination. `before` is an object ID that defines your place in the list. required: false schema: type: string in: query deprecated: false post: responses: '200': description: >- A VectorStoreObject representing the created vector store. content: application/json: schema: $ref: '#/components/schemas/VectorStoreObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Creates a vector store. description: >- Creates a vector store. Generate an OpenAI-compatible vector store with the given parameters. :returns: A VectorStoreObject representing the created vector store. parameters: [] requestBody: content: application/json: schema: id: Annotated required: true deprecated: false /v1/vector_stores/{vector_store_id}: get: responses: '200': description: >- A VectorStoreObject representing the vector store. content: application/json: schema: $ref: '#/components/schemas/VectorStoreObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Retrieves a vector store. description: >- Retrieves a vector store. :param vector_store_id: The ID of the vector store to retrieve. :returns: A VectorStoreObject representing the vector store. parameters: - name: vector_store_id description: The ID of the vector store to retrieve. required: true schema: type: string in: path deprecated: false post: responses: '200': description: >- A VectorStoreObject representing the updated vector store. content: application/json: schema: $ref: '#/components/schemas/VectorStoreObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Updates a vector store. description: >- Updates a vector store. :param vector_store_id: The ID of the vector store to update. :param name: The name of the vector store. :param expires_after: The expiration policy for a vector store. :param metadata: Set of 16 key-value pairs that can be attached to an object. :returns: A VectorStoreObject representing the updated vector store. parameters: - name: vector_store_id description: The ID of the vector store to update. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/OpenaiUpdateVectorStoreRequest' required: true deprecated: false delete: responses: '200': description: >- A VectorStoreDeleteResponse indicating the deletion status. content: application/json: schema: $ref: '#/components/schemas/VectorStoreDeleteResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Delete a vector store. description: >- Delete a vector store. :param vector_store_id: The ID of the vector store to delete. :returns: A VectorStoreDeleteResponse indicating the deletion status. parameters: - name: vector_store_id description: The ID of the vector store to delete. required: true schema: type: string in: path deprecated: false /v1/vector_stores/{vector_store_id}/file_batches: post: responses: '200': description: >- A VectorStoreFileBatchObject representing the created file batch. content: application/json: schema: $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Create a vector store file batch. description: >- Create a vector store file batch. Generate an OpenAI-compatible vector store file batch for the given vector store. :param vector_store_id: The ID of the vector store to create the file batch for. :returns: A VectorStoreFileBatchObject representing the created file batch. parameters: - name: vector_store_id description: >- The ID of the vector store to create the file batch for. required: true schema: type: string in: path requestBody: content: application/json: schema: id: Annotated required: true deprecated: false /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: get: responses: '200': description: >- A VectorStoreFileBatchObject representing the file batch. content: application/json: schema: $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Retrieve a vector store file batch. description: >- Retrieve a vector store file batch. :param batch_id: The ID of the file batch to retrieve. :param vector_store_id: The ID of the vector store containing the file batch. :returns: A VectorStoreFileBatchObject representing the file batch. parameters: - name: batch_id description: The ID of the file batch to retrieve. required: true schema: type: string in: path - name: vector_store_id description: >- The ID of the vector store containing the file batch. required: true schema: type: string in: path deprecated: false /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: post: responses: '200': description: >- A VectorStoreFileBatchObject representing the cancelled file batch. content: application/json: schema: $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Cancels a vector store file batch. description: >- Cancels a vector store file batch. :param batch_id: The ID of the file batch to cancel. :param vector_store_id: The ID of the vector store containing the file batch. :returns: A VectorStoreFileBatchObject representing the cancelled file batch. parameters: - name: batch_id description: The ID of the file batch to cancel. required: true schema: type: string in: path - name: vector_store_id description: >- The ID of the vector store containing the file batch. required: true schema: type: string in: path deprecated: false /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: get: responses: '200': description: >- A VectorStoreFilesListInBatchResponse containing the list of files in the batch. content: application/json: schema: $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: >- Returns a list of vector store files in a batch. description: >- Returns a list of vector store files in a batch. :param batch_id: The ID of the file batch to list files from. :param vector_store_id: The ID of the vector store containing the file batch. :param after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. :param before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. :param filter: Filter by file status. One of in_progress, completed, failed, cancelled. :param limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. :param order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. :returns: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. parameters: - name: batch_id description: >- The ID of the file batch to list files from. required: true schema: type: string in: path - name: vector_store_id description: >- The ID of the vector store containing the file batch. required: true schema: type: string in: path - name: after description: >- A cursor for use in pagination. `after` is an object ID that defines your place in the list. required: false schema: type: string in: query - name: before description: >- A cursor for use in pagination. `before` is an object ID that defines your place in the list. required: false schema: type: string in: query - name: filter description: >- Filter by file status. One of in_progress, completed, failed, cancelled. required: false schema: type: string in: query - name: limit description: >- A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. required: false schema: type: integer in: query - name: order description: >- Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. required: false schema: type: string in: query deprecated: false /v1/vector_stores/{vector_store_id}/files: get: responses: '200': description: >- A VectorStoreListFilesResponse containing the list of files. content: application/json: schema: $ref: '#/components/schemas/VectorStoreListFilesResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: List files in a vector store. description: >- List files in a vector store. :param vector_store_id: The ID of the vector store to list files from. :param limit: (Optional) A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. :param order: (Optional) Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. :param after: (Optional) A cursor for use in pagination. `after` is an object ID that defines your place in the list. :param before: (Optional) A cursor for use in pagination. `before` is an object ID that defines your place in the list. :param filter: (Optional) Filter by file status to only return files with the specified status. :returns: A VectorStoreListFilesResponse containing the list of files. parameters: - name: vector_store_id description: >- The ID of the vector store to list files from. required: true schema: type: string in: path - name: limit description: >- (Optional) A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. required: false schema: type: integer in: query - name: order description: >- (Optional) Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. required: false schema: type: string in: query - name: after description: >- (Optional) A cursor for use in pagination. `after` is an object ID that defines your place in the list. required: false schema: type: string in: query - name: before description: >- (Optional) A cursor for use in pagination. `before` is an object ID that defines your place in the list. required: false schema: type: string in: query - name: filter description: >- (Optional) Filter by file status to only return files with the specified status. required: false schema: id: Union in: query deprecated: false post: responses: '200': description: >- A VectorStoreFileObject representing the attached file. content: application/json: schema: $ref: '#/components/schemas/VectorStoreFileObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Attach a file to a vector store. description: >- Attach a file to a vector store. :param vector_store_id: The ID of the vector store to attach the file to. :param file_id: The ID of the file to attach to the vector store. :param attributes: The key-value attributes stored with the file, which can be used for filtering. :param chunking_strategy: The chunking strategy to use for the file. :returns: A VectorStoreFileObject representing the attached file. parameters: - name: vector_store_id description: >- The ID of the vector store to attach the file to. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/OpenaiAttachFileToVectorStoreRequest' required: true deprecated: false /v1/vector_stores/{vector_store_id}/files/{file_id}: get: responses: '200': description: >- A VectorStoreFileObject representing the file. content: application/json: schema: $ref: '#/components/schemas/VectorStoreFileObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Retrieves a vector store file. description: >- Retrieves a vector store file. :param vector_store_id: The ID of the vector store containing the file to retrieve. :param file_id: The ID of the file to retrieve. :returns: A VectorStoreFileObject representing the file. parameters: - name: vector_store_id description: >- The ID of the vector store containing the file to retrieve. required: true schema: type: string in: path - name: file_id description: The ID of the file to retrieve. required: true schema: type: string in: path deprecated: false post: responses: '200': description: >- A VectorStoreFileObject representing the updated file. content: application/json: schema: $ref: '#/components/schemas/VectorStoreFileObject' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Updates a vector store file. description: >- Updates a vector store file. :param vector_store_id: The ID of the vector store containing the file to update. :param file_id: The ID of the file to update. :param attributes: The updated key-value attributes to store with the file. :returns: A VectorStoreFileObject representing the updated file. parameters: - name: vector_store_id description: >- The ID of the vector store containing the file to update. required: true schema: type: string in: path - name: file_id description: The ID of the file to update. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/OpenaiUpdateVectorStoreFileRequest' required: true deprecated: false delete: responses: '200': description: >- A VectorStoreFileDeleteResponse indicating the deletion status. content: application/json: schema: $ref: '#/components/schemas/VectorStoreFileDeleteResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Delete a vector store file. description: >- Delete a vector store file. :param vector_store_id: The ID of the vector store containing the file to delete. :param file_id: The ID of the file to delete. :returns: A VectorStoreFileDeleteResponse indicating the deletion status. parameters: - name: vector_store_id description: >- The ID of the vector store containing the file to delete. required: true schema: type: string in: path - name: file_id description: The ID of the file to delete. required: true schema: type: string in: path deprecated: false /v1/vector_stores/{vector_store_id}/files/{file_id}/content: get: responses: '200': description: >- A list of InterleavedContent representing the file contents. content: application/json: schema: $ref: '#/components/schemas/VectorStoreFileContentsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: >- Retrieves the contents of a vector store file. description: >- Retrieves the contents of a vector store file. :param vector_store_id: The ID of the vector store containing the file to retrieve. :param file_id: The ID of the file to retrieve. :returns: A list of InterleavedContent representing the file contents. parameters: - name: vector_store_id description: >- The ID of the vector store containing the file to retrieve. required: true schema: type: string in: path - name: file_id description: The ID of the file to retrieve. required: true schema: type: string in: path deprecated: false /v1/vector_stores/{vector_store_id}/search: post: responses: '200': description: >- A VectorStoreSearchResponse containing the search results. content: application/json: schema: $ref: '#/components/schemas/VectorStoreSearchResponsePage' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - VectorIO summary: Search for chunks in a vector store. description: >- Search for chunks in a vector store. Searches a vector store for relevant chunks based on a query and optional file attribute filters. :param vector_store_id: The ID of the vector store to search. :param query: The query string or array for performing the search. :param filters: Filters based on file attributes to narrow the search results. :param max_num_results: Maximum number of results to return (1 to 50 inclusive, default 10). :param ranking_options: Ranking options for fine-tuning the search results. :param rewrite_query: Whether to rewrite the natural language query for vector search (default false) :param search_mode: The search mode to use - "keyword", "vector", or "hybrid" (default "vector") :returns: A VectorStoreSearchResponse containing the search results. parameters: - name: vector_store_id description: The ID of the vector store to search. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/OpenaiSearchVectorStoreRequest' required: true deprecated: false /v1/version: get: responses: '200': description: >- Version information containing the service version number. content: application/json: schema: $ref: '#/components/schemas/VersionInfo' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Inspect summary: Get version. description: >- Get version. Get the version of the service. :returns: Version information containing the service version number. parameters: [] deprecated: false /v1beta/datasetio/append-rows/{dataset_id}: post: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - DatasetIO summary: Append rows to a dataset. description: >- Append rows to a dataset. :param dataset_id: The ID of the dataset to append the rows to. :param rows: The rows to append to the dataset. parameters: - name: dataset_id description: >- The ID of the dataset to append the rows to. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/AppendRowsRequest' required: true deprecated: false /v1beta/datasetio/iterrows/{dataset_id}: get: responses: '200': description: A PaginatedResponse. content: application/json: schema: $ref: '#/components/schemas/PaginatedResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - DatasetIO summary: >- Get a paginated list of rows from a dataset. description: >- Get a paginated list of rows from a dataset. Uses offset-based pagination where: - start_index: The starting index (0-based). If None, starts from beginning. - limit: Number of items to return. If None or -1, returns all items. The response includes: - data: List of items for the current page. - has_more: Whether there are more items available after this set. :param dataset_id: The ID of the dataset to get the rows from. :param start_index: Index into dataset for the first row to get. Get all rows if None. :param limit: The number of rows to get. :returns: A PaginatedResponse. parameters: - name: dataset_id description: >- The ID of the dataset to get the rows from. required: true schema: type: string in: path - name: start_index description: >- Index into dataset for the first row to get. Get all rows if None. required: false schema: type: integer in: query - name: limit description: The number of rows to get. required: false schema: type: integer in: query deprecated: false /v1beta/datasets: get: responses: '200': description: A ListDatasetsResponse. content: application/json: schema: $ref: '#/components/schemas/ListDatasetsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Datasets summary: List all datasets. description: >- List all datasets. :returns: A ListDatasetsResponse. parameters: [] deprecated: false post: responses: '200': description: A Dataset. content: application/json: schema: $ref: '#/components/schemas/Dataset' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Datasets summary: Register a new dataset. description: >- Register a new dataset. :param purpose: The purpose of the dataset. One of: - "post-training/messages": The dataset contains a messages column with list of messages for post-training. { "messages": [ {"role": "user", "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}, ] } - "eval/question-answer": The dataset contains a question column and an answer column for evaluation. { "question": "What is the capital of France?", "answer": "Paris" } - "eval/messages-answer": The dataset contains a messages column with list of messages and an answer column for evaluation. { "messages": [ {"role": "user", "content": "Hello, my name is John Doe."}, {"role": "assistant", "content": "Hello, John Doe. How can I help you today?"}, {"role": "user", "content": "What's my name?"}, ], "answer": "John Doe" } :param source: The data source of the dataset. Ensure that the data source schema is compatible with the purpose of the dataset. Examples: - { "type": "uri", "uri": "https://mywebsite.com/mydata.jsonl" } - { "type": "uri", "uri": "lsfs://mydata.jsonl" } - { "type": "uri", "uri": "data:csv;base64,{base64_content}" } - { "type": "uri", "uri": "huggingface://llamastack/simpleqa?split=train" } - { "type": "rows", "rows": [ { "messages": [ {"role": "user", "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}, ] } ] } :param metadata: The metadata for the dataset. - E.g. {"description": "My dataset"}. :param dataset_id: The ID of the dataset. If not provided, an ID will be generated. :returns: A Dataset. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/RegisterDatasetRequest' required: true deprecated: false /v1beta/datasets/{dataset_id}: get: responses: '200': description: A Dataset. content: application/json: schema: $ref: '#/components/schemas/Dataset' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Datasets summary: Get a dataset by its ID. description: >- Get a dataset by its ID. :param dataset_id: The ID of the dataset to get. :returns: A Dataset. parameters: - name: dataset_id description: The ID of the dataset to get. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Datasets summary: Unregister a dataset by its ID. description: >- Unregister a dataset by its ID. :param dataset_id: The ID of the dataset to unregister. parameters: - name: dataset_id description: The ID of the dataset to unregister. required: true schema: type: string in: path deprecated: false /v1alpha/agents: get: responses: '200': description: A PaginatedResponse. content: application/json: schema: $ref: '#/components/schemas/PaginatedResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: List all agents. description: >- List all agents. :param start_index: The index to start the pagination from. :param limit: The number of agents to return. :returns: A PaginatedResponse. parameters: - name: start_index description: The index to start the pagination from. required: false schema: type: integer in: query - name: limit description: The number of agents to return. required: false schema: type: integer in: query deprecated: false post: responses: '200': description: >- An AgentCreateResponse with the agent ID. content: application/json: schema: $ref: '#/components/schemas/AgentCreateResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: >- Create an agent with the given configuration. description: >- Create an agent with the given configuration. :param agent_config: The configuration for the agent. :returns: An AgentCreateResponse with the agent ID. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateAgentRequest' required: true deprecated: false /v1alpha/agents/{agent_id}: get: responses: '200': description: An Agent of the agent. content: application/json: schema: $ref: '#/components/schemas/Agent' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: Describe an agent by its ID. description: >- Describe an agent by its ID. :param agent_id: ID of the agent. :returns: An Agent of the agent. parameters: - name: agent_id description: ID of the agent. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: >- Delete an agent by its ID and its associated sessions and turns. description: >- Delete an agent by its ID and its associated sessions and turns. :param agent_id: The ID of the agent to delete. parameters: - name: agent_id description: The ID of the agent to delete. required: true schema: type: string in: path deprecated: false /v1alpha/agents/{agent_id}/session: post: responses: '200': description: An AgentSessionCreateResponse. content: application/json: schema: $ref: '#/components/schemas/AgentSessionCreateResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: Create a new session for an agent. description: >- Create a new session for an agent. :param agent_id: The ID of the agent to create the session for. :param session_name: The name of the session to create. :returns: An AgentSessionCreateResponse. parameters: - name: agent_id description: >- The ID of the agent to create the session for. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateAgentSessionRequest' required: true deprecated: false /v1alpha/agents/{agent_id}/session/{session_id}: get: responses: '200': description: A Session. content: application/json: schema: $ref: '#/components/schemas/Session' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: Retrieve an agent session by its ID. description: >- Retrieve an agent session by its ID. :param session_id: The ID of the session to get. :param agent_id: The ID of the agent to get the session for. :param turn_ids: (Optional) List of turn IDs to filter the session by. :returns: A Session. parameters: - name: session_id description: The ID of the session to get. required: true schema: type: string in: path - name: agent_id description: >- The ID of the agent to get the session for. required: true schema: type: string in: path - name: turn_ids description: >- (Optional) List of turn IDs to filter the session by. required: false schema: $ref: '#/components/schemas/list' in: query deprecated: false delete: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: >- Delete an agent session by its ID and its associated turns. description: >- Delete an agent session by its ID and its associated turns. :param session_id: The ID of the session to delete. :param agent_id: The ID of the agent to delete the session for. parameters: - name: session_id description: The ID of the session to delete. required: true schema: type: string in: path - name: agent_id description: >- The ID of the agent to delete the session for. required: true schema: type: string in: path deprecated: false /v1alpha/agents/{agent_id}/session/{session_id}/turn: post: responses: '200': description: If stream=False, returns a Turn object. content: application/json: schema: $ref: '#/components/schemas/Turn' text/event-stream: schema: $ref: '#/components/schemas/AsyncIterator' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: Create a new turn for an agent. description: >- Create a new turn for an agent. :param agent_id: The ID of the agent to create the turn for. :param session_id: The ID of the session to create the turn for. :param messages: List of messages to start the turn with. :param stream: (Optional) If True, generate an SSE event stream of the response. Defaults to False. :param documents: (Optional) List of documents to create the turn with. :param toolgroups: (Optional) List of toolgroups to create the turn with, will be used in addition to the agent's config toolgroups for the request. :param tool_config: (Optional) The tool configuration to create the turn with, will be used to override the agent's tool_config. :returns: If stream=False, returns a Turn object. If stream=True, returns an SSE event stream of AgentTurnResponseStreamChunk. parameters: - name: agent_id description: >- The ID of the agent to create the turn for. required: true schema: type: string in: path - name: session_id description: >- The ID of the session to create the turn for. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateAgentTurnRequest' required: true deprecated: false /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}: get: responses: '200': description: A Turn. content: application/json: schema: $ref: '#/components/schemas/Turn' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: Retrieve an agent turn by its ID. description: >- Retrieve an agent turn by its ID. :param agent_id: The ID of the agent to get the turn for. :param session_id: The ID of the session to get the turn for. :param turn_id: The ID of the turn to get. :returns: A Turn. parameters: - name: agent_id description: The ID of the agent to get the turn for. required: true schema: type: string in: path - name: session_id description: >- The ID of the session to get the turn for. required: true schema: type: string in: path - name: turn_id description: The ID of the turn to get. required: true schema: type: string in: path deprecated: false /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume: post: responses: '200': description: >- A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk objects. content: application/json: schema: $ref: '#/components/schemas/Turn' text/event-stream: schema: $ref: '#/components/schemas/AsyncIterator' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: >- Resume an agent turn with executed tool call responses. description: >- Resume an agent turn with executed tool call responses. When a Turn has the status `awaiting_input` due to pending input from client side tool calls, this endpoint can be used to submit the outputs from the tool calls once they are ready. :param agent_id: The ID of the agent to resume. :param session_id: The ID of the session to resume. :param turn_id: The ID of the turn to resume. :param tool_responses: The tool call responses to resume the turn with. :param stream: Whether to stream the response. :returns: A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk objects. parameters: - name: agent_id description: The ID of the agent to resume. required: true schema: type: string in: path - name: session_id description: The ID of the session to resume. required: true schema: type: string in: path - name: turn_id description: The ID of the turn to resume. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/ResumeAgentTurnRequest' required: true deprecated: false /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}: get: responses: '200': description: An AgentStepResponse. content: application/json: schema: $ref: '#/components/schemas/AgentStepResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: Retrieve an agent step by its ID. description: >- Retrieve an agent step by its ID. :param agent_id: The ID of the agent to get the step for. :param session_id: The ID of the session to get the step for. :param turn_id: The ID of the turn to get the step for. :param step_id: The ID of the step to get. :returns: An AgentStepResponse. parameters: - name: agent_id description: The ID of the agent to get the step for. required: true schema: type: string in: path - name: session_id description: >- The ID of the session to get the step for. required: true schema: type: string in: path - name: turn_id description: The ID of the turn to get the step for. required: true schema: type: string in: path - name: step_id description: The ID of the step to get. required: true schema: type: string in: path deprecated: false /v1alpha/agents/{agent_id}/sessions: get: responses: '200': description: A PaginatedResponse. content: application/json: schema: $ref: '#/components/schemas/PaginatedResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Agents summary: List all session(s) of a given agent. description: >- List all session(s) of a given agent. :param agent_id: The ID of the agent to list sessions for. :param start_index: The index to start the pagination from. :param limit: The number of sessions to return. :returns: A PaginatedResponse. parameters: - name: agent_id description: >- The ID of the agent to list sessions for. required: true schema: type: string in: path - name: start_index description: The index to start the pagination from. required: false schema: type: integer in: query - name: limit description: The number of sessions to return. required: false schema: type: integer in: query deprecated: false /v1alpha/eval/benchmarks: get: responses: '200': description: A ListBenchmarksResponse. content: application/json: schema: $ref: '#/components/schemas/ListBenchmarksResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Benchmarks summary: List all benchmarks. description: >- List all benchmarks. :returns: A ListBenchmarksResponse. parameters: [] deprecated: false post: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Benchmarks summary: Register a benchmark. description: >- Register a benchmark. :param benchmark_id: The ID of the benchmark to register. :param dataset_id: The ID of the dataset to use for the benchmark. :param scoring_functions: The scoring functions to use for the benchmark. :param provider_benchmark_id: The ID of the provider benchmark to use for the benchmark. :param provider_id: The ID of the provider to use for the benchmark. :param metadata: The metadata to use for the benchmark. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/RegisterBenchmarkRequest' required: true deprecated: false /v1alpha/eval/benchmarks/{benchmark_id}: get: responses: '200': description: A Benchmark. content: application/json: schema: $ref: '#/components/schemas/Benchmark' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Benchmarks summary: Get a benchmark by its ID. description: >- Get a benchmark by its ID. :param benchmark_id: The ID of the benchmark to get. :returns: A Benchmark. parameters: - name: benchmark_id description: The ID of the benchmark to get. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Benchmarks summary: Unregister a benchmark. description: >- Unregister a benchmark. :param benchmark_id: The ID of the benchmark to unregister. parameters: - name: benchmark_id description: The ID of the benchmark to unregister. required: true schema: type: string in: path deprecated: false /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: responses: '200': description: >- EvaluateResponse object containing generations and scores. content: application/json: schema: $ref: '#/components/schemas/EvaluateResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Eval summary: Evaluate a list of rows on a benchmark. description: >- Evaluate a list of rows on a benchmark. :param benchmark_id: The ID of the benchmark to run the evaluation on. :param input_rows: The rows to evaluate. :param scoring_functions: The scoring functions to use for the evaluation. :param benchmark_config: The configuration for the benchmark. :returns: EvaluateResponse object containing generations and scores. parameters: - name: benchmark_id description: >- The ID of the benchmark to run the evaluation on. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/EvaluateRowsRequest' required: true deprecated: false /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: responses: '200': description: >- The job that was created to run the evaluation. content: application/json: schema: $ref: '#/components/schemas/Job' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Eval summary: Run an evaluation on a benchmark. description: >- Run an evaluation on a benchmark. :param benchmark_id: The ID of the benchmark to run the evaluation on. :param benchmark_config: The configuration for the benchmark. :returns: The job that was created to run the evaluation. parameters: - name: benchmark_id description: >- The ID of the benchmark to run the evaluation on. required: true schema: type: string in: path requestBody: content: application/json: schema: $ref: '#/components/schemas/RunEvalRequest' required: true deprecated: false /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: get: responses: '200': description: The status of the evaluation job. content: application/json: schema: $ref: '#/components/schemas/Job' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Eval summary: Get the status of a job. description: >- Get the status of a job. :param benchmark_id: The ID of the benchmark to run the evaluation on. :param job_id: The ID of the job to get the status of. :returns: The status of the evaluation job. parameters: - name: benchmark_id description: >- The ID of the benchmark to run the evaluation on. required: true schema: type: string in: path - name: job_id description: The ID of the job to get the status of. required: true schema: type: string in: path deprecated: false delete: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Eval summary: Cancel a job. description: >- Cancel a job. :param benchmark_id: The ID of the benchmark to run the evaluation on. :param job_id: The ID of the job to cancel. parameters: - name: benchmark_id description: >- The ID of the benchmark to run the evaluation on. required: true schema: type: string in: path - name: job_id description: The ID of the job to cancel. required: true schema: type: string in: path deprecated: false /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: get: responses: '200': description: The result of the job. content: application/json: schema: $ref: '#/components/schemas/EvaluateResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Eval summary: Get the result of a job. description: >- Get the result of a job. :param benchmark_id: The ID of the benchmark to run the evaluation on. :param job_id: The ID of the job to get the result of. :returns: The result of the job. parameters: - name: benchmark_id description: >- The ID of the benchmark to run the evaluation on. required: true schema: type: string in: path - name: job_id description: The ID of the job to get the result of. required: true schema: type: string in: path deprecated: false /v1alpha/inference/rerank: post: responses: '200': description: >- RerankResponse with indices sorted by relevance score (descending). content: application/json: schema: $ref: '#/components/schemas/RerankResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - Inference summary: >- Rerank a list of documents based on their relevance to a query. description: >- Rerank a list of documents based on their relevance to a query. :param model: The identifier of the reranking model to use. :param query: The search query to rank items against. Can be a string, text content part, or image content part. The input must not exceed the model's max input token length. :param items: List of items to rerank. Each item can be a string, text content part, or image content part. Each input must not exceed the model's max input token length. :param max_num_results: (Optional) Maximum number of results to return. Default: returns all. :returns: RerankResponse with indices sorted by relevance score (descending). parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/RerankRequest' required: true deprecated: false /v1alpha/post-training/job/artifacts: get: responses: '200': description: A PostTrainingJobArtifactsResponse. content: application/json: schema: $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - PostTraining (Coming Soon) summary: Get the artifacts of a training job. description: >- Get the artifacts of a training job. :param job_uuid: The UUID of the job to get the artifacts of. :returns: A PostTrainingJobArtifactsResponse. parameters: - name: job_uuid description: >- The UUID of the job to get the artifacts of. required: true schema: type: string in: query deprecated: false /v1alpha/post-training/job/cancel: post: responses: '200': description: OK '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - PostTraining (Coming Soon) summary: Cancel a training job. description: >- Cancel a training job. :param job_uuid: The UUID of the job to cancel. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CancelTrainingJobRequest' required: true deprecated: false /v1alpha/post-training/job/status: get: responses: '200': description: A PostTrainingJobStatusResponse. content: application/json: schema: $ref: '#/components/schemas/PostTrainingJobStatusResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - PostTraining (Coming Soon) summary: Get the status of a training job. description: >- Get the status of a training job. :param job_uuid: The UUID of the job to get the status of. :returns: A PostTrainingJobStatusResponse. parameters: - name: job_uuid description: >- The UUID of the job to get the status of. required: true schema: type: string in: query deprecated: false /v1alpha/post-training/jobs: get: responses: '200': description: A ListPostTrainingJobsResponse. content: application/json: schema: $ref: '#/components/schemas/ListPostTrainingJobsResponse' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - PostTraining (Coming Soon) summary: Get all training jobs. description: >- Get all training jobs. :returns: A ListPostTrainingJobsResponse. parameters: [] deprecated: false /v1alpha/post-training/preference-optimize: post: responses: '200': description: A PostTrainingJob. content: application/json: schema: $ref: '#/components/schemas/PostTrainingJob' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - PostTraining (Coming Soon) summary: Run preference optimization of a model. description: >- Run preference optimization of a model. :param job_uuid: The UUID of the job to create. :param finetuned_model: The model to fine-tune. :param algorithm_config: The algorithm configuration. :param training_config: The training configuration. :param hyperparam_search_config: The hyperparam search configuration. :param logger_config: The logger configuration. :returns: A PostTrainingJob. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/PreferenceOptimizeRequest' required: true deprecated: false /v1alpha/post-training/supervised-fine-tune: post: responses: '200': description: A PostTrainingJob. content: application/json: schema: $ref: '#/components/schemas/PostTrainingJob' '400': $ref: '#/components/responses/BadRequest400' '429': $ref: >- #/components/responses/TooManyRequests429 '500': $ref: >- #/components/responses/InternalServerError500 default: $ref: '#/components/responses/DefaultError' tags: - PostTraining (Coming Soon) summary: Run supervised fine-tuning of a model. description: >- Run supervised fine-tuning of a model. :param job_uuid: The UUID of the job to create. :param training_config: The training configuration. :param hyperparam_search_config: The hyperparam search configuration. :param logger_config: The logger configuration. :param model: The model to fine-tune. :param checkpoint_dir: The directory to save checkpoint(s) to. :param algorithm_config: The algorithm configuration. :returns: A PostTrainingJob. parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/SupervisedFineTuneRequest' required: true deprecated: false jsonSchemaDialect: >- https://json-schema.org/draft/2020-12/schema components: schemas: Error: description: >- Error response from the API. Roughly follows RFC 7807. :param status: HTTP status code :param title: Error title, a short summary of the error which is invariant for an error type :param detail: Error detail, a longer human-readable description of the error :param instance: (Optional) A URL which can be used to retrieve more information about the specific occurrence of the error properties: status: title: Status type: integer title: title: Title type: string detail: title: Detail type: string instance: anyOf: - type: string - type: 'null' title: Instance required: - status - title - detail title: Error description: >- Error response from the API. Roughly follows RFC 7807. ListBatchesResponse: type: object properties: object: type: string const: list default: list data: type: array items: type: object properties: id: type: string completion_window: type: string created_at: type: integer endpoint: type: string input_file_id: type: string object: type: string const: batch status: type: string enum: - validating - failed - in_progress - finalizing - completed - expired - cancelling - cancelled cancelled_at: type: integer cancelling_at: type: integer completed_at: type: integer error_file_id: type: string errors: type: object properties: data: type: array items: type: object properties: code: type: string line: type: integer message: type: string param: type: string additionalProperties: false title: BatchError object: type: string additionalProperties: false title: Errors expired_at: type: integer expires_at: type: integer failed_at: type: integer finalizing_at: type: integer in_progress_at: type: integer metadata: type: object additionalProperties: type: string model: type: string output_file_id: type: string request_counts: type: object properties: completed: type: integer failed: type: integer total: type: integer additionalProperties: false required: - completed - failed - total title: BatchRequestCounts usage: type: object properties: input_tokens: type: integer input_tokens_details: type: object properties: cached_tokens: type: integer additionalProperties: false required: - cached_tokens title: InputTokensDetails output_tokens: type: integer output_tokens_details: type: object properties: reasoning_tokens: type: integer additionalProperties: false required: - reasoning_tokens title: OutputTokensDetails total_tokens: type: integer additionalProperties: false required: - input_tokens - input_tokens_details - output_tokens - output_tokens_details - total_tokens title: BatchUsage additionalProperties: false required: - id - completion_window - created_at - endpoint - input_file_id - object - status title: Batch first_id: type: string last_id: type: string has_more: type: boolean default: false additionalProperties: false required: - object - data - has_more title: ListBatchesResponse description: >- Response containing a list of batch objects. CreateBatchRequest: type: object properties: input_file_id: type: string description: >- The ID of an uploaded file containing requests for the batch. endpoint: type: string description: >- The endpoint to be used for all requests in the batch. completion_window: type: string const: 24h description: >- The time window within which the batch should be processed. metadata: type: object additionalProperties: type: string description: Optional metadata for the batch. idempotency_key: type: string description: >- Optional idempotency key. When provided, enables idempotent behavior. additionalProperties: false required: - input_file_id - endpoint - completion_window title: CreateBatchRequest Batch: type: object properties: id: type: string completion_window: type: string created_at: type: integer endpoint: type: string input_file_id: type: string object: type: string const: batch status: type: string enum: - validating - failed - in_progress - finalizing - completed - expired - cancelling - cancelled cancelled_at: type: integer cancelling_at: type: integer completed_at: type: integer error_file_id: type: string errors: type: object properties: data: type: array items: type: object properties: code: type: string line: type: integer message: type: string param: type: string additionalProperties: false title: BatchError object: type: string additionalProperties: false title: Errors expired_at: type: integer expires_at: type: integer failed_at: type: integer finalizing_at: type: integer in_progress_at: type: integer metadata: type: object additionalProperties: type: string model: type: string output_file_id: type: string request_counts: type: object properties: completed: type: integer failed: type: integer total: type: integer additionalProperties: false required: - completed - failed - total title: BatchRequestCounts usage: type: object properties: input_tokens: type: integer input_tokens_details: type: object properties: cached_tokens: type: integer additionalProperties: false required: - cached_tokens title: InputTokensDetails output_tokens: type: integer output_tokens_details: type: object properties: reasoning_tokens: type: integer additionalProperties: false required: - reasoning_tokens title: OutputTokensDetails total_tokens: type: integer additionalProperties: false required: - input_tokens - input_tokens_details - output_tokens - output_tokens_details - total_tokens title: BatchUsage additionalProperties: false required: - id - completion_window - created_at - endpoint - input_file_id - object - status title: Batch Order: type: string enum: - asc - desc title: Order description: Sort order for paginated responses. ListOpenAIChatCompletionResponse: type: object Order: type: object ListOpenAIChatCompletionResponse: $defs: OpenAIAssistantMessageParam: description: >- A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. :param role: Must be "assistant" to identify this as the model's response :param content: The content of the model's response :param name: (Optional) The name of the assistant message participant. :param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object. properties: role: const: assistant default: assistant title: Role type: string content: anyOf: - type: string - items: $ref: >- #/$defs/OpenAIChatCompletionContentPartTextParam type: array - type: 'null' title: Content name: anyOf: - type: string - type: 'null' title: Name tool_calls: anyOf: - items: $ref: '#/$defs/OpenAIChatCompletionToolCall' type: array - type: 'null' title: Tool Calls title: OpenAIAssistantMessageParam type: object "OpenAIChatCompletionContentPartImageParam": description: >- Image content part for OpenAI-compatible chat completion messages. :param type: Must be "image_url" to identify this as image content :param image_url: Image URL specification and processing details properties: type: const: image_url default: image_url title: Type type: string image_url: $ref: '#/$defs/OpenAIImageURL' required: - image_url title: >- OpenAIChatCompletionContentPartImageParam type: object OpenAIChatCompletionContentPartTextParam: description: >- Text content part for OpenAI-compatible chat completion messages. :param type: Must be "text" to identify this as text content :param text: The text content of the message properties: type: const: text default: text title: Type type: string text: title: Text type: string required: - text title: OpenAIChatCompletionContentPartTextParam type: object OpenAIChatCompletionToolCall: description: >- Tool call specification for OpenAI-compatible chat completion responses. :param index: (Optional) Index of the tool call in the list :param id: (Optional) Unique identifier for the tool call :param type: Must be "function" to identify this as a function call :param function: (Optional) Function call details properties: index: anyOf: - type: integer - type: 'null' title: Index id: anyOf: - type: string - type: 'null' title: Id type: const: function default: function title: Type type: string function: anyOf: - $ref: >- #/$defs/OpenAIChatCompletionToolCallFunction - type: 'null' title: OpenAIChatCompletionToolCall type: object OpenAIChatCompletionToolCallFunction: description: >- Function call details for OpenAI-compatible tool calls. :param name: (Optional) Name of the function to call :param arguments: (Optional) Arguments to pass to the function as a JSON string properties: name: anyOf: - type: string - type: 'null' title: Name arguments: anyOf: - type: string - type: 'null' title: Arguments title: OpenAIChatCompletionToolCallFunction type: object OpenAIChatCompletionUsage: description: >- Usage information for OpenAI chat completion. :param prompt_tokens: Number of tokens in the prompt :param completion_tokens: Number of tokens in the completion :param total_tokens: Total tokens used (prompt + completion) :param input_tokens_details: Detailed breakdown of input token usage :param output_tokens_details: Detailed breakdown of output token usage properties: prompt_tokens: title: Prompt Tokens type: integer completion_tokens: title: Completion Tokens type: integer total_tokens: title: Total Tokens type: integer prompt_tokens_details: anyOf: - $ref: >- #/$defs/OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' completion_tokens_details: anyOf: - $ref: >- #/$defs/OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' required: - prompt_tokens - completion_tokens - total_tokens title: OpenAIChatCompletionUsage type: object "OpenAIChatCompletionUsageCompletionTokensDetails": description: >- Token details for output tokens in OpenAI chat completion usage. :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models) properties: reasoning_tokens: anyOf: - type: integer - type: 'null' title: Reasoning Tokens title: >- OpenAIChatCompletionUsageCompletionTokensDetails type: object "OpenAIChatCompletionUsagePromptTokensDetails": description: >- Token details for prompt tokens in OpenAI chat completion usage. :param cached_tokens: Number of tokens retrieved from cache properties: cached_tokens: anyOf: - type: integer - type: 'null' title: Cached Tokens title: >- OpenAIChatCompletionUsagePromptTokensDetails type: object OpenAIChoice: description: >- A choice from an OpenAI-compatible chat completion response. :param message: The message from the model :param finish_reason: The reason the model stopped generating :param index: The index of the choice :param logprobs: (Optional) The log probabilities for the tokens in the message properties: message: discriminator: mapping: assistant: '#/$defs/OpenAIAssistantMessageParam' developer: '#/$defs/OpenAIDeveloperMessageParam' system: '#/$defs/OpenAISystemMessageParam' tool: '#/$defs/OpenAIToolMessageParam' user: '#/$defs/OpenAIUserMessageParam' propertyName: role oneOf: - $ref: '#/$defs/OpenAIUserMessageParam' - $ref: '#/$defs/OpenAISystemMessageParam' - $ref: '#/$defs/OpenAIAssistantMessageParam' - $ref: '#/$defs/OpenAIToolMessageParam' - $ref: '#/$defs/OpenAIDeveloperMessageParam' title: Message finish_reason: title: Finish Reason type: string index: title: Index type: integer logprobs: anyOf: - $ref: '#/$defs/OpenAIChoiceLogprobs' - type: 'null' required: - message - finish_reason - index title: OpenAIChoice type: object OpenAIChoiceLogprobs: description: >- The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. :param content: (Optional) The log probabilities for the tokens in the message :param refusal: (Optional) The log probabilities for the tokens in the message properties: content: anyOf: - items: $ref: '#/$defs/OpenAITokenLogProb' type: array - type: 'null' title: Content refusal: anyOf: - items: $ref: '#/$defs/OpenAITokenLogProb' type: array - type: 'null' title: Refusal title: OpenAIChoiceLogprobs type: object OpenAICompletionWithInputMessages: properties: id: title: Id type: string choices: items: $ref: '#/$defs/OpenAIChoice' title: Choices type: array object: const: chat.completion default: chat.completion title: Object type: string created: title: Created type: integer model: title: Model type: string usage: anyOf: - $ref: '#/$defs/OpenAIChatCompletionUsage' - type: 'null' input_messages: items: discriminator: mapping: assistant: '#/$defs/OpenAIAssistantMessageParam' developer: '#/$defs/OpenAIDeveloperMessageParam' system: '#/$defs/OpenAISystemMessageParam' tool: '#/$defs/OpenAIToolMessageParam' user: '#/$defs/OpenAIUserMessageParam' propertyName: role oneOf: - $ref: '#/$defs/OpenAIUserMessageParam' - $ref: '#/$defs/OpenAISystemMessageParam' - $ref: '#/$defs/OpenAIAssistantMessageParam' - $ref: '#/$defs/OpenAIToolMessageParam' - $ref: '#/$defs/OpenAIDeveloperMessageParam' title: Input Messages type: array required: - id - choices - created - model - input_messages title: OpenAICompletionWithInputMessages type: object OpenAIDeveloperMessageParam: description: >- A message from the developer in an OpenAI-compatible chat completion request. :param role: Must be "developer" to identify this as a developer message :param content: The content of the developer message :param name: (Optional) The name of the developer message participant. properties: role: const: developer default: developer title: Role type: string content: anyOf: - type: string - items: $ref: >- #/$defs/OpenAIChatCompletionContentPartTextParam type: array title: Content name: anyOf: - type: string - type: 'null' title: Name required: - content title: OpenAIDeveloperMessageParam type: object OpenAIFile: properties: type: const: file default: file title: Type type: string file: $ref: '#/$defs/OpenAIFileFile' required: - file title: OpenAIFile type: object OpenAIFileFile: properties: file_data: anyOf: - type: string - type: 'null' title: File Data file_id: anyOf: - type: string - type: 'null' title: File Id filename: anyOf: - type: string - type: 'null' title: Filename title: OpenAIFileFile type: object OpenAIImageURL: description: >- Image URL specification for OpenAI-compatible chat completion messages. :param url: URL of the image to include in the message :param detail: (Optional) Level of detail for image processing. Can be "low", "high", or "auto" properties: url: title: Url type: string detail: anyOf: - type: string - type: 'null' title: Detail required: - url title: OpenAIImageURL type: object OpenAISystemMessageParam: description: >- A system message providing instructions or context to the model. :param role: Must be "system" to identify this as a system message :param content: The content of the "system prompt". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions). :param name: (Optional) The name of the system message participant. properties: role: const: system default: system title: Role type: string content: anyOf: - type: string - items: $ref: >- #/$defs/OpenAIChatCompletionContentPartTextParam type: array title: Content name: anyOf: - type: string - type: 'null' title: Name required: - content title: OpenAISystemMessageParam type: object OpenAITokenLogProb: description: >- The log probability for a token from an OpenAI-compatible chat completion response. :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token :top_logprobs: The top log probabilities for the token properties: token: title: Token type: string bytes: anyOf: - items: type: integer type: array - type: 'null' title: Bytes logprob: title: Logprob type: number top_logprobs: items: $ref: '#/$defs/OpenAITopLogProb' title: Top Logprobs type: array required: - token - logprob - top_logprobs title: OpenAITokenLogProb type: object OpenAIToolMessageParam: description: >- A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. :param role: Must be "tool" to identify this as a tool response :param tool_call_id: Unique identifier for the tool call this response is for :param content: The response content from the tool properties: role: const: tool default: tool title: Role type: string tool_call_id: title: Tool Call Id type: string content: anyOf: - type: string - items: $ref: >- #/$defs/OpenAIChatCompletionContentPartTextParam type: array title: Content required: - tool_call_id - content title: OpenAIToolMessageParam type: object OpenAITopLogProb: description: >- The top log probability for a token from an OpenAI-compatible chat completion response. :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token properties: token: title: Token type: string bytes: anyOf: - items: type: integer type: array - type: 'null' title: Bytes logprob: title: Logprob type: number required: - token - logprob title: OpenAITopLogProb type: object OpenAIUserMessageParam: description: >- A message from the user in an OpenAI-compatible chat completion request. :param role: Must be "user" to identify this as a user message :param content: The content of the message, which can include text and other media :param name: (Optional) The name of the user message participant. properties: role: const: user default: user title: Role type: string content: anyOf: - type: string - items: discriminator: mapping: file: '#/$defs/OpenAIFile' image_url: >- #/$defs/OpenAIChatCompletionContentPartImageParam text: >- #/$defs/OpenAIChatCompletionContentPartTextParam propertyName: type oneOf: - $ref: >- #/$defs/OpenAIChatCompletionContentPartTextParam - $ref: >- #/$defs/OpenAIChatCompletionContentPartImageParam - $ref: '#/$defs/OpenAIFile' type: array title: Content name: anyOf: - type: string - type: 'null' title: Name required: - content title: OpenAIUserMessageParam type: object description: >- Response from listing OpenAI-compatible chat completions. :param data: List of chat completion objects with their input messages :param has_more: Whether there are more completions available beyond this list :param first_id: ID of the first completion in this list :param last_id: ID of the last completion in this list :param object: Must be "list" to identify this as a list response properties: data: items: $ref: >- #/$defs/OpenAICompletionWithInputMessages title: Data type: array has_more: title: Has More type: boolean first_id: title: First Id type: string last_id: title: Last Id type: string object: const: list default: list title: Object type: string required: - data - has_more - first_id - last_id title: ListOpenAIChatCompletionResponse type: object Annotated: type: object ? >- llama_stack.apis.inference.inference.OpenAIChatCompletion | collections.abc.AsyncIterator[llama_stack.apis.inference.inference.OpenAIChatCompletionChunk] : type: object OpenAICompletionWithInputMessages: $defs: OpenAIAssistantMessageParam: description: >- A message containing the model's (assistant) response in an OpenAI-compatible chat completion request. :param role: Must be "assistant" to identify this as the model's response :param content: The content of the model's response :param name: (Optional) The name of the assistant message participant. :param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object. properties: role: const: assistant default: assistant title: Role type: string content: anyOf: - type: string - items: $ref: >- #/$defs/OpenAIChatCompletionContentPartTextParam type: array - type: 'null' title: Content name: anyOf: - type: string - type: 'null' title: Name tool_calls: anyOf: - items: $ref: '#/$defs/OpenAIChatCompletionToolCall' type: array - type: 'null' title: Tool Calls title: OpenAIAssistantMessageParam type: object "OpenAIChatCompletionContentPartImageParam": description: >- Image content part for OpenAI-compatible chat completion messages. :param type: Must be "image_url" to identify this as image content :param image_url: Image URL specification and processing details properties: type: const: image_url default: image_url title: Type type: string image_url: $ref: '#/$defs/OpenAIImageURL' required: - image_url title: >- OpenAIChatCompletionContentPartImageParam type: object OpenAIChatCompletionContentPartTextParam: description: >- Text content part for OpenAI-compatible chat completion messages. :param type: Must be "text" to identify this as text content :param text: The text content of the message properties: type: const: text default: text title: Type type: string text: title: Text type: string required: - text title: OpenAIChatCompletionContentPartTextParam type: object OpenAIChatCompletionToolCall: description: >- Tool call specification for OpenAI-compatible chat completion responses. :param index: (Optional) Index of the tool call in the list :param id: (Optional) Unique identifier for the tool call :param type: Must be "function" to identify this as a function call :param function: (Optional) Function call details properties: index: anyOf: - type: integer - type: 'null' title: Index id: anyOf: - type: string - type: 'null' title: Id type: const: function default: function title: Type type: string function: anyOf: - $ref: >- #/$defs/OpenAIChatCompletionToolCallFunction - type: 'null' title: OpenAIChatCompletionToolCall type: object OpenAIChatCompletionToolCallFunction: description: >- Function call details for OpenAI-compatible tool calls. :param name: (Optional) Name of the function to call :param arguments: (Optional) Arguments to pass to the function as a JSON string properties: name: anyOf: - type: string - type: 'null' title: Name arguments: anyOf: - type: string - type: 'null' title: Arguments title: OpenAIChatCompletionToolCallFunction type: object OpenAIChatCompletionUsage: description: >- Usage information for OpenAI chat completion. :param prompt_tokens: Number of tokens in the prompt :param completion_tokens: Number of tokens in the completion :param total_tokens: Total tokens used (prompt + completion) :param input_tokens_details: Detailed breakdown of input token usage :param output_tokens_details: Detailed breakdown of output token usage properties: prompt_tokens: title: Prompt Tokens type: integer completion_tokens: title: Completion Tokens type: integer total_tokens: title: Total Tokens type: integer prompt_tokens_details: anyOf: - $ref: >- #/$defs/OpenAIChatCompletionUsagePromptTokensDetails - type: 'null' completion_tokens_details: anyOf: - $ref: >- #/$defs/OpenAIChatCompletionUsageCompletionTokensDetails - type: 'null' required: - prompt_tokens - completion_tokens - total_tokens title: OpenAIChatCompletionUsage type: object "OpenAIChatCompletionUsageCompletionTokensDetails": description: >- Token details for output tokens in OpenAI chat completion usage. :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models) properties: reasoning_tokens: anyOf: - type: integer - type: 'null' title: Reasoning Tokens title: >- OpenAIChatCompletionUsageCompletionTokensDetails type: object "OpenAIChatCompletionUsagePromptTokensDetails": description: >- Token details for prompt tokens in OpenAI chat completion usage. :param cached_tokens: Number of tokens retrieved from cache properties: cached_tokens: anyOf: - type: integer - type: 'null' title: Cached Tokens title: >- OpenAIChatCompletionUsagePromptTokensDetails type: object OpenAIChoice: description: >- A choice from an OpenAI-compatible chat completion response. :param message: The message from the model :param finish_reason: The reason the model stopped generating :param index: The index of the choice :param logprobs: (Optional) The log probabilities for the tokens in the message properties: message: discriminator: mapping: assistant: '#/$defs/OpenAIAssistantMessageParam' developer: '#/$defs/OpenAIDeveloperMessageParam' system: '#/$defs/OpenAISystemMessageParam' tool: '#/$defs/OpenAIToolMessageParam' user: '#/$defs/OpenAIUserMessageParam' propertyName: role oneOf: - $ref: '#/$defs/OpenAIUserMessageParam' - $ref: '#/$defs/OpenAISystemMessageParam' - $ref: '#/$defs/OpenAIAssistantMessageParam' - $ref: '#/$defs/OpenAIToolMessageParam' - $ref: '#/$defs/OpenAIDeveloperMessageParam' title: Message finish_reason: title: Finish Reason type: string index: title: Index type: integer logprobs: anyOf: - $ref: '#/$defs/OpenAIChoiceLogprobs' - type: 'null' required: - message - finish_reason - index title: OpenAIChoice type: object OpenAIChoiceLogprobs: description: >- The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. :param content: (Optional) The log probabilities for the tokens in the message :param refusal: (Optional) The log probabilities for the tokens in the message properties: content: anyOf: - items: $ref: '#/$defs/OpenAITokenLogProb' type: array - type: 'null' title: Content refusal: anyOf: - items: $ref: '#/$defs/OpenAITokenLogProb' type: array - type: 'null' title: Refusal title: OpenAIChoiceLogprobs type: object OpenAIDeveloperMessageParam: description: >- A message from the developer in an OpenAI-compatible chat completion request. :param role: Must be "developer" to identify this as a developer message :param content: The content of the developer message :param name: (Optional) The name of the developer message participant. properties: role: const: developer default: developer title: Role type: string content: anyOf: - type: string - items: $ref: >- #/$defs/OpenAIChatCompletionContentPartTextParam type: array title: Content name: anyOf: - type: string - type: 'null' title: Name required: - content title: OpenAIDeveloperMessageParam type: object OpenAIFile: properties: type: const: file default: file title: Type type: string file: $ref: '#/$defs/OpenAIFileFile' required: - file title: OpenAIFile type: object OpenAIFileFile: properties: file_data: anyOf: - type: string - type: 'null' title: File Data file_id: anyOf: - type: string - type: 'null' title: File Id filename: anyOf: - type: string - type: 'null' title: Filename title: OpenAIFileFile type: object OpenAIImageURL: description: >- Image URL specification for OpenAI-compatible chat completion messages. :param url: URL of the image to include in the message :param detail: (Optional) Level of detail for image processing. Can be "low", "high", or "auto" properties: url: title: Url type: string detail: anyOf: - type: string - type: 'null' title: Detail required: - url title: OpenAIImageURL type: object OpenAISystemMessageParam: description: >- A system message providing instructions or context to the model. :param role: Must be "system" to identify this as a system message :param content: The content of the "system prompt". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions). :param name: (Optional) The name of the system message participant. properties: role: const: system default: system title: Role type: string content: anyOf: - type: string - items: $ref: >- #/$defs/OpenAIChatCompletionContentPartTextParam type: array title: Content name: anyOf: - type: string - type: 'null' title: Name required: - content title: OpenAISystemMessageParam type: object OpenAITokenLogProb: description: >- The log probability for a token from an OpenAI-compatible chat completion response. :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token :top_logprobs: The top log probabilities for the token properties: token: title: Token type: string bytes: anyOf: - items: type: integer type: array - type: 'null' title: Bytes logprob: title: Logprob type: number top_logprobs: items: $ref: '#/$defs/OpenAITopLogProb' title: Top Logprobs type: array required: - token - logprob - top_logprobs title: OpenAITokenLogProb type: object OpenAIToolMessageParam: description: >- A message representing the result of a tool invocation in an OpenAI-compatible chat completion request. :param role: Must be "tool" to identify this as a tool response :param tool_call_id: Unique identifier for the tool call this response is for :param content: The response content from the tool properties: role: const: tool default: tool title: Role type: string tool_call_id: title: Tool Call Id type: string content: anyOf: - type: string - items: $ref: >- #/$defs/OpenAIChatCompletionContentPartTextParam type: array title: Content required: - tool_call_id - content title: OpenAIToolMessageParam type: object OpenAITopLogProb: description: >- The top log probability for a token from an OpenAI-compatible chat completion response. :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token properties: token: title: Token type: string bytes: anyOf: - items: type: integer type: array - type: 'null' title: Bytes logprob: title: Logprob type: number required: - token - logprob title: OpenAITopLogProb type: object OpenAIUserMessageParam: description: >- A message from the user in an OpenAI-compatible chat completion request. :param role: Must be "user" to identify this as a user message :param content: The content of the message, which can include text and other media :param name: (Optional) The name of the user message participant. properties: role: const: user default: user title: Role type: string content: anyOf: - type: string - items: discriminator: mapping: file: '#/$defs/OpenAIFile' image_url: >- #/$defs/OpenAIChatCompletionContentPartImageParam text: >- #/$defs/OpenAIChatCompletionContentPartTextParam propertyName: type oneOf: - $ref: >- #/$defs/OpenAIChatCompletionContentPartTextParam - $ref: >- #/$defs/OpenAIChatCompletionContentPartImageParam - $ref: '#/$defs/OpenAIFile' type: array title: Content name: anyOf: - type: string - type: 'null' title: Name required: - content title: OpenAIUserMessageParam type: object properties: id: title: Id type: string choices: items: $ref: '#/$defs/OpenAIChoice' title: Choices type: array object: const: chat.completion default: chat.completion title: Object type: string created: title: Created type: integer model: title: Model type: string usage: anyOf: - $ref: '#/$defs/OpenAIChatCompletionUsage' - type: 'null' input_messages: items: discriminator: mapping: assistant: '#/$defs/OpenAIAssistantMessageParam' developer: '#/$defs/OpenAIDeveloperMessageParam' system: '#/$defs/OpenAISystemMessageParam' tool: '#/$defs/OpenAIToolMessageParam' user: '#/$defs/OpenAIUserMessageParam' propertyName: role oneOf: - $ref: '#/$defs/OpenAIUserMessageParam' - $ref: '#/$defs/OpenAISystemMessageParam' - $ref: '#/$defs/OpenAIAssistantMessageParam' - $ref: '#/$defs/OpenAIToolMessageParam' - $ref: '#/$defs/OpenAIDeveloperMessageParam' title: Input Messages type: array required: - id - choices - created - model - input_messages title: OpenAICompletionWithInputMessages type: object OpenAICompletion: $defs: OpenAIChoiceLogprobs: description: >- The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response. :param content: (Optional) The log probabilities for the tokens in the message :param refusal: (Optional) The log probabilities for the tokens in the message properties: content: anyOf: - items: $ref: '#/$defs/OpenAITokenLogProb' type: array - type: 'null' title: Content refusal: anyOf: - items: $ref: '#/$defs/OpenAITokenLogProb' type: array - type: 'null' title: Refusal title: OpenAIChoiceLogprobs type: object OpenAICompletionChoice: description: >- A choice from an OpenAI-compatible completion response. :finish_reason: The reason the model stopped generating :text: The text of the choice :index: The index of the choice :logprobs: (Optional) The log probabilities for the tokens in the choice properties: finish_reason: title: Finish Reason type: string text: title: Text type: string index: title: Index type: integer logprobs: anyOf: - $ref: '#/$defs/OpenAIChoiceLogprobs' - type: 'null' required: - finish_reason - text - index title: OpenAICompletionChoice type: object OpenAITokenLogProb: description: >- The log probability for a token from an OpenAI-compatible chat completion response. :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token :top_logprobs: The top log probabilities for the token properties: token: title: Token type: string bytes: anyOf: - items: type: integer type: array - type: 'null' title: Bytes logprob: title: Logprob type: number top_logprobs: items: $ref: '#/$defs/OpenAITopLogProb' title: Top Logprobs type: array required: - token - logprob - top_logprobs title: OpenAITokenLogProb type: object OpenAITopLogProb: description: >- The top log probability for a token from an OpenAI-compatible chat completion response. :token: The token :bytes: (Optional) The bytes for the token :logprob: The log probability of the token properties: token: title: Token type: string bytes: anyOf: - items: type: integer type: array - type: 'null' title: Bytes logprob: title: Logprob type: number required: - token - logprob title: OpenAITopLogProb type: object description: >- Response from an OpenAI-compatible completion request. :id: The ID of the completion :choices: List of choices :created: The Unix timestamp in seconds when the completion was created :model: The model that was used to generate the completion :object: The object type, which will be "text_completion" properties: id: title: Id type: string choices: items: $ref: '#/$defs/OpenAICompletionChoice' title: Choices type: array created: title: Created type: integer model: title: Model type: string object: const: text_completion default: text_completion title: Object type: string required: - id - choices - created - model title: OpenAICompletion type: object properties: finish_reason: type: string text: type: string index: type: integer logprobs: $ref: '#/components/schemas/OpenAIChoiceLogprobs' additionalProperties: false required: - finish_reason - text - index title: OpenAICompletionChoice description: >- A choice from an OpenAI-compatible completion response. ConversationItem: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' discriminator: propertyName: type mapping: message: '#/components/schemas/OpenAIResponseMessage' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' OpenAIResponseAnnotationCitation: type: object properties: type: type: string const: url_citation default: url_citation description: >- Annotation type identifier, always "url_citation" end_index: type: integer description: >- End position of the citation span in the content start_index: type: integer description: >- Start position of the citation span in the content title: type: string description: Title of the referenced web resource url: type: string description: URL of the referenced web resource additionalProperties: false required: - type - end_index - start_index - title - url title: OpenAIResponseAnnotationCitation description: >- URL citation annotation for referencing external web resources. "OpenAIResponseAnnotationContainerFileCitation": type: object properties: type: type: string const: container_file_citation default: container_file_citation container_id: type: string end_index: type: integer file_id: type: string filename: type: string start_index: type: integer additionalProperties: false required: - type - container_id - end_index - file_id - filename - start_index title: >- OpenAIResponseAnnotationContainerFileCitation OpenAIResponseAnnotationFileCitation: type: object properties: type: type: string const: file_citation default: file_citation description: >- Annotation type identifier, always "file_citation" file_id: type: string description: Unique identifier of the referenced file filename: type: string description: Name of the referenced file index: type: integer description: >- Position index of the citation within the content additionalProperties: false required: - type - file_id - filename - index title: OpenAIResponseAnnotationFileCitation description: >- File citation annotation for referencing specific files in response content. OpenAIResponseAnnotationFilePath: type: object properties: type: type: string const: file_path default: file_path file_id: type: string index: type: integer additionalProperties: false required: - type - file_id - index title: OpenAIResponseAnnotationFilePath OpenAIResponseAnnotations: oneOf: - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' discriminator: propertyName: type mapping: file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' OpenAIResponseContentPartRefusal: type: object properties: type: type: string const: refusal default: refusal description: >- Content part type identifier, always "refusal" refusal: type: string description: Refusal text supplied by the model additionalProperties: false required: - type - refusal title: OpenAIResponseContentPartRefusal description: >- Refusal content within a streamed response part. "OpenAIResponseInputFunctionToolCallOutput": type: object properties: call_id: type: string output: type: string type: type: string const: function_call_output default: function_call_output id: type: string status: type: string additionalProperties: false required: - call_id - output - type title: >- OpenAIResponseInputFunctionToolCallOutput description: >- This represents the output of a function call that gets passed back to the model. OpenAIResponseInputMessageContent: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' discriminator: propertyName: type mapping: input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' OpenAIResponseInputMessageContentFile: type: object properties: type: type: string const: input_file default: input_file description: >- The type of the input item. Always `input_file`. file_data: type: string description: >- The data of the file to be sent to the model. file_id: type: string description: >- (Optional) The ID of the file to be sent to the model. file_url: type: string description: >- The URL of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. additionalProperties: false required: - type title: OpenAIResponseInputMessageContentFile description: >- File content for input messages in OpenAI response format. OpenAIResponseInputMessageContentImage: type: object properties: detail: oneOf: - type: string const: low - type: string const: high - type: string const: auto default: auto description: >- Level of detail for image processing, can be "low", "high", or "auto" type: type: string const: input_image default: input_image description: >- Content type identifier, always "input_image" file_id: type: string description: >- (Optional) The ID of the file to be sent to the model. image_url: type: string description: (Optional) URL of the image content additionalProperties: false required: - detail - type title: OpenAIResponseInputMessageContentImage description: >- Image content for input messages in OpenAI response format. OpenAIResponseInputMessageContentText: type: object properties: text: type: string description: The text content of the input message type: type: string const: input_text default: input_text description: >- Content type identifier, always "input_text" additionalProperties: false required: - text - type title: OpenAIResponseInputMessageContentText description: >- Text content for input messages in OpenAI response format. OpenAIResponseMCPApprovalRequest: type: object properties: arguments: type: string id: type: string name: type: string server_label: type: string type: type: string const: mcp_approval_request default: mcp_approval_request additionalProperties: false required: - arguments - id - name - server_label - type title: OpenAIResponseMCPApprovalRequest description: >- A request for human approval of a tool invocation. OpenAIResponseMCPApprovalResponse: type: object properties: approval_request_id: type: string approve: type: boolean type: type: string const: mcp_approval_response default: mcp_approval_response id: type: string reason: type: string additionalProperties: false required: - approval_request_id - approve - type title: OpenAIResponseMCPApprovalResponse description: A response to an MCP approval request. OpenAIResponseMessage: type: object properties: content: oneOf: - type: string - type: array items: $ref: '#/components/schemas/OpenAIResponseInputMessageContent' - type: array items: $ref: '#/components/schemas/OpenAIResponseOutputMessageContent' role: oneOf: - type: string const: system - type: string const: developer - type: string const: user - type: string const: assistant type: type: string const: message default: message id: type: string status: type: string additionalProperties: false required: - content - role - type title: OpenAIResponseMessage description: >- Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios. OpenAIResponseOutputMessageContent: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' discriminator: propertyName: type mapping: output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' "OpenAIResponseOutputMessageContentOutputText": type: object properties: text: type: string type: type: string const: output_text default: output_text annotations: type: array items: $ref: '#/components/schemas/OpenAIResponseAnnotations' additionalProperties: false required: - text - type - annotations title: >- OpenAIResponseOutputMessageContentOutputText "OpenAIResponseOutputMessageFileSearchToolCall": type: object properties: id: type: string description: Unique identifier for this tool call queries: type: array items: type: string description: List of search queries executed status: type: string description: >- Current status of the file search operation type: type: string const: file_search_call default: file_search_call description: >- Tool call type identifier, always "file_search_call" results: type: array items: type: object properties: attributes: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- (Optional) Key-value attributes associated with the file file_id: type: string description: >- Unique identifier of the file containing the result filename: type: string description: Name of the file containing the result score: type: number description: >- Relevance score for this search result (between 0 and 1) text: type: string description: Text content of the search result additionalProperties: false required: - attributes - file_id - filename - score - text title: >- OpenAIResponseOutputMessageFileSearchToolCallResults description: >- Search results returned by the file search operation. description: >- (Optional) Search results returned by the file search operation additionalProperties: false required: - id - queries - status - type title: >- OpenAIResponseOutputMessageFileSearchToolCall description: >- File search tool call output message for OpenAI responses. "OpenAIResponseOutputMessageFunctionToolCall": type: object properties: call_id: type: string description: Unique identifier for the function call name: type: string description: Name of the function being called arguments: type: string description: >- JSON string containing the function arguments type: type: string const: function_call default: function_call description: >- Tool call type identifier, always "function_call" id: type: string description: >- (Optional) Additional identifier for the tool call status: type: string description: >- (Optional) Current status of the function call execution additionalProperties: false required: - call_id - name - arguments - type title: >- OpenAIResponseOutputMessageFunctionToolCall description: >- Function tool call output message for OpenAI responses. OpenAIResponseOutputMessageMCPCall: type: object properties: id: type: string description: Unique identifier for this MCP call type: type: string const: mcp_call default: mcp_call description: >- Tool call type identifier, always "mcp_call" arguments: type: string description: >- JSON string containing the MCP call arguments name: type: string description: Name of the MCP method being called server_label: type: string description: >- Label identifying the MCP server handling the call error: type: string description: >- (Optional) Error message if the MCP call failed output: type: string description: >- (Optional) Output result from the successful MCP call additionalProperties: false required: - id - type - arguments - name - server_label title: OpenAIResponseOutputMessageMCPCall description: >- Model Context Protocol (MCP) call output message for OpenAI responses. OpenAIResponseOutputMessageMCPListTools: type: object properties: id: type: string description: >- Unique identifier for this MCP list tools operation type: type: string const: mcp_list_tools default: mcp_list_tools description: >- Tool call type identifier, always "mcp_list_tools" server_label: type: string description: >- Label identifying the MCP server providing the tools tools: type: array items: type: object properties: input_schema: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- JSON schema defining the tool's input parameters name: type: string description: Name of the tool description: type: string description: >- (Optional) Description of what the tool does additionalProperties: false required: - input_schema - name title: MCPListToolsTool description: >- Tool definition returned by MCP list tools operation. description: >- List of available tools provided by the MCP server additionalProperties: false required: - id - type - server_label - tools title: OpenAIResponseOutputMessageMCPListTools description: >- MCP list tools output message containing available tools from an MCP server. "OpenAIResponseOutputMessageWebSearchToolCall": type: object properties: id: type: string description: Unique identifier for this tool call status: type: string description: >- Current status of the web search operation type: type: string const: web_search_call default: web_search_call description: >- Tool call type identifier, always "web_search_call" additionalProperties: false required: - id - status - type title: >- OpenAIResponseOutputMessageWebSearchToolCall description: >- Web search tool call output message for OpenAI responses. CreateConversationRequest: type: object Conversation: description: OpenAI-compatible conversation object. properties: id: description: The unique ID of the conversation. title: Id type: string object: const: conversation default: conversation description: >- The object type, which is always conversation. title: Object type: string created_at: description: >- The time at which the conversation was created, measured in seconds since the Unix epoch. title: Created At type: integer metadata: anyOf: - additionalProperties: type: string type: object - type: 'null' description: >- Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. title: Metadata items: anyOf: - items: additionalProperties: true type: object type: array - type: 'null' description: >- Initial items to include in the conversation context. You may add up to 20 items at a time. title: Items required: - id - created_at title: Conversation type: object UpdateConversationRequest: type: object ConversationDeletedResource: description: Response for deleted conversation. properties: id: description: The deleted conversation identifier title: Id type: string object: default: conversation.deleted description: Object type title: Object type: string deleted: default: true description: Whether the object was deleted title: Deleted type: boolean required: - id title: ConversationDeletedResource type: object list: type: object Literal: type: object ConversationItemList: $defs: MCPListToolsTool: description: >- Tool definition returned by MCP list tools operation. :param input_schema: JSON schema defining the tool's input parameters :param name: Name of the tool :param description: (Optional) Description of what the tool does properties: input_schema: additionalProperties: true title: Input Schema type: object name: title: Name type: string description: anyOf: - type: string - type: 'null' title: Description required: - input_schema - name title: MCPListToolsTool type: object OpenAIResponseAnnotationCitation: description: >- URL citation annotation for referencing external web resources. :param type: Annotation type identifier, always "url_citation" :param end_index: End position of the citation span in the content :param start_index: Start position of the citation span in the content :param title: Title of the referenced web resource :param url: URL of the referenced web resource properties: type: const: url_citation default: url_citation title: Type type: string end_index: title: End Index type: integer start_index: title: Start Index type: integer title: title: Title type: string url: title: Url type: string required: - end_index - start_index - title - url title: OpenAIResponseAnnotationCitation type: object "OpenAIResponseAnnotationContainerFileCitation": properties: type: const: container_file_citation default: container_file_citation title: Type type: string container_id: title: Container Id type: string end_index: title: End Index type: integer file_id: title: File Id type: string filename: title: Filename type: string start_index: title: Start Index type: integer required: - container_id - end_index - file_id - filename - start_index title: >- OpenAIResponseAnnotationContainerFileCitation type: object OpenAIResponseAnnotationFileCitation: description: >- File citation annotation for referencing specific files in response content. :param type: Annotation type identifier, always "file_citation" :param file_id: Unique identifier of the referenced file :param filename: Name of the referenced file :param index: Position index of the citation within the content properties: type: const: file_citation default: file_citation title: Type type: string file_id: title: File Id type: string filename: title: Filename type: string index: title: Index type: integer required: - file_id - filename - index title: OpenAIResponseAnnotationFileCitation type: object OpenAIResponseAnnotationFilePath: properties: type: const: file_path default: file_path title: Type type: string file_id: title: File Id type: string index: title: Index type: integer required: - file_id - index title: OpenAIResponseAnnotationFilePath type: object OpenAIResponseContentPartRefusal: description: >- Refusal content within a streamed response part. :param type: Content part type identifier, always "refusal" :param refusal: Refusal text supplied by the model properties: type: const: refusal default: refusal title: Type type: string refusal: title: Refusal type: string required: - refusal title: OpenAIResponseContentPartRefusal type: object "OpenAIResponseInputFunctionToolCallOutput": description: >- This represents the output of a function call that gets passed back to the model. properties: call_id: title: Call Id type: string output: title: Output type: string type: const: function_call_output default: function_call_output title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - call_id - output title: >- OpenAIResponseInputFunctionToolCallOutput type: object OpenAIResponseInputMessageContentImage: description: >- Image content for input messages in OpenAI response format. :param detail: Level of detail for image processing, can be "low", "high", or "auto" :param type: Content type identifier, always "input_image" :param image_url: (Optional) URL of the image content properties: detail: anyOf: - const: low type: string - const: high type: string - const: auto type: string default: auto title: Detail type: const: input_image default: input_image title: Type type: string image_url: anyOf: - type: string - type: 'null' title: Image Url title: OpenAIResponseInputMessageContentImage type: object OpenAIResponseInputMessageContentText: description: >- Text content for input messages in OpenAI response format. :param text: The text content of the input message :param type: Content type identifier, always "input_text" properties: text: title: Text type: string type: const: input_text default: input_text title: Type type: string required: - text title: OpenAIResponseInputMessageContentText type: object OpenAIResponseMCPApprovalRequest: description: >- A request for human approval of a tool invocation. properties: arguments: title: Arguments type: string id: title: Id type: string name: title: Name type: string server_label: title: Server Label type: string type: const: mcp_approval_request default: mcp_approval_request title: Type type: string required: - arguments - id - name - server_label title: OpenAIResponseMCPApprovalRequest type: object OpenAIResponseMCPApprovalResponse: description: A response to an MCP approval request. properties: approval_request_id: title: Approval Request Id type: string approve: title: Approve type: boolean type: const: mcp_approval_response default: mcp_approval_response title: Type type: string id: anyOf: - type: string - type: 'null' title: Id reason: anyOf: - type: string - type: 'null' title: Reason required: - approval_request_id - approve title: OpenAIResponseMCPApprovalResponse type: object OpenAIResponseMessage: description: >- Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios. properties: content: anyOf: - type: string - items: discriminator: mapping: input_image: >- #/$defs/OpenAIResponseInputMessageContentImage input_text: >- #/$defs/OpenAIResponseInputMessageContentText propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseInputMessageContentText - $ref: >- #/$defs/OpenAIResponseInputMessageContentImage type: array - items: discriminator: mapping: output_text: >- #/$defs/OpenAIResponseOutputMessageContentOutputText refusal: '#/$defs/OpenAIResponseContentPartRefusal' propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseOutputMessageContentOutputText - $ref: '#/$defs/OpenAIResponseContentPartRefusal' type: array title: Content role: anyOf: - const: system type: string - const: developer type: string - const: user type: string - const: assistant type: string title: Role type: const: message default: message title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - content - role title: OpenAIResponseMessage type: object "OpenAIResponseOutputMessageContentOutputText": properties: text: title: Text type: string type: const: output_text default: output_text title: Type type: string annotations: items: discriminator: mapping: container_file_citation: >- #/$defs/OpenAIResponseAnnotationContainerFileCitation file_citation: >- #/$defs/OpenAIResponseAnnotationFileCitation file_path: '#/$defs/OpenAIResponseAnnotationFilePath' url_citation: '#/$defs/OpenAIResponseAnnotationCitation' propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseAnnotationFileCitation - $ref: '#/$defs/OpenAIResponseAnnotationCitation' - $ref: >- #/$defs/OpenAIResponseAnnotationContainerFileCitation - $ref: '#/$defs/OpenAIResponseAnnotationFilePath' title: Annotations type: array required: - text title: >- OpenAIResponseOutputMessageContentOutputText type: object "OpenAIResponseOutputMessageFileSearchToolCall": description: >- File search tool call output message for OpenAI responses. :param id: Unique identifier for this tool call :param queries: List of search queries executed :param status: Current status of the file search operation :param type: Tool call type identifier, always "file_search_call" :param results: (Optional) Search results returned by the file search operation properties: id: title: Id type: string queries: items: type: string title: Queries type: array status: title: Status type: string type: const: file_search_call default: file_search_call title: Type type: string results: anyOf: - items: $ref: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCallResults type: array - type: 'null' title: Results required: - id - queries - status title: >- OpenAIResponseOutputMessageFileSearchToolCall type: object "OpenAIResponseOutputMessageFileSearchToolCallResults": description: >- Search results returned by the file search operation. :param attributes: (Optional) Key-value attributes associated with the file :param file_id: Unique identifier of the file containing the result :param filename: Name of the file containing the result :param score: Relevance score for this search result (between 0 and 1) :param text: Text content of the search result properties: attributes: additionalProperties: true title: Attributes type: object file_id: title: File Id type: string filename: title: Filename type: string score: title: Score type: number text: title: Text type: string required: - attributes - file_id - filename - score - text title: >- OpenAIResponseOutputMessageFileSearchToolCallResults type: object "OpenAIResponseOutputMessageFunctionToolCall": description: >- Function tool call output message for OpenAI responses. :param call_id: Unique identifier for the function call :param name: Name of the function being called :param arguments: JSON string containing the function arguments :param type: Tool call type identifier, always "function_call" :param id: (Optional) Additional identifier for the tool call :param status: (Optional) Current status of the function call execution properties: call_id: title: Call Id type: string name: title: Name type: string arguments: title: Arguments type: string type: const: function_call default: function_call title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - call_id - name - arguments title: >- OpenAIResponseOutputMessageFunctionToolCall type: object OpenAIResponseOutputMessageMCPCall: description: >- Model Context Protocol (MCP) call output message for OpenAI responses. :param id: Unique identifier for this MCP call :param type: Tool call type identifier, always "mcp_call" :param arguments: JSON string containing the MCP call arguments :param name: Name of the MCP method being called :param server_label: Label identifying the MCP server handling the call :param error: (Optional) Error message if the MCP call failed :param output: (Optional) Output result from the successful MCP call properties: id: title: Id type: string type: const: mcp_call default: mcp_call title: Type type: string arguments: title: Arguments type: string name: title: Name type: string server_label: title: Server Label type: string error: anyOf: - type: string - type: 'null' title: Error output: anyOf: - type: string - type: 'null' title: Output required: - id - arguments - name - server_label title: OpenAIResponseOutputMessageMCPCall type: object OpenAIResponseOutputMessageMCPListTools: description: >- MCP list tools output message containing available tools from an MCP server. :param id: Unique identifier for this MCP list tools operation :param type: Tool call type identifier, always "mcp_list_tools" :param server_label: Label identifying the MCP server providing the tools :param tools: List of available tools provided by the MCP server properties: id: title: Id type: string type: const: mcp_list_tools default: mcp_list_tools title: Type type: string server_label: title: Server Label type: string tools: items: $ref: '#/$defs/MCPListToolsTool' title: Tools type: array required: - id - server_label - tools title: OpenAIResponseOutputMessageMCPListTools type: object "OpenAIResponseOutputMessageWebSearchToolCall": description: >- Web search tool call output message for OpenAI responses. :param id: Unique identifier for this tool call :param status: Current status of the web search operation :param type: Tool call type identifier, always "web_search_call" properties: id: title: Id type: string status: title: Status type: string type: const: web_search_call default: web_search_call title: Type type: string required: - id - status title: >- OpenAIResponseOutputMessageWebSearchToolCall type: object description: >- List of conversation items with pagination. properties: object: default: list description: Object type title: Object type: string data: description: List of conversation items items: discriminator: mapping: file_search_call: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCall function_call: >- #/$defs/OpenAIResponseOutputMessageFunctionToolCall function_call_output: >- #/$defs/OpenAIResponseInputFunctionToolCallOutput mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' mcp_approval_response: >- #/$defs/OpenAIResponseMCPApprovalResponse mcp_call: >- #/$defs/OpenAIResponseOutputMessageMCPCall mcp_list_tools: >- #/$defs/OpenAIResponseOutputMessageMCPListTools message: '#/$defs/OpenAIResponseMessage' web_search_call: >- #/$defs/OpenAIResponseOutputMessageWebSearchToolCall propertyName: type oneOf: - $ref: '#/$defs/OpenAIResponseMessage' - $ref: >- #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageFunctionToolCall - $ref: >- #/$defs/OpenAIResponseInputFunctionToolCallOutput - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' - $ref: >- #/$defs/OpenAIResponseMCPApprovalResponse - $ref: >- #/$defs/OpenAIResponseOutputMessageMCPCall - $ref: >- #/$defs/OpenAIResponseOutputMessageMCPListTools title: Data type: array first_id: anyOf: - type: string - type: 'null' description: The ID of the first item in the list title: First Id last_id: anyOf: - type: string - type: 'null' description: The ID of the last item in the list title: Last Id has_more: default: false description: Whether there are more items available title: Has More type: boolean required: - data title: ConversationItemList type: object AddItemsRequest: type: object ConversationItemDeletedResource: description: Response for deleted conversation item. properties: id: description: The deleted item identifier title: Id type: string object: default: conversation.item.deleted description: Object type title: Object type: string deleted: default: true description: Whether the object was deleted title: Deleted type: boolean required: - id title: ConversationItemDeletedResource type: object OpenAIEmbeddingsResponse: $defs: OpenAIEmbeddingData: description: >- A single embedding data object from an OpenAI-compatible embeddings response. :param object: The object type, which will be "embedding" :param embedding: The embedding vector as a list of floats (when encoding_format="float") or as a base64-encoded string (when encoding_format="base64") :param index: The index of the embedding in the input list properties: object: const: embedding default: embedding title: Object type: string embedding: anyOf: - items: type: number type: array - type: string title: Embedding index: title: Index type: integer required: - embedding - index title: OpenAIEmbeddingData type: object OpenAIEmbeddingUsage: description: >- Usage information for an OpenAI-compatible embeddings response. :param prompt_tokens: The number of tokens in the input :param total_tokens: The total number of tokens used properties: prompt_tokens: title: Prompt Tokens type: integer total_tokens: title: Total Tokens type: integer required: - prompt_tokens - total_tokens title: OpenAIEmbeddingUsage type: object description: >- Response from an OpenAI-compatible embeddings request. :param object: The object type, which will be "list" :param data: List of embedding data objects :param model: The model that was used to generate the embeddings :param usage: Usage information properties: object: const: list default: list title: Object type: string data: items: $ref: '#/$defs/OpenAIEmbeddingData' title: Data type: array model: title: Model type: string usage: $ref: '#/$defs/OpenAIEmbeddingUsage' required: - data - model - usage title: OpenAIEmbeddingsResponse type: object OpenAIFilePurpose: type: object ListOpenAIFileResponse: $defs: OpenAIFileObject: description: >- OpenAI File object as defined in the OpenAI Files API. :param object: The object type, which is always "file" :param id: The file identifier, which can be referenced in the API endpoints :param bytes: The size of the file, in bytes :param created_at: The Unix timestamp (in seconds) for when the file was created :param expires_at: The Unix timestamp (in seconds) for when the file expires :param filename: The name of the file :param purpose: The intended purpose of the file properties: object: const: file default: file title: Object type: string id: title: Id type: string bytes: title: Bytes type: integer created_at: title: Created At type: integer expires_at: title: Expires At type: integer filename: title: Filename type: string purpose: $ref: '#/$defs/OpenAIFilePurpose' required: - id - bytes - created_at - expires_at - filename - purpose title: OpenAIFileObject type: object OpenAIFilePurpose: description: >- Valid purpose values for OpenAI Files API. enum: - assistants - batch title: OpenAIFilePurpose type: string description: >- Response for listing files in OpenAI Files API. :param data: List of file objects :param has_more: Whether there are more files available beyond this page :param first_id: ID of the first file in the list for pagination :param last_id: ID of the last file in the list for pagination :param object: The object type, which is always "list" properties: data: items: $ref: '#/$defs/OpenAIFileObject' title: Data type: array has_more: title: Has More type: boolean first_id: title: First Id type: string last_id: title: Last Id type: string object: const: list default: list title: Object type: string required: - data - has_more - first_id - last_id title: ListOpenAIFileResponse type: object ExpiresAfter: description: >- Control expiration of uploaded files. Params: - anchor, must be "created_at" - seconds, must be int between 3600 and 2592000 (1 hour to 30 days) properties: anchor: const: created_at title: Anchor type: string seconds: maximum: 2592000 minimum: 3600 title: Seconds type: integer required: - anchor - seconds title: ExpiresAfter type: object OpenAIFileObject: $defs: OpenAIFilePurpose: description: >- Valid purpose values for OpenAI Files API. enum: - assistants - batch title: OpenAIFilePurpose type: string description: >- OpenAI File object as defined in the OpenAI Files API. :param object: The object type, which is always "file" :param id: The file identifier, which can be referenced in the API endpoints :param bytes: The size of the file, in bytes :param created_at: The Unix timestamp (in seconds) for when the file was created :param expires_at: The Unix timestamp (in seconds) for when the file expires :param filename: The name of the file :param purpose: The intended purpose of the file properties: object: const: file default: file title: Object type: string id: title: Id type: string bytes: title: Bytes type: integer created_at: title: Created At type: integer expires_at: title: Expires At type: integer filename: title: Filename type: string purpose: $ref: '#/$defs/OpenAIFilePurpose' required: - id - bytes - created_at - expires_at - filename - purpose title: OpenAIFileObject type: object OpenAIFileDeleteResponse: description: >- Response for deleting a file in OpenAI Files API. :param id: The file identifier that was deleted :param object: The object type, which is always "file" :param deleted: Whether the file was successfully deleted properties: id: title: Id type: string object: const: file default: file title: Object type: string deleted: title: Deleted type: boolean required: - id - deleted title: OpenAIFileDeleteResponse type: object Response: type: object HealthInfo: $defs: HealthStatus: enum: - OK - Error - Not Implemented title: HealthStatus type: string description: >- Health status information for the service. :param status: Current health status of the service properties: status: $ref: '#/$defs/HealthStatus' required: - status title: HealthInfo type: object ListRoutesResponse: $defs: RouteInfo: description: >- Information about an API route including its path, method, and implementing providers. :param route: The API endpoint path :param method: HTTP method for the route :param provider_types: List of provider types that implement this route properties: route: title: Route type: string method: title: Method type: string provider_types: items: type: string title: Provider Types type: array required: - route - method - provider_types title: RouteInfo type: object description: >- Response containing a list of all available API routes. :param data: List of available route information objects properties: data: items: $ref: '#/$defs/RouteInfo' title: Data type: array required: - data title: ListRoutesResponse description: >- Response containing a list of all available API routes. OpenAIModel: type: object properties: id: type: string object: type: string const: model default: model created: type: integer owned_by: type: string custom_metadata: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object additionalProperties: false required: - id - object - created - owned_by title: OpenAIModel description: A model from OpenAI. OpenAIListModelsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/OpenAIModel' additionalProperties: false required: - data title: OpenAIListModelsResponse ModelType: type: string enum: - llm - embedding - rerank title: ModelType description: >- Enumeration of supported model types in Llama Stack. RegisterModelRequest: type: object properties: model_id: type: string description: The identifier of the model to register. provider_model_id: type: string description: >- The identifier of the model in the provider. provider_id: type: string description: The identifier of the provider. metadata: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: Any additional metadata for this model. model_type: $ref: '#/components/schemas/ModelType' description: The type of model to register. additionalProperties: false required: - model_id title: RegisterModelRequest Model: type: object properties: identifier: type: string description: >- Unique identifier for this resource in llama stack provider_resource_id: type: string description: >- Unique identifier for this resource in the provider provider_id: type: string description: >- ID of the provider that owns this resource type: type: string enum: - model - shield - vector_store - dataset - scoring_function - benchmark - tool - tool_group - prompt const: model default: model description: >- The resource type, always 'model' for model resources metadata: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: Any additional metadata for this model model_type: $ref: '#/components/schemas/ModelType' default: llm description: >- The type of model (LLM or embedding model) additionalProperties: false required: - identifier - provider_id - type - metadata - model_type title: Model description: >- A model resource representing an AI model registered in Llama Stack. RunModerationRequest: type: object ModerationObject: $defs: ModerationObjectResults: description: >- A moderation object. :param flagged: Whether any of the below categories are flagged. :param categories: A list of the categories, and whether they are flagged or not. :param category_applied_input_types: A list of the categories along with the input type(s) that the score applies to. :param category_scores: A list of the categories along with their scores as predicted by model. properties: flagged: title: Flagged type: boolean categories: anyOf: - additionalProperties: type: boolean type: object - type: 'null' title: Categories category_applied_input_types: anyOf: - additionalProperties: items: type: string type: array type: object - type: 'null' title: Category Applied Input Types category_scores: anyOf: - additionalProperties: type: number type: object - type: 'null' title: Category Scores user_message: anyOf: - type: string - type: 'null' title: User Message metadata: additionalProperties: true title: Metadata type: object required: - flagged title: ModerationObjectResults type: object description: >- A moderation object. :param id: The unique identifier for the moderation request. :param model: The model used to generate the moderation results. :param results: A list of moderation objects properties: id: title: Id type: string model: title: Model type: string results: items: $ref: '#/$defs/ModerationObjectResults' title: Results type: array required: - id - model - results title: ModerationObject type: object ListPromptsResponse: $defs: Prompt: description: >- A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. :param prompt: The system prompt text with variable placeholders. Variables are only supported when using the Responses API. :param version: Version (integer starting at 1, incremented on save) :param prompt_id: Unique identifier formatted as 'pmpt_<48-digit-hash>' :param variables: List of prompt variable names that can be used in the prompt template :param is_default: Boolean indicating whether this version is the default version for this prompt properties: prompt: anyOf: - type: string - type: 'null' description: >- The system prompt with variable placeholders title: Prompt version: description: >- Version (integer starting at 1, incremented on save) minimum: 1 title: Version type: integer prompt_id: description: >- Unique identifier in format 'pmpt_<48-digit-hash>' title: Prompt Id type: string variables: description: >- List of variable names that can be used in the prompt template items: type: string title: Variables type: array is_default: default: false description: >- Boolean indicating whether this version is the default version title: Is Default type: boolean required: - version - prompt_id title: Prompt type: object description: Response model to list prompts. properties: data: items: $ref: '#/$defs/Prompt' title: Data type: array required: - data title: ListPromptsResponse type: object CreatePromptRequest: type: object Prompt: description: >- A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack. :param prompt: The system prompt text with variable placeholders. Variables are only supported when using the Responses API. :param version: Version (integer starting at 1, incremented on save) :param prompt_id: Unique identifier formatted as 'pmpt_<48-digit-hash>' :param variables: List of prompt variable names that can be used in the prompt template :param is_default: Boolean indicating whether this version is the default version for this prompt properties: prompt: anyOf: - type: string - type: 'null' description: >- The system prompt with variable placeholders title: Prompt version: description: >- Version (integer starting at 1, incremented on save) minimum: 1 title: Version type: integer prompt_id: description: >- Unique identifier in format 'pmpt_<48-digit-hash>' title: Prompt Id type: string variables: description: >- List of variable names that can be used in the prompt template items: type: string title: Variables type: array is_default: default: false description: >- Boolean indicating whether this version is the default version title: Is Default type: boolean required: - version - prompt_id title: Prompt type: object UpdatePromptRequest: type: object SetDefaultVersionRequest: type: object ListProvidersResponse: $defs: ProviderInfo: description: >- Information about a registered provider including its configuration and health status. :param api: The API name this provider implements :param provider_id: Unique identifier for the provider :param provider_type: The type of provider implementation :param config: Configuration parameters for the provider :param health: Current health status of the provider properties: api: title: Api type: string provider_id: title: Provider Id type: string provider_type: title: Provider Type type: string config: additionalProperties: true title: Config type: object health: additionalProperties: true title: Health type: object required: - api - provider_id - provider_type - config - health title: ProviderInfo type: object description: >- Response containing a list of all available providers. :param data: List of provider information objects properties: data: items: $ref: '#/$defs/ProviderInfo' title: Data type: array required: - data title: ListProvidersResponse type: object ProviderInfo: description: >- Information about a registered provider including its configuration and health status. :param api: The API name this provider implements :param provider_id: Unique identifier for the provider :param provider_type: The type of provider implementation :param config: Configuration parameters for the provider :param health: Current health status of the provider properties: api: title: Api type: string provider_id: title: Provider Id type: string provider_type: title: Provider Type type: string config: additionalProperties: true title: Config type: object health: additionalProperties: true title: Health type: object required: - api - provider_id - provider_type - config - health title: ProviderInfo type: object ListOpenAIResponseObject: $defs: AllowedToolsFilter: description: >- Filter configuration for restricting which MCP tools can be used. :param tool_names: (Optional) List of specific tool names that are allowed properties: tool_names: anyOf: - items: type: string type: array - type: 'null' title: Tool Names title: AllowedToolsFilter type: object MCPListToolsTool: description: >- Tool definition returned by MCP list tools operation. :param input_schema: JSON schema defining the tool's input parameters :param name: Name of the tool :param description: (Optional) Description of what the tool does properties: input_schema: additionalProperties: true title: Input Schema type: object name: title: Name type: string description: anyOf: - type: string - type: 'null' title: Description required: - input_schema - name title: MCPListToolsTool type: object OpenAIResponseAnnotationCitation: description: >- URL citation annotation for referencing external web resources. :param type: Annotation type identifier, always "url_citation" :param end_index: End position of the citation span in the content :param start_index: Start position of the citation span in the content :param title: Title of the referenced web resource :param url: URL of the referenced web resource properties: type: const: url_citation default: url_citation title: Type type: string end_index: title: End Index type: integer start_index: title: Start Index type: integer title: title: Title type: string url: title: Url type: string required: - end_index - start_index - title - url title: OpenAIResponseAnnotationCitation type: object "OpenAIResponseAnnotationContainerFileCitation": properties: type: const: container_file_citation default: container_file_citation title: Type type: string container_id: title: Container Id type: string end_index: title: End Index type: integer file_id: title: File Id type: string filename: title: Filename type: string start_index: title: Start Index type: integer required: - container_id - end_index - file_id - filename - start_index title: >- OpenAIResponseAnnotationContainerFileCitation type: object OpenAIResponseAnnotationFileCitation: description: >- File citation annotation for referencing specific files in response content. :param type: Annotation type identifier, always "file_citation" :param file_id: Unique identifier of the referenced file :param filename: Name of the referenced file :param index: Position index of the citation within the content properties: type: const: file_citation default: file_citation title: Type type: string file_id: title: File Id type: string filename: title: Filename type: string index: title: Index type: integer required: - file_id - filename - index title: OpenAIResponseAnnotationFileCitation type: object OpenAIResponseAnnotationFilePath: properties: type: const: file_path default: file_path title: Type type: string file_id: title: File Id type: string index: title: Index type: integer required: - file_id - index title: OpenAIResponseAnnotationFilePath type: object OpenAIResponseContentPartRefusal: description: >- Refusal content within a streamed response part. :param type: Content part type identifier, always "refusal" :param refusal: Refusal text supplied by the model properties: type: const: refusal default: refusal title: Type type: string refusal: title: Refusal type: string required: - refusal title: OpenAIResponseContentPartRefusal type: object OpenAIResponseError: description: >- Error details for failed OpenAI response requests. :param code: Error code identifying the type of failure :param message: Human-readable error message describing the failure properties: code: title: Code type: string message: title: Message type: string required: - code - message title: OpenAIResponseError type: object "OpenAIResponseInputFunctionToolCallOutput": description: >- This represents the output of a function call that gets passed back to the model. properties: call_id: title: Call Id type: string output: title: Output type: string type: const: function_call_output default: function_call_output title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - call_id - output title: >- OpenAIResponseInputFunctionToolCallOutput type: object OpenAIResponseInputMessageContentImage: description: >- Image content for input messages in OpenAI response format. :param detail: Level of detail for image processing, can be "low", "high", or "auto" :param type: Content type identifier, always "input_image" :param image_url: (Optional) URL of the image content properties: detail: anyOf: - const: low type: string - const: high type: string - const: auto type: string default: auto title: Detail type: const: input_image default: input_image title: Type type: string image_url: anyOf: - type: string - type: 'null' title: Image Url title: OpenAIResponseInputMessageContentImage type: object OpenAIResponseInputMessageContentText: description: >- Text content for input messages in OpenAI response format. :param text: The text content of the input message :param type: Content type identifier, always "input_text" properties: text: title: Text type: string type: const: input_text default: input_text title: Type type: string required: - text title: OpenAIResponseInputMessageContentText type: object OpenAIResponseInputToolFileSearch: description: >- File search tool configuration for OpenAI response inputs. :param type: Tool type identifier, always "file_search" :param vector_store_ids: List of vector store identifiers to search within :param filters: (Optional) Additional filters to apply to the search :param max_num_results: (Optional) Maximum number of search results to return (1-50) :param ranking_options: (Optional) Options for ranking and scoring search results properties: type: const: file_search default: file_search title: Type type: string vector_store_ids: items: type: string title: Vector Store Ids type: array filters: anyOf: - additionalProperties: true type: object - type: 'null' title: Filters max_num_results: anyOf: - maximum: 50 minimum: 1 type: integer - type: 'null' default: 10 title: Max Num Results ranking_options: anyOf: - $ref: '#/$defs/SearchRankingOptions' - type: 'null' required: - vector_store_ids title: OpenAIResponseInputToolFileSearch type: object OpenAIResponseInputToolFunction: description: >- Function tool configuration for OpenAI response inputs. :param type: Tool type identifier, always "function" :param name: Name of the function that can be called :param description: (Optional) Description of what the function does :param parameters: (Optional) JSON schema defining the function's parameters :param strict: (Optional) Whether to enforce strict parameter validation properties: type: const: function default: function title: Type type: string name: title: Name type: string description: anyOf: - type: string - type: 'null' title: Description parameters: anyOf: - additionalProperties: true type: object - type: 'null' title: Parameters strict: anyOf: - type: boolean - type: 'null' title: Strict required: - name - parameters title: OpenAIResponseInputToolFunction type: object OpenAIResponseInputToolWebSearch: description: >- Web search tool configuration for OpenAI response inputs. :param type: Web search tool type variant to use :param search_context_size: (Optional) Size of search context, must be "low", "medium", or "high" properties: type: anyOf: - const: web_search type: string - const: web_search_preview type: string - const: web_search_preview_2025_03_11 type: string default: web_search title: Type search_context_size: anyOf: - pattern: ^low|medium|high$ type: string - type: 'null' default: medium title: Search Context Size title: OpenAIResponseInputToolWebSearch type: object OpenAIResponseMCPApprovalRequest: description: >- A request for human approval of a tool invocation. properties: arguments: title: Arguments type: string id: title: Id type: string name: title: Name type: string server_label: title: Server Label type: string type: const: mcp_approval_request default: mcp_approval_request title: Type type: string required: - arguments - id - name - server_label title: OpenAIResponseMCPApprovalRequest type: object OpenAIResponseMCPApprovalResponse: description: A response to an MCP approval request. properties: approval_request_id: title: Approval Request Id type: string approve: title: Approve type: boolean type: const: mcp_approval_response default: mcp_approval_response title: Type type: string id: anyOf: - type: string - type: 'null' title: Id reason: anyOf: - type: string - type: 'null' title: Reason required: - approval_request_id - approve title: OpenAIResponseMCPApprovalResponse type: object OpenAIResponseMessage: description: >- Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios. properties: content: anyOf: - type: string - items: discriminator: mapping: input_image: >- #/$defs/OpenAIResponseInputMessageContentImage input_text: >- #/$defs/OpenAIResponseInputMessageContentText propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseInputMessageContentText - $ref: >- #/$defs/OpenAIResponseInputMessageContentImage type: array - items: discriminator: mapping: output_text: >- #/$defs/OpenAIResponseOutputMessageContentOutputText refusal: '#/$defs/OpenAIResponseContentPartRefusal' propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseOutputMessageContentOutputText - $ref: '#/$defs/OpenAIResponseContentPartRefusal' type: array title: Content role: anyOf: - const: system type: string - const: developer type: string - const: user type: string - const: assistant type: string title: Role type: const: message default: message title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - content - role title: OpenAIResponseMessage type: object OpenAIResponseObjectWithInput: description: >- OpenAI response object extended with input context information. :param input: List of input items that led to this response properties: created_at: title: Created At type: integer error: anyOf: - $ref: '#/$defs/OpenAIResponseError' - type: 'null' id: title: Id type: string model: title: Model type: string object: const: response default: response title: Object type: string output: items: discriminator: mapping: file_search_call: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCall function_call: >- #/$defs/OpenAIResponseOutputMessageFunctionToolCall mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' mcp_call: >- #/$defs/OpenAIResponseOutputMessageMCPCall mcp_list_tools: >- #/$defs/OpenAIResponseOutputMessageMCPListTools message: '#/$defs/OpenAIResponseMessage' web_search_call: >- #/$defs/OpenAIResponseOutputMessageWebSearchToolCall propertyName: type oneOf: - $ref: '#/$defs/OpenAIResponseMessage' - $ref: >- #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageFunctionToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageMCPCall - $ref: >- #/$defs/OpenAIResponseOutputMessageMCPListTools - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' title: Output type: array parallel_tool_calls: default: false title: Parallel Tool Calls type: boolean previous_response_id: anyOf: - type: string - type: 'null' title: Previous Response Id status: title: Status type: string temperature: anyOf: - type: number - type: 'null' title: Temperature text: $ref: '#/$defs/OpenAIResponseText' default: format: type: text top_p: anyOf: - type: number - type: 'null' title: Top P tools: anyOf: - items: discriminator: mapping: file_search: >- #/$defs/OpenAIResponseInputToolFileSearch function: '#/$defs/OpenAIResponseInputToolFunction' mcp: '#/$defs/OpenAIResponseToolMCP' web_search: '#/$defs/OpenAIResponseInputToolWebSearch' web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch' propertyName: type oneOf: - $ref: '#/$defs/OpenAIResponseInputToolWebSearch' - $ref: >- #/$defs/OpenAIResponseInputToolFileSearch - $ref: '#/$defs/OpenAIResponseInputToolFunction' - $ref: '#/$defs/OpenAIResponseToolMCP' type: array - type: 'null' title: Tools truncation: anyOf: - type: string - type: 'null' title: Truncation usage: anyOf: - $ref: '#/$defs/OpenAIResponseUsage' - type: 'null' instructions: anyOf: - type: string - type: 'null' title: Instructions input: items: anyOf: - discriminator: mapping: file_search_call: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCall function_call: >- #/$defs/OpenAIResponseOutputMessageFunctionToolCall mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' mcp_call: >- #/$defs/OpenAIResponseOutputMessageMCPCall mcp_list_tools: >- #/$defs/OpenAIResponseOutputMessageMCPListTools message: '#/$defs/OpenAIResponseMessage' web_search_call: >- #/$defs/OpenAIResponseOutputMessageWebSearchToolCall propertyName: type oneOf: - $ref: '#/$defs/OpenAIResponseMessage' - $ref: >- #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageFunctionToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageMCPCall - $ref: >- #/$defs/OpenAIResponseOutputMessageMCPListTools - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' - $ref: >- #/$defs/OpenAIResponseInputFunctionToolCallOutput - $ref: >- #/$defs/OpenAIResponseMCPApprovalResponse - $ref: '#/$defs/OpenAIResponseMessage' title: Input type: array required: - created_at - id - model - output - status - input title: OpenAIResponseObjectWithInput type: object "OpenAIResponseOutputMessageContentOutputText": properties: text: title: Text type: string type: const: output_text default: output_text title: Type type: string annotations: items: discriminator: mapping: container_file_citation: >- #/$defs/OpenAIResponseAnnotationContainerFileCitation file_citation: >- #/$defs/OpenAIResponseAnnotationFileCitation file_path: '#/$defs/OpenAIResponseAnnotationFilePath' url_citation: '#/$defs/OpenAIResponseAnnotationCitation' propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseAnnotationFileCitation - $ref: '#/$defs/OpenAIResponseAnnotationCitation' - $ref: >- #/$defs/OpenAIResponseAnnotationContainerFileCitation - $ref: '#/$defs/OpenAIResponseAnnotationFilePath' title: Annotations type: array required: - text title: >- OpenAIResponseOutputMessageContentOutputText type: object "OpenAIResponseOutputMessageFileSearchToolCall": description: >- File search tool call output message for OpenAI responses. :param id: Unique identifier for this tool call :param queries: List of search queries executed :param status: Current status of the file search operation :param type: Tool call type identifier, always "file_search_call" :param results: (Optional) Search results returned by the file search operation properties: id: title: Id type: string queries: items: type: string title: Queries type: array status: title: Status type: string type: const: file_search_call default: file_search_call title: Type type: string results: anyOf: - items: $ref: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCallResults type: array - type: 'null' title: Results required: - id - queries - status title: >- OpenAIResponseOutputMessageFileSearchToolCall type: object "OpenAIResponseOutputMessageFileSearchToolCallResults": description: >- Search results returned by the file search operation. :param attributes: (Optional) Key-value attributes associated with the file :param file_id: Unique identifier of the file containing the result :param filename: Name of the file containing the result :param score: Relevance score for this search result (between 0 and 1) :param text: Text content of the search result properties: attributes: additionalProperties: true title: Attributes type: object file_id: title: File Id type: string filename: title: Filename type: string score: title: Score type: number text: title: Text type: string required: - attributes - file_id - filename - score - text title: >- OpenAIResponseOutputMessageFileSearchToolCallResults type: object "OpenAIResponseOutputMessageFunctionToolCall": description: >- Function tool call output message for OpenAI responses. :param call_id: Unique identifier for the function call :param name: Name of the function being called :param arguments: JSON string containing the function arguments :param type: Tool call type identifier, always "function_call" :param id: (Optional) Additional identifier for the tool call :param status: (Optional) Current status of the function call execution properties: call_id: title: Call Id type: string name: title: Name type: string arguments: title: Arguments type: string type: const: function_call default: function_call title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - call_id - name - arguments title: >- OpenAIResponseOutputMessageFunctionToolCall type: object OpenAIResponseOutputMessageMCPCall: description: >- Model Context Protocol (MCP) call output message for OpenAI responses. :param id: Unique identifier for this MCP call :param type: Tool call type identifier, always "mcp_call" :param arguments: JSON string containing the MCP call arguments :param name: Name of the MCP method being called :param server_label: Label identifying the MCP server handling the call :param error: (Optional) Error message if the MCP call failed :param output: (Optional) Output result from the successful MCP call properties: id: title: Id type: string type: const: mcp_call default: mcp_call title: Type type: string arguments: title: Arguments type: string name: title: Name type: string server_label: title: Server Label type: string error: anyOf: - type: string - type: 'null' title: Error output: anyOf: - type: string - type: 'null' title: Output required: - id - arguments - name - server_label title: OpenAIResponseOutputMessageMCPCall type: object OpenAIResponseOutputMessageMCPListTools: description: >- MCP list tools output message containing available tools from an MCP server. :param id: Unique identifier for this MCP list tools operation :param type: Tool call type identifier, always "mcp_list_tools" :param server_label: Label identifying the MCP server providing the tools :param tools: List of available tools provided by the MCP server properties: id: title: Id type: string type: const: mcp_list_tools default: mcp_list_tools title: Type type: string server_label: title: Server Label type: string tools: items: $ref: '#/$defs/MCPListToolsTool' title: Tools type: array required: - id - server_label - tools title: OpenAIResponseOutputMessageMCPListTools type: object "OpenAIResponseOutputMessageWebSearchToolCall": description: >- Web search tool call output message for OpenAI responses. :param id: Unique identifier for this tool call :param status: Current status of the web search operation :param type: Tool call type identifier, always "web_search_call" properties: id: title: Id type: string status: title: Status type: string type: const: web_search_call default: web_search_call title: Type type: string required: - id - status title: >- OpenAIResponseOutputMessageWebSearchToolCall type: object OpenAIResponseText: description: >- Text response configuration for OpenAI responses. :param format: (Optional) Text format configuration specifying output format requirements properties: format: anyOf: - $ref: '#/$defs/OpenAIResponseTextFormat' - type: 'null' title: OpenAIResponseText type: object OpenAIResponseTextFormat: description: >- Configuration for Responses API text format. :param type: Must be "text", "json_schema", or "json_object" to identify the format type :param name: The name of the response format. Only used for json_schema. :param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema. :param description: (Optional) A description of the response format. Only used for json_schema. :param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema. properties: type: anyOf: - const: text type: string - const: json_schema type: string - const: json_object type: string title: Type name: anyOf: - type: string - type: 'null' title: Name schema: anyOf: - additionalProperties: true type: object - type: 'null' title: Schema description: anyOf: - type: string - type: 'null' title: Description strict: anyOf: - type: boolean - type: 'null' title: Strict title: OpenAIResponseTextFormat type: object OpenAIResponseToolMCP: description: >- Model Context Protocol (MCP) tool configuration for OpenAI response object. :param type: Tool type identifier, always "mcp" :param server_label: Label to identify this MCP server :param allowed_tools: (Optional) Restriction on which tools can be used from this server properties: type: const: mcp default: mcp title: Type type: string server_label: title: Server Label type: string allowed_tools: anyOf: - items: type: string type: array - $ref: '#/$defs/AllowedToolsFilter' - type: 'null' title: Allowed Tools required: - server_label title: OpenAIResponseToolMCP type: object OpenAIResponseUsage: description: >- Usage information for OpenAI response. :param input_tokens: Number of tokens in the input :param output_tokens: Number of tokens in the output :param total_tokens: Total tokens used (input + output) :param input_tokens_details: Detailed breakdown of input token usage :param output_tokens_details: Detailed breakdown of output token usage properties: input_tokens: title: Input Tokens type: integer output_tokens: title: Output Tokens type: integer total_tokens: title: Total Tokens type: integer input_tokens_details: anyOf: - $ref: >- #/$defs/OpenAIResponseUsageInputTokensDetails - type: 'null' output_tokens_details: anyOf: - $ref: >- #/$defs/OpenAIResponseUsageOutputTokensDetails - type: 'null' required: - input_tokens - output_tokens - total_tokens title: OpenAIResponseUsage type: object OpenAIResponseUsageInputTokensDetails: description: >- Token details for input tokens in OpenAI response usage. :param cached_tokens: Number of tokens retrieved from cache properties: cached_tokens: anyOf: - type: integer - type: 'null' title: Cached Tokens title: OpenAIResponseUsageInputTokensDetails type: object OpenAIResponseUsageOutputTokensDetails: description: >- Token details for output tokens in OpenAI response usage. :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models) properties: reasoning_tokens: anyOf: - type: integer - type: 'null' title: Reasoning Tokens title: OpenAIResponseUsageOutputTokensDetails type: object SearchRankingOptions: description: >- Options for ranking and filtering search results. :param ranker: (Optional) Name of the ranking algorithm to use :param score_threshold: (Optional) Minimum relevance score threshold for results properties: ranker: anyOf: - type: string - type: 'null' title: Ranker score_threshold: anyOf: - type: number - type: 'null' default: 0.0 title: Score Threshold title: SearchRankingOptions type: object description: >- Paginated list of OpenAI response objects with navigation metadata. :param data: List of response objects with their input context :param has_more: Whether there are more results available beyond this page :param first_id: Identifier of the first item in this page :param last_id: Identifier of the last item in this page :param object: Object type identifier, always "list" properties: data: items: $ref: '#/$defs/OpenAIResponseObjectWithInput' title: Data type: array has_more: title: Has More type: boolean first_id: title: First Id type: string last_id: title: Last Id type: string object: const: list default: list title: Object type: string required: - data - has_more - first_id - last_id title: ListOpenAIResponseObject type: object properties: code: type: string description: >- Error code identifying the type of failure message: type: string description: >- Human-readable error message describing the failure additionalProperties: false required: - code - message title: OpenAIResponseError description: >- Error details for failed OpenAI response requests. OpenAIResponseInput: oneOf: - $ref: '#/components/schemas/OpenAIResponseOutput' - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - $ref: '#/components/schemas/OpenAIResponseMessage' OpenAIResponseInputToolFileSearch: type: object properties: type: type: string const: file_search default: file_search description: >- Tool type identifier, always "file_search" vector_store_ids: type: array items: type: string description: >- List of vector store identifiers to search within filters: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- (Optional) Additional filters to apply to the search max_num_results: type: integer default: 10 description: >- (Optional) Maximum number of search results to return (1-50) ranking_options: type: object properties: ranker: type: string description: >- (Optional) Name of the ranking algorithm to use score_threshold: type: number default: 0.0 description: >- (Optional) Minimum relevance score threshold for results additionalProperties: false description: >- (Optional) Options for ranking and scoring search results additionalProperties: false required: - type - vector_store_ids title: OpenAIResponseInputToolFileSearch description: >- File search tool configuration for OpenAI response inputs. OpenAIResponseInputToolFunction: type: object properties: type: type: string const: function default: function description: Tool type identifier, always "function" name: type: string description: Name of the function that can be called description: type: string description: >- (Optional) Description of what the function does parameters: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- (Optional) JSON schema defining the function's parameters strict: type: boolean description: >- (Optional) Whether to enforce strict parameter validation additionalProperties: false required: - type - name title: OpenAIResponseInputToolFunction description: >- Function tool configuration for OpenAI response inputs. OpenAIResponseInputToolWebSearch: type: object properties: type: oneOf: - type: string const: web_search - type: string const: web_search_preview - type: string const: web_search_preview_2025_03_11 default: web_search description: Web search tool type variant to use search_context_size: type: string default: medium description: >- (Optional) Size of search context, must be "low", "medium", or "high" additionalProperties: false required: - type title: OpenAIResponseInputToolWebSearch description: >- Web search tool configuration for OpenAI response inputs. OpenAIResponseObjectWithInput: type: object properties: created_at: type: integer description: >- Unix timestamp when the response was created error: $ref: '#/components/schemas/OpenAIResponseError' description: >- (Optional) Error details if the response generation failed id: type: string description: Unique identifier for this response model: type: string description: Model identifier used for generation object: type: string const: response default: response description: >- Object type identifier, always "response" output: type: array items: $ref: '#/components/schemas/OpenAIResponseOutput' description: >- List of generated output items (messages, tool calls, etc.) parallel_tool_calls: type: boolean default: false description: >- Whether tool calls can be executed in parallel previous_response_id: type: string description: >- (Optional) ID of the previous response in a conversation prompt: $ref: '#/components/schemas/OpenAIResponsePrompt' description: >- (Optional) Reference to a prompt template and its variables. status: type: string description: >- Current status of the response generation temperature: type: number description: >- (Optional) Sampling temperature used for generation text: $ref: '#/components/schemas/OpenAIResponseText' description: >- Text formatting configuration for the response top_p: type: number description: >- (Optional) Nucleus sampling parameter used for generation tools: type: array items: $ref: '#/components/schemas/OpenAIResponseTool' description: >- (Optional) An array of tools the model may call while generating a response. truncation: type: string description: >- (Optional) Truncation strategy applied to the response usage: $ref: '#/components/schemas/OpenAIResponseUsage' description: >- (Optional) Token usage information for the response instructions: type: string description: >- (Optional) System message inserted into the model's context input: type: array items: $ref: '#/components/schemas/OpenAIResponseInput' description: >- List of input items that led to this response additionalProperties: false required: - created_at - id - model - object - output - parallel_tool_calls - status - text - input title: OpenAIResponseObjectWithInput description: >- OpenAI response object extended with input context information. OpenAIResponseOutput: oneOf: - $ref: '#/components/schemas/OpenAIResponseMessage' - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' discriminator: propertyName: type mapping: message: '#/components/schemas/OpenAIResponseMessage' web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' OpenAIResponsePrompt: type: object properties: id: type: string description: Unique identifier of the prompt template variables: type: object additionalProperties: $ref: '#/components/schemas/OpenAIResponseInputMessageContent' description: >- Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types like images or files. version: type: string description: >- Version number of the prompt to use (defaults to latest if not specified) additionalProperties: false required: - id title: OpenAIResponsePrompt description: >- OpenAI compatible Prompt object that is used in OpenAI responses. OpenAIResponseText: type: object properties: format: type: object properties: type: oneOf: - type: string const: text - type: string const: json_schema - type: string const: json_object description: >- Must be "text", "json_schema", or "json_object" to identify the format type name: type: string description: >- The name of the response format. Only used for json_schema. schema: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema. description: type: string description: >- (Optional) A description of the response format. Only used for json_schema. strict: type: boolean description: >- (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema. additionalProperties: false required: - type description: >- (Optional) Text format configuration specifying output format requirements additionalProperties: false title: OpenAIResponseText description: >- Text response configuration for OpenAI responses. OpenAIResponseTool: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - $ref: '#/components/schemas/OpenAIResponseToolMCP' discriminator: propertyName: type mapping: web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' function: '#/components/schemas/OpenAIResponseInputToolFunction' mcp: '#/components/schemas/OpenAIResponseToolMCP' OpenAIResponseToolMCP: type: object properties: type: type: string const: mcp default: mcp description: Tool type identifier, always "mcp" server_label: type: string description: Label to identify this MCP server allowed_tools: oneOf: - type: array items: type: string - type: object properties: tool_names: type: array items: type: string description: >- (Optional) List of specific tool names that are allowed additionalProperties: false title: AllowedToolsFilter description: >- Filter configuration for restricting which MCP tools can be used. description: >- (Optional) Restriction on which tools can be used from this server additionalProperties: false required: - type - server_label title: OpenAIResponseToolMCP description: >- Model Context Protocol (MCP) tool configuration for OpenAI response object. OpenAIResponseUsage: type: object properties: input_tokens: type: integer description: Number of tokens in the input output_tokens: type: integer description: Number of tokens in the output total_tokens: type: integer description: Total tokens used (input + output) input_tokens_details: type: object properties: cached_tokens: type: integer description: Number of tokens retrieved from cache additionalProperties: false description: Detailed breakdown of input token usage output_tokens_details: type: object properties: reasoning_tokens: type: integer description: >- Number of tokens used for reasoning (o1/o3 models) additionalProperties: false description: Detailed breakdown of output token usage additionalProperties: false required: - input_tokens - output_tokens - total_tokens title: OpenAIResponseUsage description: Usage information for OpenAI response. ResponseGuardrailSpec: type: object properties: type: type: string description: The type/identifier of the guardrail. additionalProperties: false required: - type title: ResponseGuardrailSpec description: >- Specification for a guardrail to apply during response generation. OpenAIResponseInputTool: oneOf: - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' discriminator: propertyName: type mapping: web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' function: '#/components/schemas/OpenAIResponseInputToolFunction' mcp: '#/components/schemas/OpenAIResponseInputToolMCP' OpenAIResponseInputToolMCP: type: object properties: type: type: string const: mcp default: mcp description: Tool type identifier, always "mcp" server_label: type: string description: Label to identify this MCP server server_url: type: string description: URL endpoint of the MCP server headers: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- (Optional) HTTP headers to include when connecting to the server require_approval: oneOf: - type: string const: always - type: string const: never - type: object properties: always: type: array items: type: string description: >- (Optional) List of tool names that always require approval never: type: array items: type: string description: >- (Optional) List of tool names that never require approval additionalProperties: false title: ApprovalFilter description: >- Filter configuration for MCP tool approval requirements. default: never description: >- Approval requirement for tool calls ("always", "never", or filter) allowed_tools: oneOf: - type: array items: type: string - type: object properties: tool_names: type: array items: type: string description: >- (Optional) List of specific tool names that are allowed additionalProperties: false title: AllowedToolsFilter description: >- Filter configuration for restricting which MCP tools can be used. description: >- (Optional) Restriction on which tools can be used from this server additionalProperties: false required: - type - server_label - server_url - require_approval title: OpenAIResponseInputToolMCP description: >- Model Context Protocol (MCP) tool configuration for OpenAI response inputs. CreateOpenaiResponseRequest: type: object properties: input: oneOf: - type: string - type: array items: $ref: '#/components/schemas/OpenAIResponseInput' description: Input message(s) to create the response. model: type: string description: The underlying LLM used for completions. prompt: $ref: '#/components/schemas/OpenAIResponsePrompt' description: >- (Optional) Prompt object with ID, version, and variables. instructions: type: string previous_response_id: type: string description: >- (Optional) if specified, the new response will be a continuation of the previous response. This can be used to easily fork-off new responses from existing responses. conversation: type: string description: >- (Optional) The ID of a conversation to add the response to. Must begin with 'conv_'. Input and output messages will be automatically added to the conversation. store: type: boolean stream: type: boolean temperature: type: number text: $ref: '#/components/schemas/OpenAIResponseText' tools: type: array items: $ref: '#/components/schemas/OpenAIResponseInputTool' include: type: array items: type: string description: >- (Optional) Additional fields to include in the response. max_infer_iters: type: integer additionalProperties: false required: - input - model title: CreateOpenaiResponseRequest OpenAIResponseObject: $defs: AllowedToolsFilter: description: >- Filter configuration for restricting which MCP tools can be used. :param tool_names: (Optional) List of specific tool names that are allowed properties: tool_names: anyOf: - items: type: string type: array - type: 'null' title: Tool Names title: AllowedToolsFilter type: object MCPListToolsTool: description: >- Tool definition returned by MCP list tools operation. :param input_schema: JSON schema defining the tool's input parameters :param name: Name of the tool :param description: (Optional) Description of what the tool does properties: input_schema: additionalProperties: true title: Input Schema type: object name: title: Name type: string description: anyOf: - type: string - type: 'null' title: Description required: - input_schema - name title: MCPListToolsTool type: object OpenAIResponseAnnotationCitation: description: >- URL citation annotation for referencing external web resources. :param type: Annotation type identifier, always "url_citation" :param end_index: End position of the citation span in the content :param start_index: Start position of the citation span in the content :param title: Title of the referenced web resource :param url: URL of the referenced web resource properties: type: const: url_citation default: url_citation title: Type type: string end_index: title: End Index type: integer start_index: title: Start Index type: integer title: title: Title type: string url: title: Url type: string required: - end_index - start_index - title - url title: OpenAIResponseAnnotationCitation type: object "OpenAIResponseAnnotationContainerFileCitation": properties: type: const: container_file_citation default: container_file_citation title: Type type: string container_id: title: Container Id type: string end_index: title: End Index type: integer file_id: title: File Id type: string filename: title: Filename type: string start_index: title: Start Index type: integer required: - container_id - end_index - file_id - filename - start_index title: >- OpenAIResponseAnnotationContainerFileCitation type: object OpenAIResponseAnnotationFileCitation: description: >- File citation annotation for referencing specific files in response content. :param type: Annotation type identifier, always "file_citation" :param file_id: Unique identifier of the referenced file :param filename: Name of the referenced file :param index: Position index of the citation within the content properties: type: const: file_citation default: file_citation title: Type type: string file_id: title: File Id type: string filename: title: Filename type: string index: title: Index type: integer required: - file_id - filename - index title: OpenAIResponseAnnotationFileCitation type: object OpenAIResponseAnnotationFilePath: properties: type: const: file_path default: file_path title: Type type: string file_id: title: File Id type: string index: title: Index type: integer required: - file_id - index title: OpenAIResponseAnnotationFilePath type: object OpenAIResponseContentPartRefusal: description: >- Refusal content within a streamed response part. :param type: Content part type identifier, always "refusal" :param refusal: Refusal text supplied by the model properties: type: const: refusal default: refusal title: Type type: string refusal: title: Refusal type: string required: - refusal title: OpenAIResponseContentPartRefusal type: object OpenAIResponseError: description: >- Error details for failed OpenAI response requests. :param code: Error code identifying the type of failure :param message: Human-readable error message describing the failure properties: code: title: Code type: string message: title: Message type: string required: - code - message title: OpenAIResponseError type: object OpenAIResponseInputMessageContentImage: description: >- Image content for input messages in OpenAI response format. :param detail: Level of detail for image processing, can be "low", "high", or "auto" :param type: Content type identifier, always "input_image" :param image_url: (Optional) URL of the image content properties: detail: anyOf: - const: low type: string - const: high type: string - const: auto type: string default: auto title: Detail type: const: input_image default: input_image title: Type type: string image_url: anyOf: - type: string - type: 'null' title: Image Url title: OpenAIResponseInputMessageContentImage type: object OpenAIResponseInputMessageContentText: description: >- Text content for input messages in OpenAI response format. :param text: The text content of the input message :param type: Content type identifier, always "input_text" properties: text: title: Text type: string type: const: input_text default: input_text title: Type type: string required: - text title: OpenAIResponseInputMessageContentText type: object OpenAIResponseInputToolFileSearch: description: >- File search tool configuration for OpenAI response inputs. :param type: Tool type identifier, always "file_search" :param vector_store_ids: List of vector store identifiers to search within :param filters: (Optional) Additional filters to apply to the search :param max_num_results: (Optional) Maximum number of search results to return (1-50) :param ranking_options: (Optional) Options for ranking and scoring search results properties: type: const: file_search default: file_search title: Type type: string vector_store_ids: items: type: string title: Vector Store Ids type: array filters: anyOf: - additionalProperties: true type: object - type: 'null' title: Filters max_num_results: anyOf: - maximum: 50 minimum: 1 type: integer - type: 'null' default: 10 title: Max Num Results ranking_options: anyOf: - $ref: '#/$defs/SearchRankingOptions' - type: 'null' required: - vector_store_ids title: OpenAIResponseInputToolFileSearch type: object OpenAIResponseInputToolFunction: description: >- Function tool configuration for OpenAI response inputs. :param type: Tool type identifier, always "function" :param name: Name of the function that can be called :param description: (Optional) Description of what the function does :param parameters: (Optional) JSON schema defining the function's parameters :param strict: (Optional) Whether to enforce strict parameter validation properties: type: const: function default: function title: Type type: string name: title: Name type: string description: anyOf: - type: string - type: 'null' title: Description parameters: anyOf: - additionalProperties: true type: object - type: 'null' title: Parameters strict: anyOf: - type: boolean - type: 'null' title: Strict required: - name - parameters title: OpenAIResponseInputToolFunction type: object OpenAIResponseInputToolWebSearch: description: >- Web search tool configuration for OpenAI response inputs. :param type: Web search tool type variant to use :param search_context_size: (Optional) Size of search context, must be "low", "medium", or "high" properties: type: anyOf: - const: web_search type: string - const: web_search_preview type: string - const: web_search_preview_2025_03_11 type: string default: web_search title: Type search_context_size: anyOf: - pattern: ^low|medium|high$ type: string - type: 'null' default: medium title: Search Context Size title: OpenAIResponseInputToolWebSearch type: object OpenAIResponseMCPApprovalRequest: description: >- A request for human approval of a tool invocation. properties: arguments: title: Arguments type: string id: title: Id type: string name: title: Name type: string server_label: title: Server Label type: string type: const: mcp_approval_request default: mcp_approval_request title: Type type: string required: - arguments - id - name - server_label title: OpenAIResponseMCPApprovalRequest type: object OpenAIResponseMessage: description: >- Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios. properties: content: anyOf: - type: string - items: discriminator: mapping: input_image: >- #/$defs/OpenAIResponseInputMessageContentImage input_text: >- #/$defs/OpenAIResponseInputMessageContentText propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseInputMessageContentText - $ref: >- #/$defs/OpenAIResponseInputMessageContentImage type: array - items: discriminator: mapping: output_text: >- #/$defs/OpenAIResponseOutputMessageContentOutputText refusal: '#/$defs/OpenAIResponseContentPartRefusal' propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseOutputMessageContentOutputText - $ref: '#/$defs/OpenAIResponseContentPartRefusal' type: array title: Content role: anyOf: - const: system type: string - const: developer type: string - const: user type: string - const: assistant type: string title: Role type: const: message default: message title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - content - role title: OpenAIResponseMessage type: object "OpenAIResponseOutputMessageContentOutputText": properties: text: title: Text type: string type: const: output_text default: output_text title: Type type: string annotations: items: discriminator: mapping: container_file_citation: >- #/$defs/OpenAIResponseAnnotationContainerFileCitation file_citation: >- #/$defs/OpenAIResponseAnnotationFileCitation file_path: '#/$defs/OpenAIResponseAnnotationFilePath' url_citation: '#/$defs/OpenAIResponseAnnotationCitation' propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseAnnotationFileCitation - $ref: '#/$defs/OpenAIResponseAnnotationCitation' - $ref: >- #/$defs/OpenAIResponseAnnotationContainerFileCitation - $ref: '#/$defs/OpenAIResponseAnnotationFilePath' title: Annotations type: array required: - text title: >- OpenAIResponseOutputMessageContentOutputText type: object "OpenAIResponseOutputMessageFileSearchToolCall": description: >- File search tool call output message for OpenAI responses. :param id: Unique identifier for this tool call :param queries: List of search queries executed :param status: Current status of the file search operation :param type: Tool call type identifier, always "file_search_call" :param results: (Optional) Search results returned by the file search operation properties: id: title: Id type: string queries: items: type: string title: Queries type: array status: title: Status type: string type: const: file_search_call default: file_search_call title: Type type: string results: anyOf: - items: $ref: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCallResults type: array - type: 'null' title: Results required: - id - queries - status title: >- OpenAIResponseOutputMessageFileSearchToolCall type: object "OpenAIResponseOutputMessageFileSearchToolCallResults": description: >- Search results returned by the file search operation. :param attributes: (Optional) Key-value attributes associated with the file :param file_id: Unique identifier of the file containing the result :param filename: Name of the file containing the result :param score: Relevance score for this search result (between 0 and 1) :param text: Text content of the search result properties: attributes: additionalProperties: true title: Attributes type: object file_id: title: File Id type: string filename: title: Filename type: string score: title: Score type: number text: title: Text type: string required: - attributes - file_id - filename - score - text title: >- OpenAIResponseOutputMessageFileSearchToolCallResults type: object "OpenAIResponseOutputMessageFunctionToolCall": description: >- Function tool call output message for OpenAI responses. :param call_id: Unique identifier for the function call :param name: Name of the function being called :param arguments: JSON string containing the function arguments :param type: Tool call type identifier, always "function_call" :param id: (Optional) Additional identifier for the tool call :param status: (Optional) Current status of the function call execution properties: call_id: title: Call Id type: string name: title: Name type: string arguments: title: Arguments type: string type: const: function_call default: function_call title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - call_id - name - arguments title: >- OpenAIResponseOutputMessageFunctionToolCall type: object OpenAIResponseOutputMessageMCPCall: description: >- Model Context Protocol (MCP) call output message for OpenAI responses. :param id: Unique identifier for this MCP call :param type: Tool call type identifier, always "mcp_call" :param arguments: JSON string containing the MCP call arguments :param name: Name of the MCP method being called :param server_label: Label identifying the MCP server handling the call :param error: (Optional) Error message if the MCP call failed :param output: (Optional) Output result from the successful MCP call properties: id: title: Id type: string type: const: mcp_call default: mcp_call title: Type type: string arguments: title: Arguments type: string name: title: Name type: string server_label: title: Server Label type: string error: anyOf: - type: string - type: 'null' title: Error output: anyOf: - type: string - type: 'null' title: Output required: - id - arguments - name - server_label title: OpenAIResponseOutputMessageMCPCall type: object OpenAIResponseOutputMessageMCPListTools: description: >- MCP list tools output message containing available tools from an MCP server. :param id: Unique identifier for this MCP list tools operation :param type: Tool call type identifier, always "mcp_list_tools" :param server_label: Label identifying the MCP server providing the tools :param tools: List of available tools provided by the MCP server properties: id: title: Id type: string type: const: mcp_list_tools default: mcp_list_tools title: Type type: string server_label: title: Server Label type: string tools: items: $ref: '#/$defs/MCPListToolsTool' title: Tools type: array required: - id - server_label - tools title: OpenAIResponseOutputMessageMCPListTools type: object "OpenAIResponseOutputMessageWebSearchToolCall": description: >- Web search tool call output message for OpenAI responses. :param id: Unique identifier for this tool call :param status: Current status of the web search operation :param type: Tool call type identifier, always "web_search_call" properties: id: title: Id type: string status: title: Status type: string type: const: web_search_call default: web_search_call title: Type type: string required: - id - status title: >- OpenAIResponseOutputMessageWebSearchToolCall type: object OpenAIResponseText: description: >- Text response configuration for OpenAI responses. :param format: (Optional) Text format configuration specifying output format requirements properties: format: anyOf: - $ref: '#/$defs/OpenAIResponseTextFormat' - type: 'null' title: OpenAIResponseText type: object OpenAIResponseTextFormat: description: >- Configuration for Responses API text format. :param type: Must be "text", "json_schema", or "json_object" to identify the format type :param name: The name of the response format. Only used for json_schema. :param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema. :param description: (Optional) A description of the response format. Only used for json_schema. :param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema. properties: type: anyOf: - const: text type: string - const: json_schema type: string - const: json_object type: string title: Type name: anyOf: - type: string - type: 'null' title: Name schema: anyOf: - additionalProperties: true type: object - type: 'null' title: Schema description: anyOf: - type: string - type: 'null' title: Description strict: anyOf: - type: boolean - type: 'null' title: Strict title: OpenAIResponseTextFormat type: object OpenAIResponseToolMCP: description: >- Model Context Protocol (MCP) tool configuration for OpenAI response object. :param type: Tool type identifier, always "mcp" :param server_label: Label to identify this MCP server :param allowed_tools: (Optional) Restriction on which tools can be used from this server properties: type: const: mcp default: mcp title: Type type: string server_label: title: Server Label type: string allowed_tools: anyOf: - items: type: string type: array - $ref: '#/$defs/AllowedToolsFilter' - type: 'null' title: Allowed Tools required: - server_label title: OpenAIResponseToolMCP type: object OpenAIResponseUsage: description: >- Usage information for OpenAI response. :param input_tokens: Number of tokens in the input :param output_tokens: Number of tokens in the output :param total_tokens: Total tokens used (input + output) :param input_tokens_details: Detailed breakdown of input token usage :param output_tokens_details: Detailed breakdown of output token usage properties: input_tokens: title: Input Tokens type: integer output_tokens: title: Output Tokens type: integer total_tokens: title: Total Tokens type: integer input_tokens_details: anyOf: - $ref: >- #/$defs/OpenAIResponseUsageInputTokensDetails - type: 'null' output_tokens_details: anyOf: - $ref: >- #/$defs/OpenAIResponseUsageOutputTokensDetails - type: 'null' required: - input_tokens - output_tokens - total_tokens title: OpenAIResponseUsage type: object OpenAIResponseUsageInputTokensDetails: description: >- Token details for input tokens in OpenAI response usage. :param cached_tokens: Number of tokens retrieved from cache properties: cached_tokens: anyOf: - type: integer - type: 'null' title: Cached Tokens title: OpenAIResponseUsageInputTokensDetails type: object OpenAIResponseUsageOutputTokensDetails: description: >- Token details for output tokens in OpenAI response usage. :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models) properties: reasoning_tokens: anyOf: - type: integer - type: 'null' title: Reasoning Tokens title: OpenAIResponseUsageOutputTokensDetails type: object SearchRankingOptions: description: >- Options for ranking and filtering search results. :param ranker: (Optional) Name of the ranking algorithm to use :param score_threshold: (Optional) Minimum relevance score threshold for results properties: ranker: anyOf: - type: string - type: 'null' title: Ranker score_threshold: anyOf: - type: number - type: 'null' default: 0.0 title: Score Threshold title: SearchRankingOptions type: object description: >- Complete OpenAI response object containing generation results and metadata. :param created_at: Unix timestamp when the response was created :param error: (Optional) Error details if the response generation failed :param id: Unique identifier for this response :param model: Model identifier used for generation :param object: Object type identifier, always "response" :param output: List of generated output items (messages, tool calls, etc.) :param parallel_tool_calls: Whether tool calls can be executed in parallel :param previous_response_id: (Optional) ID of the previous response in a conversation :param status: Current status of the response generation :param temperature: (Optional) Sampling temperature used for generation :param text: Text formatting configuration for the response :param top_p: (Optional) Nucleus sampling parameter used for generation :param tools: (Optional) An array of tools the model may call while generating a response. :param truncation: (Optional) Truncation strategy applied to the response :param usage: (Optional) Token usage information for the response :param instructions: (Optional) System message inserted into the model's context properties: created_at: title: Created At type: integer error: anyOf: - $ref: '#/$defs/OpenAIResponseError' - type: 'null' id: title: Id type: string model: title: Model type: string object: const: response default: response title: Object type: string output: items: discriminator: mapping: file_search_call: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCall function_call: >- #/$defs/OpenAIResponseOutputMessageFunctionToolCall mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' mcp_call: >- #/$defs/OpenAIResponseOutputMessageMCPCall mcp_list_tools: >- #/$defs/OpenAIResponseOutputMessageMCPListTools message: '#/$defs/OpenAIResponseMessage' web_search_call: >- #/$defs/OpenAIResponseOutputMessageWebSearchToolCall propertyName: type oneOf: - $ref: '#/$defs/OpenAIResponseMessage' - $ref: >- #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageFunctionToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageMCPCall - $ref: >- #/$defs/OpenAIResponseOutputMessageMCPListTools - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' title: Output type: array parallel_tool_calls: default: false title: Parallel Tool Calls type: boolean previous_response_id: type: string description: >- (Optional) ID of the previous response in a conversation prompt: $ref: '#/components/schemas/OpenAIResponsePrompt' description: >- (Optional) Reference to a prompt template and its variables. status: title: Status type: string temperature: anyOf: - type: number - type: 'null' title: Temperature text: $ref: '#/$defs/OpenAIResponseText' default: format: type: text top_p: anyOf: - type: number - type: 'null' title: Top P tools: anyOf: - items: discriminator: mapping: file_search: >- #/$defs/OpenAIResponseInputToolFileSearch function: '#/$defs/OpenAIResponseInputToolFunction' mcp: '#/$defs/OpenAIResponseToolMCP' web_search: '#/$defs/OpenAIResponseInputToolWebSearch' web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch' web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch' propertyName: type oneOf: - $ref: '#/$defs/OpenAIResponseInputToolWebSearch' - $ref: >- #/$defs/OpenAIResponseInputToolFileSearch - $ref: '#/$defs/OpenAIResponseInputToolFunction' - $ref: '#/$defs/OpenAIResponseToolMCP' type: array - type: 'null' title: Tools truncation: anyOf: - type: string - type: 'null' title: Truncation usage: anyOf: - $ref: '#/$defs/OpenAIResponseUsage' - type: 'null' instructions: anyOf: - type: string - type: 'null' title: Instructions required: - created_at - id - model - output - status title: OpenAIResponseObject type: object AsyncIterator: type: object OpenAIDeleteResponseObject: description: >- Response object confirming deletion of an OpenAI response. :param id: Unique identifier of the deleted response :param object: Object type identifier, always "response" :param deleted: Deletion confirmation flag, always True properties: id: title: Id type: string object: const: response default: response title: Object type: string deleted: default: true title: Deleted type: boolean required: - id title: OpenAIDeleteResponseObject type: object ListOpenAIResponseInputItem: $defs: MCPListToolsTool: description: >- Tool definition returned by MCP list tools operation. :param input_schema: JSON schema defining the tool's input parameters :param name: Name of the tool :param description: (Optional) Description of what the tool does properties: input_schema: additionalProperties: true title: Input Schema type: object name: title: Name type: string description: anyOf: - type: string - type: 'null' title: Description required: - input_schema - name title: MCPListToolsTool type: object OpenAIResponseAnnotationCitation: description: >- URL citation annotation for referencing external web resources. :param type: Annotation type identifier, always "url_citation" :param end_index: End position of the citation span in the content :param start_index: Start position of the citation span in the content :param title: Title of the referenced web resource :param url: URL of the referenced web resource properties: type: const: url_citation default: url_citation title: Type type: string end_index: title: End Index type: integer start_index: title: Start Index type: integer title: title: Title type: string url: title: Url type: string required: - end_index - start_index - title - url title: OpenAIResponseAnnotationCitation type: object "OpenAIResponseAnnotationContainerFileCitation": properties: type: const: container_file_citation default: container_file_citation title: Type type: string container_id: title: Container Id type: string end_index: title: End Index type: integer file_id: title: File Id type: string filename: title: Filename type: string start_index: title: Start Index type: integer required: - container_id - end_index - file_id - filename - start_index title: >- OpenAIResponseAnnotationContainerFileCitation type: object OpenAIResponseAnnotationFileCitation: description: >- File citation annotation for referencing specific files in response content. :param type: Annotation type identifier, always "file_citation" :param file_id: Unique identifier of the referenced file :param filename: Name of the referenced file :param index: Position index of the citation within the content properties: type: const: file_citation default: file_citation title: Type type: string file_id: title: File Id type: string filename: title: Filename type: string index: title: Index type: integer required: - file_id - filename - index title: OpenAIResponseAnnotationFileCitation type: object OpenAIResponseAnnotationFilePath: properties: type: const: file_path default: file_path title: Type type: string file_id: title: File Id type: string index: title: Index type: integer required: - file_id - index title: OpenAIResponseAnnotationFilePath type: object OpenAIResponseContentPartRefusal: description: >- Refusal content within a streamed response part. :param type: Content part type identifier, always "refusal" :param refusal: Refusal text supplied by the model properties: type: const: refusal default: refusal title: Type type: string refusal: title: Refusal type: string required: - refusal title: OpenAIResponseContentPartRefusal type: object "OpenAIResponseInputFunctionToolCallOutput": description: >- This represents the output of a function call that gets passed back to the model. properties: call_id: title: Call Id type: string output: title: Output type: string type: const: function_call_output default: function_call_output title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - call_id - output title: >- OpenAIResponseInputFunctionToolCallOutput type: object OpenAIResponseInputMessageContentImage: description: >- Image content for input messages in OpenAI response format. :param detail: Level of detail for image processing, can be "low", "high", or "auto" :param type: Content type identifier, always "input_image" :param image_url: (Optional) URL of the image content properties: detail: anyOf: - const: low type: string - const: high type: string - const: auto type: string default: auto title: Detail type: const: input_image default: input_image title: Type type: string image_url: anyOf: - type: string - type: 'null' title: Image Url title: OpenAIResponseInputMessageContentImage type: object OpenAIResponseInputMessageContentText: description: >- Text content for input messages in OpenAI response format. :param text: The text content of the input message :param type: Content type identifier, always "input_text" properties: text: title: Text type: string type: const: input_text default: input_text title: Type type: string required: - text title: OpenAIResponseInputMessageContentText type: object OpenAIResponseMCPApprovalRequest: description: >- A request for human approval of a tool invocation. properties: arguments: title: Arguments type: string id: title: Id type: string name: title: Name type: string server_label: title: Server Label type: string type: const: mcp_approval_request default: mcp_approval_request title: Type type: string required: - arguments - id - name - server_label title: OpenAIResponseMCPApprovalRequest type: object OpenAIResponseMCPApprovalResponse: description: A response to an MCP approval request. properties: approval_request_id: title: Approval Request Id type: string approve: title: Approve type: boolean type: const: mcp_approval_response default: mcp_approval_response title: Type type: string id: anyOf: - type: string - type: 'null' title: Id reason: anyOf: - type: string - type: 'null' title: Reason required: - approval_request_id - approve title: OpenAIResponseMCPApprovalResponse type: object OpenAIResponseMessage: description: >- Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios. properties: content: anyOf: - type: string - items: discriminator: mapping: input_image: >- #/$defs/OpenAIResponseInputMessageContentImage input_text: >- #/$defs/OpenAIResponseInputMessageContentText propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseInputMessageContentText - $ref: >- #/$defs/OpenAIResponseInputMessageContentImage type: array - items: discriminator: mapping: output_text: >- #/$defs/OpenAIResponseOutputMessageContentOutputText refusal: '#/$defs/OpenAIResponseContentPartRefusal' propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseOutputMessageContentOutputText - $ref: '#/$defs/OpenAIResponseContentPartRefusal' type: array title: Content role: anyOf: - const: system type: string - const: developer type: string - const: user type: string - const: assistant type: string title: Role type: const: message default: message title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - content - role title: OpenAIResponseMessage type: object "OpenAIResponseOutputMessageContentOutputText": properties: text: title: Text type: string type: const: output_text default: output_text title: Type type: string annotations: items: discriminator: mapping: container_file_citation: >- #/$defs/OpenAIResponseAnnotationContainerFileCitation file_citation: >- #/$defs/OpenAIResponseAnnotationFileCitation file_path: '#/$defs/OpenAIResponseAnnotationFilePath' url_citation: '#/$defs/OpenAIResponseAnnotationCitation' propertyName: type oneOf: - $ref: >- #/$defs/OpenAIResponseAnnotationFileCitation - $ref: '#/$defs/OpenAIResponseAnnotationCitation' - $ref: >- #/$defs/OpenAIResponseAnnotationContainerFileCitation - $ref: '#/$defs/OpenAIResponseAnnotationFilePath' title: Annotations type: array required: - text title: >- OpenAIResponseOutputMessageContentOutputText type: object "OpenAIResponseOutputMessageFileSearchToolCall": description: >- File search tool call output message for OpenAI responses. :param id: Unique identifier for this tool call :param queries: List of search queries executed :param status: Current status of the file search operation :param type: Tool call type identifier, always "file_search_call" :param results: (Optional) Search results returned by the file search operation properties: id: title: Id type: string queries: items: type: string title: Queries type: array status: title: Status type: string type: const: file_search_call default: file_search_call title: Type type: string results: anyOf: - items: $ref: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCallResults type: array - type: 'null' title: Results required: - id - queries - status title: >- OpenAIResponseOutputMessageFileSearchToolCall type: object "OpenAIResponseOutputMessageFileSearchToolCallResults": description: >- Search results returned by the file search operation. :param attributes: (Optional) Key-value attributes associated with the file :param file_id: Unique identifier of the file containing the result :param filename: Name of the file containing the result :param score: Relevance score for this search result (between 0 and 1) :param text: Text content of the search result properties: attributes: additionalProperties: true title: Attributes type: object file_id: title: File Id type: string filename: title: Filename type: string score: title: Score type: number text: title: Text type: string required: - attributes - file_id - filename - score - text title: >- OpenAIResponseOutputMessageFileSearchToolCallResults type: object "OpenAIResponseOutputMessageFunctionToolCall": description: >- Function tool call output message for OpenAI responses. :param call_id: Unique identifier for the function call :param name: Name of the function being called :param arguments: JSON string containing the function arguments :param type: Tool call type identifier, always "function_call" :param id: (Optional) Additional identifier for the tool call :param status: (Optional) Current status of the function call execution properties: call_id: title: Call Id type: string name: title: Name type: string arguments: title: Arguments type: string type: const: function_call default: function_call title: Type type: string id: anyOf: - type: string - type: 'null' title: Id status: anyOf: - type: string - type: 'null' title: Status required: - call_id - name - arguments title: >- OpenAIResponseOutputMessageFunctionToolCall type: object OpenAIResponseOutputMessageMCPCall: description: >- Model Context Protocol (MCP) call output message for OpenAI responses. :param id: Unique identifier for this MCP call :param type: Tool call type identifier, always "mcp_call" :param arguments: JSON string containing the MCP call arguments :param name: Name of the MCP method being called :param server_label: Label identifying the MCP server handling the call :param error: (Optional) Error message if the MCP call failed :param output: (Optional) Output result from the successful MCP call properties: id: title: Id type: string type: const: mcp_call default: mcp_call title: Type type: string arguments: title: Arguments type: string name: title: Name type: string server_label: title: Server Label type: string error: anyOf: - type: string - type: 'null' title: Error output: anyOf: - type: string - type: 'null' title: Output required: - id - arguments - name - server_label title: OpenAIResponseOutputMessageMCPCall type: object OpenAIResponseOutputMessageMCPListTools: description: >- MCP list tools output message containing available tools from an MCP server. :param id: Unique identifier for this MCP list tools operation :param type: Tool call type identifier, always "mcp_list_tools" :param server_label: Label identifying the MCP server providing the tools :param tools: List of available tools provided by the MCP server properties: id: title: Id type: string type: const: mcp_list_tools default: mcp_list_tools title: Type type: string server_label: title: Server Label type: string tools: items: $ref: '#/$defs/MCPListToolsTool' title: Tools type: array required: - id - server_label - tools title: OpenAIResponseOutputMessageMCPListTools type: object "OpenAIResponseOutputMessageWebSearchToolCall": description: >- Web search tool call output message for OpenAI responses. :param id: Unique identifier for this tool call :param status: Current status of the web search operation :param type: Tool call type identifier, always "web_search_call" properties: id: title: Id type: string status: title: Status type: string type: const: web_search_call default: web_search_call title: Type type: string required: - id - status title: >- OpenAIResponseOutputMessageWebSearchToolCall type: object description: >- List container for OpenAI response input items. :param data: List of input items :param object: Object type identifier, always "list" properties: data: items: anyOf: - discriminator: mapping: file_search_call: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCall function_call: >- #/$defs/OpenAIResponseOutputMessageFunctionToolCall mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' mcp_call: >- #/$defs/OpenAIResponseOutputMessageMCPCall mcp_list_tools: >- #/$defs/OpenAIResponseOutputMessageMCPListTools message: '#/$defs/OpenAIResponseMessage' web_search_call: >- #/$defs/OpenAIResponseOutputMessageWebSearchToolCall propertyName: type oneOf: - $ref: '#/$defs/OpenAIResponseMessage' - $ref: >- #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageFunctionToolCall - $ref: >- #/$defs/OpenAIResponseOutputMessageMCPCall - $ref: >- #/$defs/OpenAIResponseOutputMessageMCPListTools - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' - $ref: >- #/$defs/OpenAIResponseInputFunctionToolCallOutput - $ref: >- #/$defs/OpenAIResponseMCPApprovalResponse - $ref: '#/$defs/OpenAIResponseMessage' title: Data type: array object: const: list default: list title: Object type: string required: - data title: ListOpenAIResponseInputItem type: object RunShieldRequest: type: object RunShieldResponse: $defs: SafetyViolation: description: >- Details of a safety violation detected by content moderation. :param violation_level: Severity level of the violation :param user_message: (Optional) Message to convey to the user about the violation :param metadata: Additional metadata including specific violation codes for debugging and telemetry properties: violation_level: $ref: '#/$defs/ViolationLevel' user_message: anyOf: - type: string - type: 'null' title: User Message metadata: additionalProperties: true title: Metadata type: object required: - violation_level title: SafetyViolation type: object ViolationLevel: description: >- Severity level of a safety violation. :cvar INFO: Informational level violation that does not require action :cvar WARN: Warning level violation that suggests caution but allows continuation :cvar ERROR: Error level violation that requires blocking or intervention enum: - info - warn - error title: ViolationLevel type: string description: >- Response from running a safety shield. :param violation: (Optional) Safety violation detected by the shield, if any properties: violation: anyOf: - $ref: '#/$defs/SafetyViolation' - type: 'null' title: RunShieldResponse type: object ListScoringFunctionsResponse: $defs: AgentTurnInputType: description: >- Parameter type for agent turn input. :param type: Discriminator type. Always "agent_turn_input" properties: type: const: agent_turn_input default: agent_turn_input title: Type type: string title: AgentTurnInputType type: object AggregationFunctionType: description: >- Types of aggregation functions for scoring results. :cvar average: Calculate the arithmetic mean of scores :cvar weighted_average: Calculate a weighted average of scores :cvar median: Calculate the median value of scores :cvar categorical_count: Count occurrences of categorical values :cvar accuracy: Calculate accuracy as the proportion of correct answers enum: - average - weighted_average - median - categorical_count - accuracy title: AggregationFunctionType type: string ArrayType: description: >- Parameter type for array values. :param type: Discriminator type. Always "array" properties: type: const: array default: array title: Type type: string title: ArrayType type: object BasicScoringFnParams: description: >- Parameters for basic scoring function configuration. :param type: The type of scoring function parameters, always basic :param aggregation_functions: Aggregation functions to apply to the scores of each row properties: type: const: basic default: basic title: Type type: string aggregation_functions: description: >- Aggregation functions to apply to the scores of each row items: $ref: '#/$defs/AggregationFunctionType' title: Aggregation Functions type: array title: BasicScoringFnParams type: object BooleanType: description: >- Parameter type for boolean values. :param type: Discriminator type. Always "boolean" properties: type: const: boolean default: boolean title: Type type: string title: BooleanType type: object ChatCompletionInputType: description: >- Parameter type for chat completion input. :param type: Discriminator type. Always "chat_completion_input" properties: type: const: chat_completion_input default: chat_completion_input title: Type type: string title: ChatCompletionInputType type: object CompletionInputType: description: >- Parameter type for completion input. :param type: Discriminator type. Always "completion_input" properties: type: const: completion_input default: completion_input title: Type type: string title: CompletionInputType type: object JsonType: description: >- Parameter type for JSON values. :param type: Discriminator type. Always "json" properties: type: const: json default: json title: Type type: string title: JsonType type: object LLMAsJudgeScoringFnParams: description: >- Parameters for LLM-as-judge scoring function configuration. :param type: The type of scoring function parameters, always llm_as_judge :param judge_model: Identifier of the LLM model to use as a judge for scoring :param prompt_template: (Optional) Custom prompt template for the judge model :param judge_score_regexes: Regexes to extract the answer from generated response :param aggregation_functions: Aggregation functions to apply to the scores of each row properties: type: const: llm_as_judge default: llm_as_judge title: Type type: string judge_model: title: Judge Model type: string prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template judge_score_regexes: description: >- Regexes to extract the answer from generated response items: type: string title: Judge Score Regexes type: array aggregation_functions: description: >- Aggregation functions to apply to the scores of each row items: $ref: '#/$defs/AggregationFunctionType' title: Aggregation Functions type: array required: - judge_model title: LLMAsJudgeScoringFnParams type: object NumberType: description: >- Parameter type for numeric values. :param type: Discriminator type. Always "number" properties: type: const: number default: number title: Type type: string title: NumberType type: object ObjectType: description: >- Parameter type for object values. :param type: Discriminator type. Always "object" properties: type: const: object default: object title: Type type: string title: ObjectType type: object RegexParserScoringFnParams: description: >- Parameters for regex parser scoring function configuration. :param type: The type of scoring function parameters, always regex_parser :param parsing_regexes: Regex to extract the answer from generated response :param aggregation_functions: Aggregation functions to apply to the scores of each row properties: type: const: regex_parser default: regex_parser title: Type type: string parsing_regexes: description: >- Regex to extract the answer from generated response items: type: string title: Parsing Regexes type: array aggregation_functions: description: >- Aggregation functions to apply to the scores of each row items: $ref: '#/$defs/AggregationFunctionType' title: Aggregation Functions type: array title: RegexParserScoringFnParams type: object ScoringFn: description: >- A scoring function resource for evaluating model outputs. :param type: The resource type, always scoring_function properties: identifier: description: >- Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: anyOf: - type: string - type: 'null' description: >- Unique identifier for this resource in the provider title: Provider Resource Id provider_id: description: >- ID of the provider that owns this resource title: Provider Id type: string type: const: scoring_function default: scoring_function title: Type type: string description: anyOf: - type: string - type: 'null' title: Description metadata: additionalProperties: true description: >- Any additional metadata for this definition title: Metadata type: object return_type: description: >- The return type of the deterministic function discriminator: mapping: agent_turn_input: '#/$defs/AgentTurnInputType' array: '#/$defs/ArrayType' boolean: '#/$defs/BooleanType' chat_completion_input: '#/$defs/ChatCompletionInputType' completion_input: '#/$defs/CompletionInputType' json: '#/$defs/JsonType' number: '#/$defs/NumberType' object: '#/$defs/ObjectType' string: '#/$defs/StringType' union: '#/$defs/UnionType' propertyName: type oneOf: - $ref: '#/$defs/StringType' - $ref: '#/$defs/NumberType' - $ref: '#/$defs/BooleanType' - $ref: '#/$defs/ArrayType' - $ref: '#/$defs/ObjectType' - $ref: '#/$defs/JsonType' - $ref: '#/$defs/UnionType' - $ref: '#/$defs/ChatCompletionInputType' - $ref: '#/$defs/CompletionInputType' - $ref: '#/$defs/AgentTurnInputType' title: Return Type params: anyOf: - discriminator: mapping: basic: '#/$defs/BasicScoringFnParams' llm_as_judge: '#/$defs/LLMAsJudgeScoringFnParams' regex_parser: '#/$defs/RegexParserScoringFnParams' propertyName: type oneOf: - $ref: '#/$defs/LLMAsJudgeScoringFnParams' - $ref: '#/$defs/RegexParserScoringFnParams' - $ref: '#/$defs/BasicScoringFnParams' - type: 'null' description: >- The parameters for the scoring function for benchmark eval, these can be overridden for app eval title: Params required: - identifier - provider_id - return_type title: ScoringFn type: object StringType: description: >- Parameter type for string values. :param type: Discriminator type. Always "string" properties: type: const: string default: string title: Type type: string title: StringType type: object UnionType: description: >- Parameter type for union values. :param type: Discriminator type. Always "union" properties: type: const: union default: union title: Type type: string title: UnionType type: object properties: data: items: $ref: '#/$defs/ScoringFn' title: Data type: array required: - data title: ListScoringFunctionsResponse type: object RegisterScoringFunctionRequest: type: object ScoringFn: $defs: AgentTurnInputType: description: >- Parameter type for agent turn input. :param type: Discriminator type. Always "agent_turn_input" properties: type: const: agent_turn_input default: agent_turn_input title: Type type: string title: AgentTurnInputType type: object AggregationFunctionType: description: >- Types of aggregation functions for scoring results. :cvar average: Calculate the arithmetic mean of scores :cvar weighted_average: Calculate a weighted average of scores :cvar median: Calculate the median value of scores :cvar categorical_count: Count occurrences of categorical values :cvar accuracy: Calculate accuracy as the proportion of correct answers enum: - average - weighted_average - median - categorical_count - accuracy title: AggregationFunctionType type: string ArrayType: description: >- Parameter type for array values. :param type: Discriminator type. Always "array" properties: type: const: array default: array title: Type type: string title: ArrayType type: object BasicScoringFnParams: description: >- Parameters for basic scoring function configuration. :param type: The type of scoring function parameters, always basic :param aggregation_functions: Aggregation functions to apply to the scores of each row properties: type: const: basic default: basic title: Type type: string aggregation_functions: description: >- Aggregation functions to apply to the scores of each row items: $ref: '#/$defs/AggregationFunctionType' title: Aggregation Functions type: array title: BasicScoringFnParams type: object BooleanType: description: >- Parameter type for boolean values. :param type: Discriminator type. Always "boolean" properties: type: const: boolean default: boolean title: Type type: string title: BooleanType type: object ChatCompletionInputType: description: >- Parameter type for chat completion input. :param type: Discriminator type. Always "chat_completion_input" properties: type: const: chat_completion_input default: chat_completion_input title: Type type: string title: ChatCompletionInputType type: object CompletionInputType: description: >- Parameter type for completion input. :param type: Discriminator type. Always "completion_input" properties: type: const: completion_input default: completion_input title: Type type: string title: CompletionInputType type: object JsonType: description: >- Parameter type for JSON values. :param type: Discriminator type. Always "json" properties: type: const: json default: json title: Type type: string title: JsonType type: object LLMAsJudgeScoringFnParams: description: >- Parameters for LLM-as-judge scoring function configuration. :param type: The type of scoring function parameters, always llm_as_judge :param judge_model: Identifier of the LLM model to use as a judge for scoring :param prompt_template: (Optional) Custom prompt template for the judge model :param judge_score_regexes: Regexes to extract the answer from generated response :param aggregation_functions: Aggregation functions to apply to the scores of each row properties: type: const: llm_as_judge default: llm_as_judge title: Type type: string judge_model: title: Judge Model type: string prompt_template: anyOf: - type: string - type: 'null' title: Prompt Template judge_score_regexes: description: >- Regexes to extract the answer from generated response items: type: string title: Judge Score Regexes type: array aggregation_functions: description: >- Aggregation functions to apply to the scores of each row items: $ref: '#/$defs/AggregationFunctionType' title: Aggregation Functions type: array required: - judge_model title: LLMAsJudgeScoringFnParams type: object NumberType: description: >- Parameter type for numeric values. :param type: Discriminator type. Always "number" properties: type: const: number default: number title: Type type: string title: NumberType type: object ObjectType: description: >- Parameter type for object values. :param type: Discriminator type. Always "object" properties: type: const: object default: object title: Type type: string title: ObjectType type: object RegexParserScoringFnParams: description: >- Parameters for regex parser scoring function configuration. :param type: The type of scoring function parameters, always regex_parser :param parsing_regexes: Regex to extract the answer from generated response :param aggregation_functions: Aggregation functions to apply to the scores of each row properties: type: const: regex_parser default: regex_parser title: Type type: string parsing_regexes: description: >- Regex to extract the answer from generated response items: type: string title: Parsing Regexes type: array aggregation_functions: description: >- Aggregation functions to apply to the scores of each row items: $ref: '#/$defs/AggregationFunctionType' title: Aggregation Functions type: array title: RegexParserScoringFnParams type: object StringType: description: >- Parameter type for string values. :param type: Discriminator type. Always "string" properties: type: const: string default: string title: Type type: string title: StringType type: object UnionType: description: >- Parameter type for union values. :param type: Discriminator type. Always "union" properties: type: const: union default: union title: Type type: string title: UnionType type: object description: >- A scoring function resource for evaluating model outputs. :param type: The resource type, always scoring_function properties: identifier: description: >- Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: anyOf: - type: string - type: 'null' description: >- Unique identifier for this resource in the provider title: Provider Resource Id provider_id: description: >- ID of the provider that owns this resource title: Provider Id type: string type: const: scoring_function default: scoring_function title: Type type: string description: anyOf: - type: string - type: 'null' title: Description metadata: additionalProperties: true description: >- Any additional metadata for this definition title: Metadata type: object return_type: description: >- The return type of the deterministic function discriminator: mapping: agent_turn_input: '#/$defs/AgentTurnInputType' array: '#/$defs/ArrayType' boolean: '#/$defs/BooleanType' chat_completion_input: '#/$defs/ChatCompletionInputType' completion_input: '#/$defs/CompletionInputType' json: '#/$defs/JsonType' number: '#/$defs/NumberType' object: '#/$defs/ObjectType' string: '#/$defs/StringType' union: '#/$defs/UnionType' propertyName: type oneOf: - $ref: '#/$defs/StringType' - $ref: '#/$defs/NumberType' - $ref: '#/$defs/BooleanType' - $ref: '#/$defs/ArrayType' - $ref: '#/$defs/ObjectType' - $ref: '#/$defs/JsonType' - $ref: '#/$defs/UnionType' - $ref: '#/$defs/ChatCompletionInputType' - $ref: '#/$defs/CompletionInputType' - $ref: '#/$defs/AgentTurnInputType' title: Return Type params: anyOf: - discriminator: mapping: basic: '#/$defs/BasicScoringFnParams' llm_as_judge: '#/$defs/LLMAsJudgeScoringFnParams' regex_parser: '#/$defs/RegexParserScoringFnParams' propertyName: type oneOf: - $ref: '#/$defs/LLMAsJudgeScoringFnParams' - $ref: '#/$defs/RegexParserScoringFnParams' - $ref: '#/$defs/BasicScoringFnParams' - type: 'null' description: >- The parameters for the scoring function for benchmark eval, these can be overridden for app eval title: Params required: - identifier - provider_id - return_type title: ScoringFn type: object ScoreRequest: type: object ScoreResponse: $defs: ScoringResult: description: >- A scoring result for a single row. :param score_rows: The scoring result for each row. Each row is a map of column name to value. :param aggregated_results: Map of metric name to aggregated value properties: score_rows: items: additionalProperties: true type: object title: Score Rows type: array aggregated_results: additionalProperties: true title: Aggregated Results type: object required: - score_rows - aggregated_results title: ScoringResult type: object description: >- The response from scoring. :param results: A map of scoring function name to ScoringResult. properties: results: additionalProperties: $ref: '#/$defs/ScoringResult' title: Results type: object required: - results title: ScoreResponse type: object ScoreBatchRequest: type: object ScoreBatchResponse: $defs: ScoringResult: description: >- A scoring result for a single row. :param score_rows: The scoring result for each row. Each row is a map of column name to value. :param aggregated_results: Map of metric name to aggregated value properties: score_rows: items: additionalProperties: true type: object title: Score Rows type: array aggregated_results: additionalProperties: true title: Aggregated Results type: object required: - score_rows - aggregated_results title: ScoringResult type: object description: >- Response from batch scoring operations on datasets. :param dataset_id: (Optional) The identifier of the dataset that was scored :param results: A map of scoring function name to ScoringResult properties: dataset_id: anyOf: - type: string - type: 'null' title: Dataset Id results: additionalProperties: $ref: '#/$defs/ScoringResult' title: Results type: object required: - results title: ScoreBatchResponse type: object ListShieldsResponse: $defs: Shield: description: >- A safety shield resource that can be used to check content. :param params: (Optional) Configuration parameters for the shield :param type: The resource type, always shield properties: identifier: description: >- Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: anyOf: - type: string - type: 'null' description: >- Unique identifier for this resource in the provider title: Provider Resource Id provider_id: description: >- ID of the provider that owns this resource title: Provider Id type: string type: const: shield default: shield title: Type type: string params: anyOf: - additionalProperties: true type: object - type: 'null' title: Params required: - identifier - provider_id title: Shield type: object properties: data: items: $ref: '#/$defs/Shield' title: Data type: array required: - data title: ListShieldsResponse type: object RegisterShieldRequest: type: object properties: shield_id: type: string description: >- The identifier of the shield to register. provider_shield_id: type: string description: >- The identifier of the shield in the provider. provider_id: type: string description: The identifier of the provider. params: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: The parameters of the shield. additionalProperties: false required: - shield_id title: RegisterShieldRequest InvokeToolRequest: type: object properties: tool_name: type: string description: The name of the tool to invoke. kwargs: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- A dictionary of arguments to pass to the tool. additionalProperties: false required: - tool_name - kwargs title: InvokeToolRequest ImageContentItem: type: object properties: type: type: string const: image default: image description: >- Discriminator type of the content item. Always "image" image: type: object properties: url: $ref: '#/components/schemas/URL' description: >- A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits. data: type: string contentEncoding: base64 description: base64 encoded image data as string additionalProperties: false description: >- Image as a base64 encoded string or an URL additionalProperties: false required: - type - image title: ImageContentItem description: A image content item InterleavedContent: oneOf: - type: string - $ref: '#/components/schemas/InterleavedContentItem' - type: array items: $ref: '#/components/schemas/InterleavedContentItem' InterleavedContentItem: oneOf: - $ref: '#/components/schemas/ImageContentItem' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: image: '#/components/schemas/ImageContentItem' text: '#/components/schemas/TextContentItem' TextContentItem: type: object properties: type: type: string const: text default: text description: >- Discriminator type of the content item. Always "text" text: type: string description: Text content additionalProperties: false required: - type - text title: TextContentItem description: A text content item ToolInvocationResult: type: object properties: content: $ref: '#/components/schemas/InterleavedContent' description: >- (Optional) The output content from the tool execution error_message: type: string description: >- (Optional) Error message if the tool execution failed error_code: type: integer description: >- (Optional) Numeric error code if the tool execution failed metadata: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- (Optional) Additional metadata about the tool execution additionalProperties: false title: ToolInvocationResult description: Result of a tool invocation. URL: type: object properties: uri: type: string description: The URL string pointing to the resource additionalProperties: false required: - uri title: URL description: A URL reference to external content. ToolDef: type: object properties: toolgroup_id: type: string description: >- (Optional) ID of the tool group this tool belongs to name: type: string description: Name of the tool description: type: string description: >- (Optional) Human-readable description of what the tool does input_schema: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- (Optional) JSON Schema for tool inputs (MCP inputSchema) output_schema: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- (Optional) JSON Schema for tool outputs (MCP outputSchema) metadata: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- (Optional) Additional metadata about the tool additionalProperties: false required: - name title: ToolDef description: >- Tool definition used in runtime contexts. ListToolDefsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/ToolDef' description: List of tool definitions additionalProperties: false required: - data title: ListToolDefsResponse description: >- Response containing a list of tool definitions. RAGDocument: type: object properties: document_id: type: string description: The unique identifier for the document. content: oneOf: - type: string - $ref: '#/components/schemas/InterleavedContentItem' - type: array items: $ref: '#/components/schemas/InterleavedContentItem' - $ref: '#/components/schemas/URL' description: The content of the document. mime_type: type: string description: The MIME type of the document. metadata: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: Additional metadata for the document. additionalProperties: false required: - document_id - content - metadata title: RAGDocument description: >- A document to be used for document ingestion in the RAG Tool. InsertRequest: type: object properties: documents: type: array items: $ref: '#/components/schemas/RAGDocument' description: >- List of documents to index in the RAG system vector_store_id: type: string description: >- ID of the vector database to store the document embeddings chunk_size_in_tokens: type: integer description: >- (Optional) Size in tokens for document chunking during indexing additionalProperties: false required: - documents - vector_store_id - chunk_size_in_tokens title: InsertRequest DefaultRAGQueryGeneratorConfig: type: object properties: type: type: string const: default default: default description: >- Type of query generator, always 'default' separator: type: string default: ' ' description: >- String separator used to join query terms additionalProperties: false required: - type - separator title: DefaultRAGQueryGeneratorConfig description: >- Configuration for the default RAG query generator. LLMRAGQueryGeneratorConfig: type: object properties: type: type: string const: llm default: llm description: Type of query generator, always 'llm' model: type: string description: >- Name of the language model to use for query generation template: type: string description: >- Template string for formatting the query generation prompt additionalProperties: false required: - type - model - template title: LLMRAGQueryGeneratorConfig description: >- Configuration for the LLM-based RAG query generator. RAGQueryConfig: type: object properties: query_generator_config: oneOf: - $ref: '#/components/schemas/DefaultRAGQueryGeneratorConfig' - $ref: '#/components/schemas/LLMRAGQueryGeneratorConfig' discriminator: propertyName: type mapping: default: '#/components/schemas/DefaultRAGQueryGeneratorConfig' llm: '#/components/schemas/LLMRAGQueryGeneratorConfig' description: Configuration for the query generator. max_tokens_in_context: type: integer default: 4096 description: Maximum number of tokens in the context. max_chunks: type: integer default: 5 description: Maximum number of chunks to retrieve. chunk_template: type: string default: > Result {index} :param params: (Optional) Configuration parameters for the shield :param type: The resource type, always shield properties: identifier: description: >- Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: anyOf: - type: string - type: 'null' description: >- Unique identifier for this resource in the provider title: Provider Resource Id provider_id: description: >- ID of the provider that owns this resource title: Provider Id type: string type: const: shield default: shield title: Type type: string params: anyOf: - additionalProperties: true type: object - type: 'null' title: Params required: - identifier - provider_id title: Shield type: object SyntheticDataGenerateRequest: type: object SyntheticDataGenerationResponse: description: >- Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold. :param synthetic_data: List of generated synthetic data samples that passed the filtering criteria :param statistics: (Optional) Statistical information about the generation process and filtering results properties: synthetic_data: items: additionalProperties: true type: object title: Synthetic Data type: array statistics: anyOf: - additionalProperties: true type: object - type: 'null' title: Statistics required: - synthetic_data title: SyntheticDataGenerationResponse type: object InvokeToolRequest: type: object ToolInvocationResult: $defs: ImageContentItem: description: >- A image content item :param type: Discriminator type of the content item. Always "image" :param image: Image as a base64 encoded string or an URL properties: type: const: image default: image title: Type type: string image: $ref: '#/$defs/_URLOrData' required: - image title: ImageContentItem type: object TextContentItem: description: >- A text content item :param type: Discriminator type of the content item. Always "text" :param text: Text content properties: type: const: text default: text title: Type type: string text: title: Text type: string required: - text title: TextContentItem type: object URL: description: >- A URL reference to external content. :param uri: The URL string pointing to the resource properties: uri: title: Uri type: string required: - uri title: URL type: object _URLOrData: description: >- A URL or a base64 encoded string :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits. :param data: base64 encoded image data as string properties: url: anyOf: - $ref: '#/$defs/URL' - type: 'null' data: anyOf: - type: string - type: 'null' contentEncoding: base64 title: Data title: _URLOrData type: object description: >- Result of a tool invocation. :param content: (Optional) The output content from the tool execution :param error_message: (Optional) Error message if the tool execution failed :param error_code: (Optional) Numeric error code if the tool execution failed :param metadata: (Optional) Additional metadata about the tool execution properties: content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array - type: 'null' title: Content error_message: anyOf: - type: string - type: 'null' title: Error Message error_code: anyOf: - type: integer - type: 'null' title: Error Code metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata title: ToolInvocationResult type: object URL: description: >- A URL reference to external content. :param uri: The URL string pointing to the resource properties: uri: title: Uri type: string required: - uri title: URL type: object ListToolDefsResponse: $defs: ToolDef: description: >- Tool definition used in runtime contexts. :param name: Name of the tool :param description: (Optional) Human-readable description of what the tool does :param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema) :param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema) :param metadata: (Optional) Additional metadata about the tool :param toolgroup_id: (Optional) ID of the tool group this tool belongs to properties: toolgroup_id: anyOf: - type: string - type: 'null' title: Toolgroup Id name: title: Name type: string description: anyOf: - type: string - type: 'null' title: Description input_schema: anyOf: - additionalProperties: true type: object - type: 'null' title: Input Schema output_schema: anyOf: - additionalProperties: true type: object - type: 'null' title: Output Schema metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata required: - name title: ToolDef type: object description: >- Response containing a list of tool definitions. :param data: List of tool definitions properties: data: items: $ref: '#/$defs/ToolDef' title: Data type: array required: - data title: ListToolDefsResponse type: object InsertRequest: type: object QueryRequest: type: object RAGQueryResult: $defs: ImageContentItem: description: >- A image content item :param type: Discriminator type of the content item. Always "image" :param image: Image as a base64 encoded string or an URL properties: type: const: image default: image title: Type type: string image: $ref: '#/$defs/_URLOrData' required: - image title: ImageContentItem type: object TextContentItem: description: >- A text content item :param type: Discriminator type of the content item. Always "text" :param text: Text content properties: type: const: text default: text title: Type type: string text: title: Text type: string required: - text title: TextContentItem type: object URL: description: >- A URL reference to external content. :param uri: The URL string pointing to the resource properties: uri: title: Uri type: string required: - uri title: URL type: object _URLOrData: description: >- A URL or a base64 encoded string :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits. :param data: base64 encoded image data as string properties: url: anyOf: - $ref: '#/$defs/URL' - type: 'null' data: anyOf: - type: string - type: 'null' contentEncoding: base64 title: Data title: _URLOrData type: object description: >- Result of a RAG query containing retrieved content and metadata. :param content: (Optional) The retrieved content from the query :param metadata: Additional metadata about the query result properties: content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array - type: 'null' title: Content metadata: additionalProperties: true title: Metadata type: object title: RAGQueryResult type: object ListToolGroupsResponse: $defs: ToolGroup: description: >- A group of related tools managed together. :param type: Type of resource, always 'tool_group' :param mcp_endpoint: (Optional) Model Context Protocol endpoint for remote tools :param args: (Optional) Additional arguments for the tool group properties: identifier: description: >- Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: anyOf: - type: string - type: 'null' description: >- Unique identifier for this resource in the provider title: Provider Resource Id provider_id: description: >- ID of the provider that owns this resource title: Provider Id type: string type: const: tool_group default: tool_group title: Type type: string mcp_endpoint: anyOf: - $ref: '#/$defs/URL' - type: 'null' args: anyOf: - additionalProperties: true type: object - type: 'null' title: Args required: - identifier - provider_id title: ToolGroup type: object URL: description: >- A URL reference to external content. :param uri: The URL string pointing to the resource properties: uri: title: Uri type: string required: - uri title: URL type: object description: >- Response containing a list of tool groups. :param data: List of tool groups properties: data: items: $ref: '#/$defs/ToolGroup' title: Data type: array required: - data title: ListToolGroupsResponse type: object RegisterToolGroupRequest: type: object ToolGroup: $defs: URL: description: >- A URL reference to external content. :param uri: The URL string pointing to the resource properties: uri: title: Uri type: string required: - uri title: URL type: object description: >- A group of related tools managed together. :param type: Type of resource, always 'tool_group' :param mcp_endpoint: (Optional) Model Context Protocol endpoint for remote tools :param args: (Optional) Additional arguments for the tool group properties: identifier: description: >- Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: anyOf: - type: string - type: 'null' description: >- Unique identifier for this resource in the provider title: Provider Resource Id provider_id: description: >- ID of the provider that owns this resource title: Provider Id type: string type: const: tool_group default: tool_group title: Type type: string mcp_endpoint: anyOf: - $ref: '#/$defs/URL' - type: 'null' args: anyOf: - additionalProperties: true type: object - type: 'null' title: Args required: - identifier - provider_id title: ToolGroup type: object ToolDef: description: >- Tool definition used in runtime contexts. :param name: Name of the tool :param description: (Optional) Human-readable description of what the tool does :param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema) :param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema) :param metadata: (Optional) Additional metadata about the tool :param toolgroup_id: (Optional) ID of the tool group this tool belongs to properties: toolgroup_id: anyOf: - type: string - type: 'null' title: Toolgroup Id name: title: Name type: string description: The ID of the tool group to register. provider_id: type: string description: >- The ID of the provider to use for the tool group. mcp_endpoint: $ref: '#/components/schemas/URL' description: >- The MCP endpoint to use for the tool group. args: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- A dictionary of arguments to pass to the tool group. additionalProperties: false required: - toolgroup_id - provider_id title: RegisterToolGroupRequest Chunk: type: object properties: content: $ref: '#/components/schemas/InterleavedContent' description: >- The content of the chunk, which can be interleaved text, images, or other types. chunk_id: type: string description: >- Unique identifier for the chunk. Must be provided explicitly. metadata: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- Metadata associated with the chunk that will be used in the model context during inference. embedding: type: array items: type: number description: >- Optional embedding for the chunk. If not provided, it will be computed later. chunk_metadata: $ref: '#/components/schemas/ChunkMetadata' description: >- Metadata for the chunk that will NOT be used in the context during inference. The `chunk_metadata` is required backend functionality. additionalProperties: false required: - content - chunk_id - metadata title: Chunk description: >- A chunk of content that can be inserted into a vector database. ChunkMetadata: type: object InsertChunksRequest: type: object QueryChunksRequest: type: object QueryChunksResponse: $defs: Chunk: description: >- A chunk of content that can be inserted into a vector database. :param content: The content of the chunk, which can be interleaved text, images, or other types. :param embedding: Optional embedding for the chunk. If not provided, it will be computed later. :param metadata: Metadata associated with the chunk that will be used in the model context during inference. :param stored_chunk_id: The chunk ID that is stored in the vector database. Used for backend functionality. :param chunk_metadata: Metadata for the chunk that will NOT be used in the context during inference. The `chunk_metadata` is required backend functionality. properties: content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content metadata: additionalProperties: true title: Metadata type: object embedding: anyOf: - items: type: number type: array - type: 'null' title: Embedding chunk_id: anyOf: - type: string - type: 'null' title: Chunk Id chunk_metadata: anyOf: - $ref: '#/$defs/ChunkMetadata' - type: 'null' required: - content title: Chunk type: object ChunkMetadata: description: >- `ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional information about the chunk that will not be used in the context during inference, but is required for backend functionality. The `ChunkMetadata` is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not expected to change after. Use `Chunk.metadata` for metadata that will be used in the context during inference. :param chunk_id: The ID of the chunk. If not set, it will be generated based on the document ID and content. :param document_id: The ID of the document this chunk belongs to. :param source: The source of the content, such as a URL, file path, or other identifier. :param created_timestamp: An optional timestamp indicating when the chunk was created. :param updated_timestamp: An optional timestamp indicating when the chunk was last updated. :param chunk_window: The window of the chunk, which can be used to group related chunks together. :param chunk_tokenizer: The tokenizer used to create the chunk. Default is Tiktoken. :param chunk_embedding_model: The embedding model used to create the chunk's embedding. :param chunk_embedding_dimension: The dimension of the embedding vector for the chunk. :param content_token_count: The number of tokens in the content of the chunk. :param metadata_token_count: The number of tokens in the metadata of the chunk. properties: chunk_id: anyOf: - type: string - type: 'null' title: Chunk Id document_id: anyOf: - type: string - type: 'null' title: Document Id source: anyOf: - type: string - type: 'null' title: Source created_timestamp: anyOf: - type: integer - type: 'null' title: Created Timestamp updated_timestamp: anyOf: - type: integer - type: 'null' title: Updated Timestamp chunk_window: anyOf: - type: string - type: 'null' title: Chunk Window chunk_tokenizer: anyOf: - type: string - type: 'null' title: Chunk Tokenizer chunk_embedding_model: anyOf: - type: string - type: 'null' title: Chunk Embedding Model chunk_embedding_dimension: anyOf: - type: integer - type: 'null' title: Chunk Embedding Dimension content_token_count: anyOf: - type: integer - type: 'null' title: Content Token Count metadata_token_count: anyOf: - type: integer - type: 'null' title: Metadata Token Count title: ChunkMetadata type: object ImageContentItem: description: >- A image content item :param type: Discriminator type of the content item. Always "image" :param image: Image as a base64 encoded string or an URL properties: type: const: image default: image title: Type type: string image: $ref: '#/$defs/_URLOrData' required: - image title: ImageContentItem type: object TextContentItem: description: >- A text content item :param type: Discriminator type of the content item. Always "text" :param text: Text content properties: type: const: text default: text title: Type type: string text: title: Text type: string required: - text title: TextContentItem type: object URL: description: >- A URL reference to external content. :param uri: The URL string pointing to the resource properties: uri: title: Uri type: string required: - uri title: URL type: object _URLOrData: description: >- A URL or a base64 encoded string :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits. :param data: base64 encoded image data as string properties: url: anyOf: - $ref: '#/$defs/URL' - type: 'null' data: anyOf: - type: string - type: 'null' contentEncoding: base64 title: Data title: _URLOrData type: object description: >- Response from querying chunks in a vector database. :param chunks: List of content chunks returned from the query :param scores: Relevance scores corresponding to each returned chunk properties: chunks: items: $ref: '#/$defs/Chunk' title: Chunks type: array scores: items: type: number title: Scores type: array required: - chunks - scores title: QueryChunksResponse type: object VectorStoreListResponse: $defs: VectorStoreFileCounts: description: >- File processing status counts for a vector store. :param completed: Number of files that have been successfully processed :param cancelled: Number of files that had their processing cancelled :param failed: Number of files that failed to process :param in_progress: Number of files currently being processed :param total: Total number of files in the vector store properties: completed: title: Completed type: integer cancelled: title: Cancelled type: integer failed: title: Failed type: integer in_progress: title: In Progress type: integer total: title: Total type: integer required: - completed - cancelled - failed - in_progress - total title: VectorStoreFileCounts type: object VectorStoreObject: description: >- OpenAI Vector Store object. :param id: Unique identifier for the vector store :param object: Object type identifier, always "vector_store" :param created_at: Timestamp when the vector store was created :param name: (Optional) Name of the vector store :param usage_bytes: Storage space used by the vector store in bytes :param file_counts: File processing status counts for the vector store :param status: Current status of the vector store :param expires_after: (Optional) Expiration policy for the vector store :param expires_at: (Optional) Timestamp when the vector store will expire :param last_active_at: (Optional) Timestamp of last activity on the vector store :param metadata: Set of key-value pairs that can be attached to the vector store properties: id: title: Id type: string object: default: vector_store title: Object type: string created_at: title: Created At type: integer name: anyOf: - type: string - type: 'null' title: Name usage_bytes: default: 0 title: Usage Bytes type: integer file_counts: $ref: '#/$defs/VectorStoreFileCounts' status: default: completed title: Status type: string expires_after: anyOf: - additionalProperties: true type: object - type: 'null' title: Expires After expires_at: anyOf: - type: integer - type: 'null' title: Expires At last_active_at: anyOf: - type: integer - type: 'null' title: Last Active At metadata: additionalProperties: true title: Metadata type: object required: - id - created_at - file_counts title: VectorStoreObject type: object description: >- Response from listing vector stores. :param object: Object type identifier, always "list" :param data: List of vector store objects :param first_id: (Optional) ID of the first vector store in the list for pagination :param last_id: (Optional) ID of the last vector store in the list for pagination :param has_more: Whether there are more vector stores available beyond this page properties: object: default: list title: Object type: string data: items: $ref: '#/$defs/VectorStoreObject' title: Data type: array first_id: anyOf: - type: string - type: 'null' title: First Id last_id: anyOf: - type: string - type: 'null' title: Last Id has_more: default: false title: Has More type: boolean required: - data title: VectorStoreListResponse type: object VectorStoreObject: $defs: VectorStoreFileCounts: description: >- File processing status counts for a vector store. :param completed: Number of files that have been successfully processed :param cancelled: Number of files that had their processing cancelled :param failed: Number of files that failed to process :param in_progress: Number of files currently being processed :param total: Total number of files in the vector store properties: completed: title: Completed type: integer cancelled: title: Cancelled type: integer failed: title: Failed type: integer in_progress: title: In Progress type: integer total: title: Total type: integer required: - completed - cancelled - failed - in_progress - total title: VectorStoreFileCounts type: object description: >- OpenAI Vector Store object. :param id: Unique identifier for the vector store :param object: Object type identifier, always "vector_store" :param created_at: Timestamp when the vector store was created :param name: (Optional) Name of the vector store :param usage_bytes: Storage space used by the vector store in bytes :param file_counts: File processing status counts for the vector store :param status: Current status of the vector store :param expires_after: (Optional) Expiration policy for the vector store :param expires_at: (Optional) Timestamp when the vector store will expire :param last_active_at: (Optional) Timestamp of last activity on the vector store :param metadata: Set of key-value pairs that can be attached to the vector store properties: id: title: Id type: string object: default: vector_store title: Object type: string created_at: title: Created At type: integer name: anyOf: - type: string - type: 'null' title: Name usage_bytes: default: 0 title: Usage Bytes type: integer file_counts: $ref: '#/$defs/VectorStoreFileCounts' status: default: completed title: Status type: string expires_after: anyOf: - additionalProperties: true type: object - type: 'null' title: Expires After expires_at: anyOf: - type: integer - type: 'null' title: Expires At last_active_at: anyOf: - type: integer - type: 'null' title: Last Active At metadata: additionalProperties: true title: Metadata type: object required: - id - created_at - file_counts title: VectorStoreObject type: object OpenaiUpdateVectorStoreRequest: type: object VectorStoreDeleteResponse: description: >- Response from deleting a vector store. :param id: Unique identifier of the deleted vector store :param object: Object type identifier for the deletion response :param deleted: Whether the deletion operation was successful properties: id: title: Id type: string object: default: vector_store.deleted title: Object type: string deleted: default: true title: Deleted type: boolean required: - id title: VectorStoreDeleteResponse type: object VectorStoreFileBatchObject: $defs: VectorStoreFileCounts: description: >- File processing status counts for a vector store. :param completed: Number of files that have been successfully processed :param cancelled: Number of files that had their processing cancelled :param failed: Number of files that failed to process :param in_progress: Number of files currently being processed :param total: Total number of files in the vector store properties: completed: title: Completed type: integer cancelled: title: Cancelled type: integer failed: title: Failed type: integer in_progress: title: In Progress type: integer total: title: Total type: integer required: - completed - cancelled - failed - in_progress - total title: VectorStoreFileCounts type: object description: >- OpenAI Vector Store File Batch object. :param id: Unique identifier for the file batch :param object: Object type identifier, always "vector_store.file_batch" :param created_at: Timestamp when the file batch was created :param vector_store_id: ID of the vector store containing the file batch :param status: Current processing status of the file batch :param file_counts: File processing status counts for the batch properties: id: title: Id type: string object: default: vector_store.file_batch title: Object type: string created_at: title: Created At type: integer vector_store_id: title: Vector Store Id type: string status: anyOf: - const: completed type: string - const: in_progress type: string - const: cancelled type: string - const: failed type: string title: Status file_counts: $ref: '#/$defs/VectorStoreFileCounts' required: - id - created_at - vector_store_id - status - file_counts title: VectorStoreFileBatchObject type: object VectorStoreFilesListInBatchResponse: $defs: VectorStoreChunkingStrategyAuto: description: >- Automatic chunking strategy for vector store files. :param type: Strategy type, always "auto" for automatic chunking properties: type: const: auto default: auto title: Type type: string title: VectorStoreChunkingStrategyAuto type: object VectorStoreChunkingStrategyStatic: description: >- Static chunking strategy with configurable parameters. :param type: Strategy type, always "static" for static chunking :param static: Configuration parameters for the static chunking strategy properties: type: const: static default: static title: Type type: string static: $ref: >- #/$defs/VectorStoreChunkingStrategyStaticConfig required: - static title: VectorStoreChunkingStrategyStatic type: object VectorStoreChunkingStrategyStaticConfig: description: >- Configuration for static chunking strategy. :param chunk_overlap_tokens: Number of tokens to overlap between adjacent chunks :param max_chunk_size_tokens: Maximum number of tokens per chunk, must be between 100 and 4096 properties: chunk_overlap_tokens: default: 400 title: Chunk Overlap Tokens type: integer max_chunk_size_tokens: default: 800 maximum: 4096 minimum: 100 title: Max Chunk Size Tokens type: integer title: VectorStoreChunkingStrategyStaticConfig type: object VectorStoreFileLastError: description: >- Error information for failed vector store file processing. :param code: Error code indicating the type of failure :param message: Human-readable error message describing the failure properties: code: anyOf: - const: server_error type: string - const: rate_limit_exceeded type: string title: Code message: title: Message type: string required: - code - message title: VectorStoreFileLastError type: object VectorStoreFileObject: description: >- OpenAI Vector Store File object. :param id: Unique identifier for the file :param object: Object type identifier, always "vector_store.file" :param attributes: Key-value attributes associated with the file :param chunking_strategy: Strategy used for splitting the file into chunks :param created_at: Timestamp when the file was added to the vector store :param last_error: (Optional) Error information if file processing failed :param status: Current processing status of the file :param usage_bytes: Storage space used by this file in bytes :param vector_store_id: ID of the vector store containing this file properties: id: title: Id type: string object: default: vector_store.file title: Object type: string attributes: additionalProperties: true title: Attributes type: object chunking_strategy: discriminator: mapping: auto: '#/$defs/VectorStoreChunkingStrategyAuto' static: >- #/$defs/VectorStoreChunkingStrategyStatic propertyName: type oneOf: - $ref: '#/$defs/VectorStoreChunkingStrategyAuto' - $ref: >- #/$defs/VectorStoreChunkingStrategyStatic title: Chunking Strategy created_at: title: Created At type: integer last_error: anyOf: - $ref: '#/$defs/VectorStoreFileLastError' - type: 'null' status: anyOf: - const: completed type: string - const: in_progress type: string - const: cancelled type: string - const: failed type: string title: Status usage_bytes: default: 0 title: Usage Bytes type: integer vector_store_id: title: Vector Store Id type: string required: - id - chunking_strategy - created_at - status - vector_store_id title: VectorStoreFileObject type: object description: >- Response from listing files in a vector store file batch. :param object: Object type identifier, always "list" :param data: List of vector store file objects in the batch :param first_id: (Optional) ID of the first file in the list for pagination :param last_id: (Optional) ID of the last file in the list for pagination :param has_more: Whether there are more files available beyond this page properties: object: default: list title: Object type: string data: items: $ref: '#/$defs/VectorStoreFileObject' title: Data type: array first_id: anyOf: - type: string - type: 'null' title: First Id last_id: anyOf: - type: string - type: 'null' title: Last Id has_more: default: false title: Has More type: boolean required: - data title: VectorStoreFilesListInBatchResponse type: object Union: type: object nullable: true VectorStoreListFilesResponse: $defs: VectorStoreChunkingStrategyAuto: description: >- Automatic chunking strategy for vector store files. :param type: Strategy type, always "auto" for automatic chunking properties: type: const: auto default: auto title: Type type: string title: VectorStoreChunkingStrategyAuto type: object VectorStoreChunkingStrategyStatic: description: >- Static chunking strategy with configurable parameters. :param type: Strategy type, always "static" for static chunking :param static: Configuration parameters for the static chunking strategy properties: type: const: static default: static title: Type type: string static: $ref: >- #/$defs/VectorStoreChunkingStrategyStaticConfig required: - static title: VectorStoreChunkingStrategyStatic type: object VectorStoreChunkingStrategyStaticConfig: description: >- Configuration for static chunking strategy. :param chunk_overlap_tokens: Number of tokens to overlap between adjacent chunks :param max_chunk_size_tokens: Maximum number of tokens per chunk, must be between 100 and 4096 properties: chunk_overlap_tokens: default: 400 title: Chunk Overlap Tokens type: integer max_chunk_size_tokens: default: 800 maximum: 4096 minimum: 100 title: Max Chunk Size Tokens type: integer title: VectorStoreChunkingStrategyStaticConfig type: object VectorStoreFileLastError: description: >- Error information for failed vector store file processing. :param code: Error code indicating the type of failure :param message: Human-readable error message describing the failure properties: code: anyOf: - const: server_error type: string - const: rate_limit_exceeded type: string title: Code message: title: Message type: string required: - code - message title: VectorStoreFileLastError type: object VectorStoreFileObject: description: >- OpenAI Vector Store File object. :param id: Unique identifier for the file :param object: Object type identifier, always "vector_store.file" :param attributes: Key-value attributes associated with the file :param chunking_strategy: Strategy used for splitting the file into chunks :param created_at: Timestamp when the file was added to the vector store :param last_error: (Optional) Error information if file processing failed :param status: Current processing status of the file :param usage_bytes: Storage space used by this file in bytes :param vector_store_id: ID of the vector store containing this file properties: id: title: Id type: string object: default: vector_store.file title: Object type: string attributes: additionalProperties: true title: Attributes type: object chunking_strategy: discriminator: mapping: auto: '#/$defs/VectorStoreChunkingStrategyAuto' static: >- #/$defs/VectorStoreChunkingStrategyStatic propertyName: type oneOf: - $ref: '#/$defs/VectorStoreChunkingStrategyAuto' - $ref: >- #/$defs/VectorStoreChunkingStrategyStatic title: Chunking Strategy created_at: title: Created At type: integer last_error: anyOf: - $ref: '#/$defs/VectorStoreFileLastError' - type: 'null' status: anyOf: - const: completed type: string - const: in_progress type: string - const: cancelled type: string - const: failed type: string title: Status usage_bytes: default: 0 title: Usage Bytes type: integer vector_store_id: title: Vector Store Id type: string required: - id - chunking_strategy - created_at - status - vector_store_id title: VectorStoreFileObject type: object description: >- Response from listing files in a vector store. :param object: Object type identifier, always "list" :param data: List of vector store file objects :param first_id: (Optional) ID of the first file in the list for pagination :param last_id: (Optional) ID of the last file in the list for pagination :param has_more: Whether there are more files available beyond this page properties: object: default: list title: Object type: string data: items: $ref: '#/$defs/VectorStoreFileObject' title: Data type: array first_id: anyOf: - type: string - type: 'null' title: First Id last_id: anyOf: - type: string - type: 'null' title: Last Id has_more: default: false title: Has More type: boolean required: - data title: VectorStoreListFilesResponse type: object OpenaiAttachFileToVectorStoreRequest: type: object VectorStoreFileObject: $defs: VectorStoreChunkingStrategyAuto: description: >- Automatic chunking strategy for vector store files. :param type: Strategy type, always "auto" for automatic chunking properties: type: const: auto default: auto title: Type type: string title: VectorStoreChunkingStrategyAuto type: object VectorStoreChunkingStrategyStatic: description: >- Static chunking strategy with configurable parameters. :param type: Strategy type, always "static" for static chunking :param static: Configuration parameters for the static chunking strategy properties: type: const: static default: static title: Type type: string static: $ref: >- #/$defs/VectorStoreChunkingStrategyStaticConfig required: - static title: VectorStoreChunkingStrategyStatic type: object VectorStoreChunkingStrategyStaticConfig: description: >- Configuration for static chunking strategy. :param chunk_overlap_tokens: Number of tokens to overlap between adjacent chunks :param max_chunk_size_tokens: Maximum number of tokens per chunk, must be between 100 and 4096 properties: chunk_overlap_tokens: default: 400 title: Chunk Overlap Tokens type: integer max_chunk_size_tokens: default: 800 maximum: 4096 minimum: 100 title: Max Chunk Size Tokens type: integer title: VectorStoreChunkingStrategyStaticConfig type: object VectorStoreFileLastError: description: >- Error information for failed vector store file processing. :param code: Error code indicating the type of failure :param message: Human-readable error message describing the failure properties: code: anyOf: - const: server_error type: string - const: rate_limit_exceeded type: string title: Code message: title: Message type: string required: - code - message title: VectorStoreFileLastError type: object description: >- OpenAI Vector Store File object. :param id: Unique identifier for the file :param object: Object type identifier, always "vector_store.file" :param attributes: Key-value attributes associated with the file :param chunking_strategy: Strategy used for splitting the file into chunks :param created_at: Timestamp when the file was added to the vector store :param last_error: (Optional) Error information if file processing failed :param status: Current processing status of the file :param usage_bytes: Storage space used by this file in bytes :param vector_store_id: ID of the vector store containing this file properties: id: title: Id type: string object: default: vector_store.file title: Object type: string attributes: additionalProperties: true title: Attributes type: object chunking_strategy: discriminator: mapping: auto: '#/$defs/VectorStoreChunkingStrategyAuto' static: >- #/$defs/VectorStoreChunkingStrategyStatic propertyName: type oneOf: - $ref: '#/$defs/VectorStoreChunkingStrategyAuto' - $ref: >- #/$defs/VectorStoreChunkingStrategyStatic title: Chunking Strategy created_at: title: Created At type: integer last_error: anyOf: - $ref: '#/$defs/VectorStoreFileLastError' - type: 'null' status: anyOf: - const: completed type: string - const: in_progress type: string - const: cancelled type: string - const: failed type: string title: Status usage_bytes: default: 0 title: Usage Bytes type: integer vector_store_id: title: Vector Store Id type: string required: - id - chunking_strategy - created_at - status - vector_store_id title: VectorStoreFileObject type: object OpenaiUpdateVectorStoreFileRequest: type: object VectorStoreFileDeleteResponse: description: >- Response from deleting a vector store file. :param id: Unique identifier of the deleted file :param object: Object type identifier for the deletion response :param deleted: Whether the deletion operation was successful properties: id: title: Id type: string object: default: vector_store.file.deleted title: Object type: string deleted: default: true title: Deleted type: boolean required: - id title: VectorStoreFileDeleteResponse type: object VectorStoreFileContentsResponse: $defs: VectorStoreContent: description: >- Content item from a vector store file or search result. :param type: Content type, currently only "text" is supported :param text: The actual text content properties: type: const: text title: Type type: string text: title: Text type: string required: - type - text title: VectorStoreContent type: object description: >- Response from retrieving the contents of a vector store file. :param file_id: Unique identifier for the file :param filename: Name of the file :param attributes: Key-value attributes associated with the file :param content: List of content items from the file properties: file_id: title: File Id type: string filename: title: Filename type: string attributes: additionalProperties: true title: Attributes type: object content: items: $ref: '#/$defs/VectorStoreContent' title: Content type: array required: - file_id - filename - attributes - content title: VectorStoreFileContentsResponse type: object OpenaiSearchVectorStoreRequest: type: object VectorStoreSearchResponsePage: $defs: VectorStoreContent: description: >- Content item from a vector store file or search result. :param type: Content type, currently only "text" is supported :param text: The actual text content properties: type: const: text title: Type type: string text: title: Text type: string required: - type - text title: VectorStoreContent type: object VectorStoreSearchResponse: description: >- Response from searching a vector store. :param file_id: Unique identifier of the file containing the result :param filename: Name of the file containing the result :param score: Relevance score for this search result :param attributes: (Optional) Key-value attributes associated with the file :param content: List of content items matching the search query properties: file_id: title: File Id type: string filename: title: Filename type: string score: title: Score type: number attributes: anyOf: - additionalProperties: anyOf: - type: string - type: number - type: boolean type: object - type: 'null' title: Attributes content: items: $ref: '#/$defs/VectorStoreContent' title: Content type: array required: - file_id - filename - score - content title: VectorStoreSearchResponse type: object description: >- Paginated response from searching a vector store. :param object: Object type identifier for the search results page :param search_query: The original search query that was executed :param data: List of search result objects :param has_more: Whether there are more results available beyond this page :param next_page: (Optional) Token for retrieving the next page of results properties: object: default: vector_store.search_results.page title: Object type: string search_query: title: Search Query type: string data: items: $ref: '#/$defs/VectorStoreSearchResponse' title: Data type: array has_more: default: false title: Has More type: boolean next_page: anyOf: - type: string - type: 'null' title: Next Page required: - search_query - data title: VectorStoreSearchResponsePage type: object VersionInfo: description: >- Version information for the service. :param version: Version number of the service properties: version: title: Version type: string required: - version title: VersionInfo type: object AppendRowsRequest: type: object PaginatedResponse: description: >- A generic paginated response that follows a simple format. :param data: The list of items for the current page :param has_more: Whether there are more items available after this set :param url: The URL for accessing this list properties: data: items: additionalProperties: true type: object title: Data type: array has_more: title: Has More type: boolean url: anyOf: - type: string - type: 'null' title: Url required: - data - has_more title: PaginatedResponse type: object ListDatasetsResponse: $defs: Dataset: description: >- Dataset resource for storing and accessing training or evaluation data. :param type: Type of resource, always 'dataset' for datasets properties: identifier: description: >- Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: anyOf: - type: string - type: 'null' description: >- Unique identifier for this resource in the provider title: Provider Resource Id provider_id: description: >- ID of the provider that owns this resource title: Provider Id type: string type: const: dataset default: dataset title: Type type: string purpose: $ref: '#/$defs/DatasetPurpose' source: discriminator: mapping: rows: '#/$defs/RowsDataSource' uri: '#/$defs/URIDataSource' propertyName: type oneOf: - $ref: '#/$defs/URIDataSource' - $ref: '#/$defs/RowsDataSource' title: Source metadata: additionalProperties: true description: Any additional metadata for this dataset title: Metadata type: object required: - identifier - provider_id - purpose - source title: Dataset type: object DatasetPurpose: description: >- Purpose of the dataset. Each purpose has a required input data schema. :cvar post-training/messages: The dataset contains messages used for post-training. { "messages": [ {"role": "user", "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}, ] } :cvar eval/question-answer: The dataset contains a question column and an answer column. { "question": "What is the capital of France?", "answer": "Paris" } :cvar eval/messages-answer: The dataset contains a messages column with list of messages and an answer column. { "messages": [ {"role": "user", "content": "Hello, my name is John Doe."}, {"role": "assistant", "content": "Hello, John Doe. How can I help you today?"}, {"role": "user", "content": "What's my name?"}, ], "answer": "John Doe" } enum: - post-training/messages - eval/question-answer - eval/messages-answer title: DatasetPurpose type: string RowsDataSource: description: >- A dataset stored in rows. :param rows: The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]} ] properties: type: const: rows default: rows title: Type type: string rows: items: additionalProperties: true type: object title: Rows type: array required: - rows title: RowsDataSource type: object URIDataSource: description: >- A dataset that can be obtained from a URI. :param uri: The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" properties: type: const: uri default: uri title: Type type: string uri: title: Uri type: string required: - uri title: URIDataSource type: object description: >- Response from listing datasets. :param data: List of datasets properties: data: items: $ref: '#/$defs/Dataset' title: Data type: array required: - data title: ListDatasetsResponse type: object RegisterDatasetRequest: type: object Dataset: $defs: DatasetPurpose: description: >- Purpose of the dataset. Each purpose has a required input data schema. :cvar post-training/messages: The dataset contains messages used for post-training. { "messages": [ {"role": "user", "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}, ] } :cvar eval/question-answer: The dataset contains a question column and an answer column. { "question": "What is the capital of France?", "answer": "Paris" } :cvar eval/messages-answer: The dataset contains a messages column with list of messages and an answer column. { "messages": [ {"role": "user", "content": "Hello, my name is John Doe."}, {"role": "assistant", "content": "Hello, John Doe. How can I help you today?"}, {"role": "user", "content": "What's my name?"}, ], "answer": "John Doe" } enum: - post-training/messages - eval/question-answer - eval/messages-answer title: DatasetPurpose type: string RowsDataSource: description: >- A dataset stored in rows. :param rows: The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]} ] properties: type: const: rows default: rows title: Type type: string rows: items: additionalProperties: true type: object title: Rows type: array required: - rows title: RowsDataSource type: object URIDataSource: description: >- A dataset that can be obtained from a URI. :param uri: The dataset can be obtained from a URI. E.g. - "https://mywebsite.com/mydata.jsonl" - "lsfs://mydata.jsonl" - "data:csv;base64,{base64_content}" properties: type: const: uri default: uri title: Type type: string uri: title: Uri type: string required: - uri title: URIDataSource type: object description: >- Dataset resource for storing and accessing training or evaluation data. :param type: Type of resource, always 'dataset' for datasets properties: identifier: description: >- Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: anyOf: - type: string - type: 'null' description: >- Unique identifier for this resource in the provider title: Provider Resource Id provider_id: description: >- ID of the provider that owns this resource title: Provider Id type: string type: const: dataset default: dataset title: Type type: string purpose: $ref: '#/$defs/DatasetPurpose' source: discriminator: mapping: rows: '#/$defs/RowsDataSource' uri: '#/$defs/URIDataSource' propertyName: type oneOf: - $ref: '#/$defs/URIDataSource' - $ref: '#/$defs/RowsDataSource' title: Source metadata: additionalProperties: true description: Any additional metadata for this dataset title: Metadata type: object required: - identifier - provider_id - purpose - source title: Dataset type: object CreateAgentRequest: type: object AgentCreateResponse: description: >- Response returned when creating a new agent. :param agent_id: Unique identifier for the created agent properties: agent_id: title: Agent Id type: string required: - agent_id title: AgentCreateResponse type: object Agent: $defs: AgentConfig: description: >- Configuration for an agent. :param model: The model identifier to use for the agent :param instructions: The system instructions for the agent :param name: Optional name for the agent, used in telemetry and identification :param enable_session_persistence: Optional flag indicating whether session data has to be persisted :param response_format: Optional response format configuration properties: sampling_params: anyOf: - $ref: '#/$defs/SamplingParams' - type: 'null' input_shields: anyOf: - items: type: string type: array - type: 'null' title: Input Shields output_shields: anyOf: - items: type: string type: array - type: 'null' title: Output Shields toolgroups: anyOf: - items: anyOf: - type: string - $ref: '#/$defs/AgentToolGroupWithArgs' type: array - type: 'null' title: Toolgroups client_tools: anyOf: - items: $ref: '#/$defs/ToolDef' type: array - type: 'null' title: Client Tools tool_choice: anyOf: - $ref: '#/$defs/ToolChoice' - type: 'null' deprecated: true tool_prompt_format: anyOf: - $ref: '#/$defs/ToolPromptFormat' - type: 'null' deprecated: true tool_config: anyOf: - $ref: '#/$defs/ToolConfig' - type: 'null' max_infer_iters: anyOf: - type: integer - type: 'null' default: 10 title: Max Infer Iters model: title: Model type: string instructions: title: Instructions type: string name: anyOf: - type: string - type: 'null' title: Name enable_session_persistence: anyOf: - type: boolean - type: 'null' default: false title: Enable Session Persistence response_format: anyOf: - discriminator: mapping: grammar: '#/$defs/GrammarResponseFormat' json_schema: '#/$defs/JsonSchemaResponseFormat' propertyName: type oneOf: - $ref: '#/$defs/JsonSchemaResponseFormat' - $ref: '#/$defs/GrammarResponseFormat' - type: 'null' title: Response Format required: - model - instructions title: AgentConfig type: object AgentToolGroupWithArgs: properties: name: title: Name type: string args: additionalProperties: true title: Args type: object required: - name - args title: AgentToolGroupWithArgs type: object GrammarResponseFormat: description: >- Configuration for grammar-guided response generation. :param type: Must be "grammar" to identify this format type :param bnf: The BNF grammar specification the response should conform to properties: type: const: grammar default: grammar title: Type type: string bnf: additionalProperties: true title: Bnf type: object required: - bnf title: GrammarResponseFormat type: object GreedySamplingStrategy: description: >- Greedy sampling strategy that selects the highest probability token at each step. :param type: Must be "greedy" to identify this sampling strategy properties: type: const: greedy default: greedy title: Type type: string title: GreedySamplingStrategy type: object JsonSchemaResponseFormat: description: >- Configuration for JSON schema-guided response generation. :param type: Must be "json_schema" to identify this format type :param json_schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. properties: type: const: json_schema default: json_schema title: Type type: string json_schema: additionalProperties: true title: Json Schema type: object required: - json_schema title: JsonSchemaResponseFormat type: object SamplingParams: description: >- Sampling parameters. :param strategy: The sampling strategy. :param max_tokens: The maximum number of tokens that can be generated in the completion. The token count of your prompt plus max_tokens cannot exceed the model's context length. :param repetition_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. :param stop: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. properties: strategy: discriminator: mapping: greedy: '#/$defs/GreedySamplingStrategy' top_k: '#/$defs/TopKSamplingStrategy' top_p: '#/$defs/TopPSamplingStrategy' propertyName: type oneOf: - $ref: '#/$defs/GreedySamplingStrategy' - $ref: '#/$defs/TopPSamplingStrategy' - $ref: '#/$defs/TopKSamplingStrategy' title: Strategy max_tokens: anyOf: - type: integer - type: 'null' title: Max Tokens repetition_penalty: anyOf: - type: number - type: 'null' default: 1.0 title: Repetition Penalty stop: anyOf: - items: type: string type: array - type: 'null' title: Stop title: SamplingParams type: object SystemMessageBehavior: description: >- Config for how to override the default system prompt. :cvar append: Appends the provided system message to the default system prompt: https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-function-definitions-in-the-system-prompt- :cvar replace: Replaces the default system prompt with the provided system message. The system message can include the string '{{function_definitions}}' to indicate where the function definitions should be inserted. enum: - append - replace title: SystemMessageBehavior type: string ToolChoice: description: >- Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model. :cvar auto: The model may use tools if it determines that is appropriate. :cvar required: The model must use tools. :cvar none: The model must not use tools. enum: - auto - required - none title: ToolChoice type: string ToolConfig: description: >- Configuration for tool use. :param tool_choice: (Optional) Whether tool use is automatic, required, or none. Can also specify a tool name to use a specific tool. Defaults to ToolChoice.auto. :param tool_prompt_format: (Optional) Instructs the model how to format tool calls. By default, Llama Stack will attempt to use a format that is best adapted to the model. - `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. - `ToolPromptFormat.function_tag`: The tool calls are enclosed in a tag. - `ToolPromptFormat.python_list`: The tool calls are output as Python syntax -- a list of function calls. :param system_message_behavior: (Optional) Config for how to override the default system prompt. - `SystemMessageBehavior.append`: Appends the provided system message to the default system prompt. - `SystemMessageBehavior.replace`: Replaces the default system prompt with the provided system message. The system message can include the string '{{function_definitions}}' to indicate where the function definitions should be inserted. properties: tool_choice: anyOf: - $ref: '#/$defs/ToolChoice' - type: string - type: 'null' default: auto title: Tool Choice tool_prompt_format: anyOf: - $ref: '#/$defs/ToolPromptFormat' - type: 'null' system_message_behavior: anyOf: - $ref: '#/$defs/SystemMessageBehavior' - type: 'null' default: append title: ToolConfig type: object ToolDef: description: >- Tool definition used in runtime contexts. :param name: Name of the tool :param description: (Optional) Human-readable description of what the tool does :param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema) :param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema) :param metadata: (Optional) Additional metadata about the tool :param toolgroup_id: (Optional) ID of the tool group this tool belongs to properties: toolgroup_id: anyOf: - type: string - type: 'null' title: Toolgroup Id name: title: Name type: string description: anyOf: - type: string - type: 'null' title: Description input_schema: anyOf: - additionalProperties: true type: object - type: 'null' title: Input Schema output_schema: anyOf: - additionalProperties: true type: object - type: 'null' title: Output Schema metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata required: - name title: ToolDef type: object ToolPromptFormat: description: >- Prompt format for calling custom / zero shot tools. :cvar json: JSON format for calling tools. It takes the form: { "type": "function", "function" : { "name": "function_name", "description": "function_description", "parameters": {...} } } :cvar function_tag: Function tag format, pseudo-XML. This looks like: (parameters) :cvar python_list: Python list. The output is a valid Python expression that can be evaluated to a list. Each element in the list is a function call. Example: ["function_name(param1, param2)", "function_name(param1, param2)"] enum: - json - function_tag - python_list title: ToolPromptFormat type: string TopKSamplingStrategy: description: >- Top-k sampling strategy that restricts sampling to the k most likely tokens. :param type: Must be "top_k" to identify this sampling strategy :param top_k: Number of top tokens to consider for sampling. Must be at least 1 properties: type: const: top_k default: top_k title: Type type: string top_k: minimum: 1 title: Top K type: integer required: - top_k title: TopKSamplingStrategy type: object TopPSamplingStrategy: description: >- Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p. :param type: Must be "top_p" to identify this sampling strategy :param temperature: Controls randomness in sampling. Higher values increase randomness :param top_p: Cumulative probability threshold for nucleus sampling. Defaults to 0.95 properties: type: const: top_p default: top_p title: Type type: string temperature: anyOf: - exclusiveMinimum: 0.0 type: number - type: 'null' title: Temperature top_p: anyOf: - type: number - type: 'null' default: 0.95 title: Top P required: - temperature title: TopPSamplingStrategy type: object description: >- An agent instance with configuration and metadata. :param agent_id: Unique identifier for the agent :param agent_config: Configuration settings for the agent :param created_at: Timestamp when the agent was created properties: agent_id: title: Agent Id type: string agent_config: $ref: '#/$defs/AgentConfig' created_at: format: date-time title: Created At type: string required: - agent_id - agent_config - created_at title: Agent type: object CreateAgentSessionRequest: type: object AgentSessionCreateResponse: description: >- Response returned when creating a new agent session. :param session_id: Unique identifier for the created session properties: session_id: title: Session Id type: string required: - session_id title: AgentSessionCreateResponse description: >- Response returned when creating a new agent session. CompletionMessage: type: object properties: role: type: string const: assistant default: assistant description: >- Must be "assistant" to identify this as the model's response content: $ref: '#/components/schemas/InterleavedContent' description: The content of the model's response stop_reason: type: string enum: - end_of_turn - end_of_message - out_of_tokens description: >- Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: The model finished generating the entire response. - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response. - `StopReason.out_of_tokens`: The model ran out of token budget. tool_calls: type: array items: $ref: '#/components/schemas/ToolCall' description: >- List of tool calls. Each tool call is a ToolCall object. additionalProperties: false required: - role - content - stop_reason title: CompletionMessage description: >- A message containing the model's (assistant) response in a chat conversation. InferenceStep: type: object Session: $defs: Attachment: description: >- An attachment to an agent turn. :param content: The content of the attachment. :param mime_type: The MIME type of the attachment. properties: content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array - $ref: '#/$defs/URL' title: Content mime_type: title: Mime Type type: string required: - content - mime_type title: Attachment type: object BuiltinTool: enum: - brave_search - wolfram_alpha - photogen - code_interpreter title: BuiltinTool type: string CompletionMessage: description: >- A message containing the model's (assistant) response in a chat conversation. :param role: Must be "assistant" to identify this as the model's response :param content: The content of the model's response :param stop_reason: Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: The model finished generating the entire response. - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response. - `StopReason.out_of_tokens`: The model ran out of token budget. :param tool_calls: List of tool calls. Each tool call is a ToolCall object. properties: role: const: assistant default: assistant title: Role type: string content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content stop_reason: $ref: '#/$defs/StopReason' tool_calls: anyOf: - items: $ref: '#/$defs/ToolCall' type: array - type: 'null' title: Tool Calls required: - content - stop_reason title: CompletionMessage type: object ImageContentItem: description: >- A image content item :param type: Discriminator type of the content item. Always "image" :param image: Image as a base64 encoded string or an URL properties: type: const: image default: image title: Type type: string image: $ref: '#/$defs/_URLOrData' required: - image title: ImageContentItem type: object InferenceStep: description: >- An inference step in an agent turn. :param model_response: The response from the LLM. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: inference default: inference title: Step Type type: string model_response: $ref: '#/$defs/CompletionMessage' required: - turn_id - step_id - model_response title: InferenceStep type: object MemoryRetrievalStep: description: >- A memory retrieval step in an agent turn. :param vector_store_ids: The IDs of the vector databases to retrieve context from. :param inserted_context: The context retrieved from the vector databases. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: memory_retrieval default: memory_retrieval title: Step Type type: string vector_store_ids: title: Vector Store Ids type: string inserted_context: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Inserted Context required: - turn_id - step_id - vector_store_ids - inserted_context title: MemoryRetrievalStep type: object SafetyViolation: description: >- Details of a safety violation detected by content moderation. :param violation_level: Severity level of the violation :param user_message: (Optional) Message to convey to the user about the violation :param metadata: Additional metadata including specific violation codes for debugging and telemetry properties: violation_level: $ref: '#/$defs/ViolationLevel' user_message: anyOf: - type: string - type: 'null' title: User Message metadata: additionalProperties: true title: Metadata type: object required: - violation_level title: SafetyViolation type: object ShieldCallStep: description: >- A shield call step in an agent turn. :param violation: The violation from the shield call. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: shield_call default: shield_call title: Step Type type: string violation: anyOf: - $ref: '#/$defs/SafetyViolation' - type: 'null' required: - turn_id - step_id - violation title: ShieldCallStep type: object StopReason: enum: - end_of_turn - end_of_message - out_of_tokens title: StopReason type: string TextContentItem: description: >- A text content item :param type: Discriminator type of the content item. Always "text" :param text: Text content properties: type: const: text default: text title: Type type: string text: title: Text type: string required: - text title: TextContentItem type: object ToolCall: properties: call_id: title: Call Id type: string tool_name: anyOf: - $ref: '#/$defs/BuiltinTool' - type: string title: Tool Name arguments: title: Arguments type: string required: - call_id - tool_name - arguments title: ToolCall type: object ToolExecutionStep: description: >- A tool execution step in an agent turn. :param tool_calls: The tool calls to execute. :param tool_responses: The tool responses from the tool calls. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: tool_execution default: tool_execution title: Step Type type: string tool_calls: items: $ref: '#/$defs/ToolCall' title: Tool Calls type: array tool_responses: items: $ref: '#/$defs/ToolResponse' title: Tool Responses type: array required: - turn_id - step_id - tool_calls - tool_responses title: ToolExecutionStep type: object ToolResponse: description: >- Response from a tool invocation. :param call_id: Unique identifier for the tool call this response is for :param tool_name: Name of the tool that was invoked :param content: The response content from the tool :param metadata: (Optional) Additional metadata about the tool response properties: call_id: title: Call Id type: string tool_name: anyOf: - $ref: '#/$defs/BuiltinTool' - type: string title: Tool Name content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata required: - call_id - tool_name - content title: ToolResponse type: object ToolResponseMessage: description: >- A message representing the result of a tool invocation. :param role: Must be "tool" to identify this as a tool response :param call_id: Unique identifier for the tool call this response is for :param content: The response content from the tool properties: role: const: tool default: tool title: Role type: string call_id: title: Call Id type: string content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content required: - call_id - content title: ToolResponseMessage type: object Turn: description: >- A single turn in an interaction with an Agentic System. :param turn_id: Unique identifier for the turn within a session :param session_id: Unique identifier for the conversation session :param input_messages: List of messages that initiated this turn :param steps: Ordered list of processing steps executed during this turn :param output_message: The model's generated response containing content and metadata :param output_attachments: (Optional) Files or media attached to the agent's response :param started_at: Timestamp when the turn began :param completed_at: (Optional) Timestamp when the turn finished, if completed properties: turn_id: title: Turn Id type: string session_id: title: Session Id type: string input_messages: items: anyOf: - $ref: '#/$defs/UserMessage' - $ref: '#/$defs/ToolResponseMessage' title: Input Messages type: array steps: items: discriminator: mapping: inference: '#/$defs/InferenceStep' memory_retrieval: '#/$defs/MemoryRetrievalStep' shield_call: '#/$defs/ShieldCallStep' tool_execution: '#/$defs/ToolExecutionStep' propertyName: step_type oneOf: - $ref: '#/$defs/InferenceStep' - $ref: '#/$defs/ToolExecutionStep' - $ref: '#/$defs/ShieldCallStep' - $ref: '#/$defs/MemoryRetrievalStep' title: Steps type: array output_message: $ref: '#/$defs/CompletionMessage' output_attachments: anyOf: - items: $ref: '#/$defs/Attachment' type: array - type: 'null' title: Output Attachments started_at: format: date-time title: Started At type: string completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At required: - turn_id - session_id - input_messages - steps - output_message - started_at title: Turn type: object URL: description: >- A URL reference to external content. :param uri: The URL string pointing to the resource properties: uri: title: Uri type: string required: - uri title: URL type: object UserMessage: description: >- A message from the user in a chat conversation. :param role: Must be "user" to identify this as a user message :param content: The content of the message, which can include text and other media :param context: (Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future. properties: role: const: user default: user title: Role type: string content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content context: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array - type: 'null' title: Context required: - content title: UserMessage type: object ViolationLevel: description: >- Severity level of a safety violation. :cvar INFO: Informational level violation that does not require action :cvar WARN: Warning level violation that suggests caution but allows continuation :cvar ERROR: Error level violation that requires blocking or intervention enum: - info - warn - error title: ViolationLevel type: string _URLOrData: description: >- A URL or a base64 encoded string :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits. :param data: base64 encoded image data as string properties: url: anyOf: - $ref: '#/$defs/URL' - type: 'null' data: anyOf: - type: string - type: 'null' contentEncoding: base64 title: Data title: _URLOrData type: object description: >- A single session of an interaction with an Agentic System. :param session_id: Unique identifier for the conversation session :param session_name: Human-readable name for the session :param turns: List of all turns that have occurred in this session :param started_at: Timestamp when the session was created properties: session_id: title: Session Id type: string session_name: title: Session Name type: string turns: items: $ref: '#/$defs/Turn' title: Turns type: array started_at: format: date-time title: Started At type: string required: - session_id - session_name - turns - started_at title: Session type: object properties: turn_id: type: string description: The ID of the turn. step_id: type: string description: The ID of the step. started_at: type: string format: date-time description: The time the step started. completed_at: type: string format: date-time description: The time the step completed. step_type: type: string enum: - inference - tool_execution - shield_call - memory_retrieval title: StepType description: Type of the step in an agent turn. const: shield_call default: shield_call violation: $ref: '#/components/schemas/SafetyViolation' description: The violation from the shield call. additionalProperties: false required: - turn_id - step_id - step_type title: ShieldCallStep description: A shield call step in an agent turn. ToolCall: type: object properties: call_id: type: string tool_name: oneOf: - type: string enum: - brave_search - wolfram_alpha - photogen - code_interpreter title: BuiltinTool - type: string arguments: type: string additionalProperties: false required: - call_id - tool_name - arguments title: ToolCall ToolExecutionStep: type: object properties: turn_id: type: string description: The ID of the turn. step_id: type: string description: The ID of the step. started_at: type: string format: date-time description: The time the step started. completed_at: type: string format: date-time description: The time the step completed. step_type: type: string enum: - inference - tool_execution - shield_call - memory_retrieval title: StepType description: Type of the step in an agent turn. const: tool_execution default: tool_execution tool_calls: type: array items: $ref: '#/components/schemas/ToolCall' description: The tool calls to execute. tool_responses: type: array items: $ref: '#/components/schemas/ToolResponse' description: The tool responses from the tool calls. additionalProperties: false required: - turn_id - step_id - step_type - tool_calls - tool_responses title: ToolExecutionStep description: A tool execution step in an agent turn. ToolResponse: type: object properties: call_id: type: string description: >- Unique identifier for the tool call this response is for tool_name: oneOf: - type: string enum: - brave_search - wolfram_alpha - photogen - code_interpreter title: BuiltinTool - type: string description: Name of the tool that was invoked content: $ref: '#/components/schemas/InterleavedContent' description: The response content from the tool metadata: type: object additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object description: >- (Optional) Additional metadata about the tool response additionalProperties: false required: - call_id - tool_name - content title: ToolResponse description: Response from a tool invocation. ToolResponseMessage: type: object properties: role: type: string const: tool default: tool description: >- Must be "tool" to identify this as a tool response call_id: type: string description: >- Unique identifier for the tool call this response is for content: $ref: '#/components/schemas/InterleavedContent' description: The response content from the tool additionalProperties: false required: - role - call_id - content title: ToolResponseMessage description: >- A message representing the result of a tool invocation. Turn: $defs: Attachment: description: >- An attachment to an agent turn. :param content: The content of the attachment. :param mime_type: The MIME type of the attachment. properties: content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array - $ref: '#/$defs/URL' title: Content mime_type: title: Mime Type type: string required: - content - mime_type title: Attachment type: object BuiltinTool: enum: - brave_search - wolfram_alpha - photogen - code_interpreter title: BuiltinTool type: string CompletionMessage: description: >- A message containing the model's (assistant) response in a chat conversation. :param role: Must be "assistant" to identify this as the model's response :param content: The content of the model's response :param stop_reason: Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: The model finished generating the entire response. - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response. - `StopReason.out_of_tokens`: The model ran out of token budget. :param tool_calls: List of tool calls. Each tool call is a ToolCall object. properties: role: const: assistant default: assistant title: Role type: string content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content stop_reason: $ref: '#/$defs/StopReason' tool_calls: anyOf: - items: $ref: '#/$defs/ToolCall' type: array - type: 'null' title: Tool Calls required: - content - stop_reason title: CompletionMessage type: object ImageContentItem: description: >- A image content item :param type: Discriminator type of the content item. Always "image" :param image: Image as a base64 encoded string or an URL properties: type: const: image default: image title: Type type: string image: $ref: '#/$defs/_URLOrData' required: - image title: ImageContentItem type: object InferenceStep: description: >- An inference step in an agent turn. :param model_response: The response from the LLM. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: inference default: inference title: Step Type type: string model_response: $ref: '#/$defs/CompletionMessage' required: - turn_id - step_id - model_response title: InferenceStep type: object MemoryRetrievalStep: description: >- A memory retrieval step in an agent turn. :param vector_store_ids: The IDs of the vector databases to retrieve context from. :param inserted_context: The context retrieved from the vector databases. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: memory_retrieval default: memory_retrieval title: Step Type type: string vector_store_ids: title: Vector Store Ids type: string inserted_context: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Inserted Context required: - turn_id - step_id - vector_store_ids - inserted_context title: MemoryRetrievalStep type: object SafetyViolation: description: >- Details of a safety violation detected by content moderation. :param violation_level: Severity level of the violation :param user_message: (Optional) Message to convey to the user about the violation :param metadata: Additional metadata including specific violation codes for debugging and telemetry properties: violation_level: $ref: '#/$defs/ViolationLevel' user_message: anyOf: - type: string - type: 'null' title: User Message metadata: additionalProperties: true title: Metadata type: object required: - violation_level title: SafetyViolation type: object ShieldCallStep: description: >- A shield call step in an agent turn. :param violation: The violation from the shield call. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: shield_call default: shield_call title: Step Type type: string violation: anyOf: - $ref: '#/$defs/SafetyViolation' - type: 'null' required: - turn_id - step_id - violation title: ShieldCallStep type: object StopReason: enum: - end_of_turn - end_of_message - out_of_tokens title: StopReason type: string TextContentItem: description: >- A text content item :param type: Discriminator type of the content item. Always "text" :param text: Text content properties: type: const: text default: text title: Type type: string text: title: Text type: string required: - text title: TextContentItem type: object ToolCall: properties: call_id: title: Call Id type: string tool_name: anyOf: - $ref: '#/$defs/BuiltinTool' - type: string title: Tool Name arguments: title: Arguments type: string required: - call_id - tool_name - arguments title: ToolCall type: object ToolExecutionStep: description: >- A tool execution step in an agent turn. :param tool_calls: The tool calls to execute. :param tool_responses: The tool responses from the tool calls. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: tool_execution default: tool_execution title: Step Type type: string tool_calls: items: $ref: '#/$defs/ToolCall' title: Tool Calls type: array tool_responses: items: $ref: '#/$defs/ToolResponse' title: Tool Responses type: array required: - turn_id - step_id - tool_calls - tool_responses title: ToolExecutionStep type: object ToolResponse: description: >- Response from a tool invocation. :param call_id: Unique identifier for the tool call this response is for :param tool_name: Name of the tool that was invoked :param content: The response content from the tool :param metadata: (Optional) Additional metadata about the tool response properties: call_id: title: Call Id type: string tool_name: anyOf: - $ref: '#/$defs/BuiltinTool' - type: string title: Tool Name content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata required: - call_id - tool_name - content title: ToolResponse type: object ToolResponseMessage: description: >- A message representing the result of a tool invocation. :param role: Must be "tool" to identify this as a tool response :param call_id: Unique identifier for the tool call this response is for :param content: The response content from the tool properties: role: const: tool default: tool title: Role type: string call_id: title: Call Id type: string content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content required: - call_id - content title: ToolResponseMessage type: object URL: description: >- A URL reference to external content. :param uri: The URL string pointing to the resource properties: uri: title: Uri type: string required: - uri title: URL type: object UserMessage: description: >- A message from the user in a chat conversation. :param role: Must be "user" to identify this as a user message :param content: The content of the message, which can include text and other media :param context: (Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future. properties: role: const: user default: user title: Role type: string content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content context: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array - type: 'null' title: Context required: - content title: UserMessage type: object ViolationLevel: description: >- Severity level of a safety violation. :cvar INFO: Informational level violation that does not require action :cvar WARN: Warning level violation that suggests caution but allows continuation :cvar ERROR: Error level violation that requires blocking or intervention enum: - info - warn - error title: ViolationLevel type: string _URLOrData: description: >- A URL or a base64 encoded string :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits. :param data: base64 encoded image data as string properties: url: anyOf: - $ref: '#/$defs/URL' - type: 'null' data: anyOf: - type: string - type: 'null' contentEncoding: base64 title: Data title: _URLOrData type: object description: >- A single turn in an interaction with an Agentic System. :param turn_id: Unique identifier for the turn within a session :param session_id: Unique identifier for the conversation session :param input_messages: List of messages that initiated this turn :param steps: Ordered list of processing steps executed during this turn :param output_message: The model's generated response containing content and metadata :param output_attachments: (Optional) Files or media attached to the agent's response :param started_at: Timestamp when the turn began :param completed_at: (Optional) Timestamp when the turn finished, if completed properties: turn_id: title: Turn Id type: string session_id: title: Session Id type: string input_messages: items: anyOf: - $ref: '#/$defs/UserMessage' - $ref: '#/$defs/ToolResponseMessage' title: Input Messages type: array steps: items: discriminator: mapping: inference: '#/$defs/InferenceStep' memory_retrieval: '#/$defs/MemoryRetrievalStep' shield_call: '#/$defs/ShieldCallStep' tool_execution: '#/$defs/ToolExecutionStep' propertyName: step_type oneOf: - $ref: '#/$defs/InferenceStep' - $ref: '#/$defs/ToolExecutionStep' - $ref: '#/$defs/ShieldCallStep' - $ref: '#/$defs/MemoryRetrievalStep' title: Steps type: array output_message: $ref: '#/$defs/CompletionMessage' output_attachments: anyOf: - items: $ref: '#/$defs/Attachment' type: array - type: 'null' title: Output Attachments started_at: format: date-time title: Started At type: string completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At required: - turn_id - session_id - input_messages - steps - output_message - started_at title: Turn description: >- A single turn in an interaction with an Agentic System. UserMessage: type: object properties: role: type: string const: user default: user description: >- Must be "user" to identify this as a user message content: $ref: '#/components/schemas/InterleavedContent' description: >- The content of the message, which can include text and other media context: $ref: '#/components/schemas/InterleavedContent' description: >- (Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future. additionalProperties: false required: - role - content title: UserMessage description: >- A message from the user in a chat conversation. CreateAgentTurnRequest: type: object ResumeAgentTurnRequest: type: object AgentStepResponse: $defs: BuiltinTool: enum: - brave_search - wolfram_alpha - photogen - code_interpreter title: BuiltinTool type: string CompletionMessage: description: >- A message containing the model's (assistant) response in a chat conversation. :param role: Must be "assistant" to identify this as the model's response :param content: The content of the model's response :param stop_reason: Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: The model finished generating the entire response. - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response. - `StopReason.out_of_tokens`: The model ran out of token budget. :param tool_calls: List of tool calls. Each tool call is a ToolCall object. properties: role: const: assistant default: assistant title: Role type: string content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content stop_reason: $ref: '#/$defs/StopReason' tool_calls: anyOf: - items: $ref: '#/$defs/ToolCall' type: array - type: 'null' title: Tool Calls required: - content - stop_reason title: CompletionMessage type: object ImageContentItem: description: >- A image content item :param type: Discriminator type of the content item. Always "image" :param image: Image as a base64 encoded string or an URL properties: type: const: image default: image title: Type type: string image: $ref: '#/$defs/_URLOrData' required: - image title: ImageContentItem type: object InferenceStep: description: >- An inference step in an agent turn. :param model_response: The response from the LLM. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: inference default: inference title: Step Type type: string model_response: $ref: '#/$defs/CompletionMessage' required: - turn_id - step_id - model_response title: InferenceStep type: object MemoryRetrievalStep: description: >- A memory retrieval step in an agent turn. :param vector_store_ids: The IDs of the vector databases to retrieve context from. :param inserted_context: The context retrieved from the vector databases. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: memory_retrieval default: memory_retrieval title: Step Type type: string vector_store_ids: title: Vector Store Ids type: string inserted_context: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Inserted Context required: - turn_id - step_id - vector_store_ids - inserted_context title: MemoryRetrievalStep type: object SafetyViolation: description: >- Details of a safety violation detected by content moderation. :param violation_level: Severity level of the violation :param user_message: (Optional) Message to convey to the user about the violation :param metadata: Additional metadata including specific violation codes for debugging and telemetry properties: violation_level: $ref: '#/$defs/ViolationLevel' user_message: anyOf: - type: string - type: 'null' title: User Message metadata: additionalProperties: true title: Metadata type: object required: - violation_level title: SafetyViolation type: object ShieldCallStep: description: >- A shield call step in an agent turn. :param violation: The violation from the shield call. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: shield_call default: shield_call title: Step Type type: string violation: anyOf: - $ref: '#/$defs/SafetyViolation' - type: 'null' required: - turn_id - step_id - violation title: ShieldCallStep type: object StopReason: enum: - end_of_turn - end_of_message - out_of_tokens title: StopReason type: string TextContentItem: description: >- A text content item :param type: Discriminator type of the content item. Always "text" :param text: Text content properties: type: const: text default: text title: Type type: string text: title: Text type: string required: - text title: TextContentItem type: object ToolCall: properties: call_id: title: Call Id type: string tool_name: anyOf: - $ref: '#/$defs/BuiltinTool' - type: string title: Tool Name arguments: title: Arguments type: string required: - call_id - tool_name - arguments title: ToolCall type: object ToolExecutionStep: description: >- A tool execution step in an agent turn. :param tool_calls: The tool calls to execute. :param tool_responses: The tool responses from the tool calls. properties: turn_id: title: Turn Id type: string step_id: title: Step Id type: string started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At step_type: const: tool_execution default: tool_execution title: Step Type type: string tool_calls: items: $ref: '#/$defs/ToolCall' title: Tool Calls type: array tool_responses: items: $ref: '#/$defs/ToolResponse' title: Tool Responses type: array required: - turn_id - step_id - tool_calls - tool_responses title: ToolExecutionStep type: object ToolResponse: description: >- Response from a tool invocation. :param call_id: Unique identifier for the tool call this response is for :param tool_name: Name of the tool that was invoked :param content: The response content from the tool :param metadata: (Optional) Additional metadata about the tool response properties: call_id: title: Call Id type: string tool_name: anyOf: - $ref: '#/$defs/BuiltinTool' - type: string title: Tool Name content: anyOf: - type: string - discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' - items: discriminator: mapping: image: '#/$defs/ImageContentItem' text: '#/$defs/TextContentItem' propertyName: type oneOf: - $ref: '#/$defs/ImageContentItem' - $ref: '#/$defs/TextContentItem' type: array title: Content metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata required: - call_id - tool_name - content title: ToolResponse type: object URL: description: >- A URL reference to external content. :param uri: The URL string pointing to the resource properties: uri: title: Uri type: string required: - uri title: URL type: object ViolationLevel: description: >- Severity level of a safety violation. :cvar INFO: Informational level violation that does not require action :cvar WARN: Warning level violation that suggests caution but allows continuation :cvar ERROR: Error level violation that requires blocking or intervention enum: - info - warn - error title: ViolationLevel type: string _URLOrData: description: >- A URL or a base64 encoded string :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits. :param data: base64 encoded image data as string properties: url: anyOf: - $ref: '#/$defs/URL' - type: 'null' data: anyOf: - type: string - type: 'null' contentEncoding: base64 title: Data title: _URLOrData type: object description: >- Response containing details of a specific agent step. :param step: The complete step data and execution details properties: step: discriminator: mapping: inference: '#/$defs/InferenceStep' memory_retrieval: '#/$defs/MemoryRetrievalStep' shield_call: '#/$defs/ShieldCallStep' tool_execution: '#/$defs/ToolExecutionStep' propertyName: step_type oneOf: - $ref: '#/$defs/InferenceStep' - $ref: '#/$defs/ToolExecutionStep' - $ref: '#/$defs/ShieldCallStep' - $ref: '#/$defs/MemoryRetrievalStep' title: Step required: - step title: AgentStepResponse type: object ListBenchmarksResponse: $defs: Benchmark: description: >- A benchmark resource for evaluating model performance. :param dataset_id: Identifier of the dataset to use for the benchmark evaluation :param scoring_functions: List of scoring function identifiers to apply during evaluation :param metadata: Metadata for this evaluation task :param type: The resource type, always benchmark properties: identifier: description: >- Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: anyOf: - type: string - type: 'null' description: >- Unique identifier for this resource in the provider title: Provider Resource Id provider_id: description: >- ID of the provider that owns this resource title: Provider Id type: string type: const: benchmark default: benchmark title: Type type: string dataset_id: title: Dataset Id type: string scoring_functions: items: type: string title: Scoring Functions type: array metadata: additionalProperties: true description: Metadata for this evaluation task title: Metadata type: object required: - identifier - provider_id - dataset_id - scoring_functions title: Benchmark type: object properties: data: items: $ref: '#/$defs/Benchmark' title: Data type: array required: - data title: ListBenchmarksResponse type: object RegisterBenchmarkRequest: type: object Benchmark: description: >- A benchmark resource for evaluating model performance. :param dataset_id: Identifier of the dataset to use for the benchmark evaluation :param scoring_functions: List of scoring function identifiers to apply during evaluation :param metadata: Metadata for this evaluation task :param type: The resource type, always benchmark properties: identifier: description: >- Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: anyOf: - type: string - type: 'null' description: >- Unique identifier for this resource in the provider title: Provider Resource Id provider_id: description: >- ID of the provider that owns this resource title: Provider Id type: string type: const: benchmark default: benchmark title: Type type: string dataset_id: title: Dataset Id type: string scoring_functions: items: type: string title: Scoring Functions type: array metadata: additionalProperties: true description: Metadata for this evaluation task title: Metadata type: object required: - identifier - provider_id - dataset_id - scoring_functions title: Benchmark type: object properties: type: type: string const: agent default: agent config: $ref: '#/components/schemas/AgentConfig' description: >- The configuration for the agent candidate. additionalProperties: false required: - type - config title: AgentCandidate description: An agent candidate for evaluation. BenchmarkConfig: type: object properties: eval_candidate: oneOf: - $ref: '#/components/schemas/ModelCandidate' - $ref: '#/components/schemas/AgentCandidate' discriminator: propertyName: type mapping: model: '#/components/schemas/ModelCandidate' agent: '#/components/schemas/AgentCandidate' description: The candidate to evaluate. scoring_params: type: object additionalProperties: $ref: '#/components/schemas/ScoringFnParams' description: >- Map between scoring function id and parameters for each scoring function you want to run num_examples: type: integer description: >- (Optional) The number of examples to evaluate. If not provided, all examples in the dataset will be evaluated additionalProperties: false required: - eval_candidate - scoring_params title: BenchmarkConfig description: >- A benchmark configuration for evaluation. ModelCandidate: type: object properties: type: type: string const: model default: model model: type: string description: The model ID to evaluate. sampling_params: $ref: '#/components/schemas/SamplingParams' description: The sampling parameters for the model. system_message: $ref: '#/components/schemas/SystemMessage' description: >- (Optional) The system message providing instructions or context to the model. additionalProperties: false required: - type - model - sampling_params title: ModelCandidate description: A model candidate for evaluation. SystemMessage: type: object properties: role: type: string const: system default: system description: >- Must be "system" to identify this as a system message content: $ref: '#/components/schemas/InterleavedContent' description: >- The content of the "system prompt". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions). additionalProperties: false required: - role - content title: SystemMessage description: >- A system message providing instructions or context to the model. EvaluateRowsRequest: type: object EvaluateResponse: $defs: ScoringResult: description: >- A scoring result for a single row. :param score_rows: The scoring result for each row. Each row is a map of column name to value. :param aggregated_results: Map of metric name to aggregated value properties: score_rows: items: additionalProperties: true type: object title: Score Rows type: array aggregated_results: additionalProperties: true title: Aggregated Results type: object required: - score_rows - aggregated_results title: ScoringResult type: object description: >- The response from an evaluation. :param generations: The generations from the evaluation. :param scores: The scores from the evaluation. properties: generations: items: additionalProperties: true type: object title: Generations type: array scores: additionalProperties: $ref: '#/$defs/ScoringResult' title: Scores type: object required: - generations - scores title: EvaluateResponse type: object RunEvalRequest: type: object Job: $defs: JobStatus: description: >- Status of a job execution. :cvar completed: Job has finished successfully :cvar in_progress: Job is currently running :cvar failed: Job has failed during execution :cvar scheduled: Job is scheduled but not yet started :cvar cancelled: Job was cancelled before completion enum: - completed - in_progress - failed - scheduled - cancelled title: JobStatus type: string description: >- A job execution instance with status tracking. :param job_id: Unique identifier for the job :param status: Current execution status of the job properties: job_id: title: Job Id type: string status: $ref: '#/$defs/JobStatus' required: - job_id - status title: Job type: object RerankRequest: type: object RerankResponse: $defs: RerankData: description: >- A single rerank result from a reranking response. :param index: The original index of the document in the input list :param relevance_score: The relevance score from the model output. Values are inverted when applicable so that higher scores indicate greater relevance. properties: index: title: Index type: integer relevance_score: title: Relevance Score type: number required: - index - relevance_score title: RerankData type: object description: >- Response from a reranking request. :param data: List of rerank result objects, sorted by relevance score (descending) properties: data: items: $ref: '#/$defs/RerankData' title: Data type: array required: - data title: RerankResponse type: object PostTrainingJobArtifactsResponse: $defs: Checkpoint: description: >- Checkpoint created during training runs. :param identifier: Unique identifier for the checkpoint :param created_at: Timestamp when the checkpoint was created :param epoch: Training epoch when the checkpoint was saved :param post_training_job_id: Identifier of the training job that created this checkpoint :param path: File system path where the checkpoint is stored :param training_metrics: (Optional) Training metrics associated with this checkpoint properties: identifier: title: Identifier type: string created_at: format: date-time title: Created At type: string epoch: title: Epoch type: integer post_training_job_id: title: Post Training Job Id type: string path: title: Path type: string training_metrics: anyOf: - $ref: '#/$defs/PostTrainingMetric' - type: 'null' required: - identifier - created_at - epoch - post_training_job_id - path title: Checkpoint type: object PostTrainingMetric: description: >- Training metrics captured during post-training jobs. :param epoch: Training epoch number :param train_loss: Loss value on the training dataset :param validation_loss: Loss value on the validation dataset :param perplexity: Perplexity metric indicating model confidence properties: epoch: title: Epoch type: integer train_loss: title: Train Loss type: number validation_loss: title: Validation Loss type: number perplexity: title: Perplexity type: number required: - epoch - train_loss - validation_loss - perplexity title: PostTrainingMetric type: object description: >- Artifacts of a finetuning job. :param job_uuid: Unique identifier for the training job :param checkpoints: List of model checkpoints created during training properties: job_uuid: title: Job Uuid type: string checkpoints: items: $ref: '#/$defs/Checkpoint' title: Checkpoints type: array required: - job_uuid title: PostTrainingJobArtifactsResponse type: object CancelTrainingJobRequest: type: object PostTrainingJobStatusResponse: $defs: Checkpoint: description: >- Checkpoint created during training runs. :param identifier: Unique identifier for the checkpoint :param created_at: Timestamp when the checkpoint was created :param epoch: Training epoch when the checkpoint was saved :param post_training_job_id: Identifier of the training job that created this checkpoint :param path: File system path where the checkpoint is stored :param training_metrics: (Optional) Training metrics associated with this checkpoint properties: identifier: title: Identifier type: string created_at: format: date-time title: Created At type: string epoch: title: Epoch type: integer post_training_job_id: title: Post Training Job Id type: string path: title: Path type: string training_metrics: anyOf: - $ref: '#/$defs/PostTrainingMetric' - type: 'null' required: - identifier - created_at - epoch - post_training_job_id - path title: Checkpoint type: object JobStatus: description: >- Status of a job execution. :cvar completed: Job has finished successfully :cvar in_progress: Job is currently running :cvar failed: Job has failed during execution :cvar scheduled: Job is scheduled but not yet started :cvar cancelled: Job was cancelled before completion enum: - completed - in_progress - failed - scheduled - cancelled title: JobStatus type: string PostTrainingMetric: description: >- Training metrics captured during post-training jobs. :param epoch: Training epoch number :param train_loss: Loss value on the training dataset :param validation_loss: Loss value on the validation dataset :param perplexity: Perplexity metric indicating model confidence properties: epoch: title: Epoch type: integer train_loss: title: Train Loss type: number validation_loss: title: Validation Loss type: number perplexity: title: Perplexity type: number required: - epoch - train_loss - validation_loss - perplexity title: PostTrainingMetric type: object description: >- Status of a finetuning job. :param job_uuid: Unique identifier for the training job :param status: Current status of the training job :param scheduled_at: (Optional) Timestamp when the job was scheduled :param started_at: (Optional) Timestamp when the job execution began :param completed_at: (Optional) Timestamp when the job finished, if completed :param resources_allocated: (Optional) Information about computational resources allocated to the job :param checkpoints: List of model checkpoints created during training properties: job_uuid: title: Job Uuid type: string status: $ref: '#/$defs/JobStatus' scheduled_at: anyOf: - format: date-time type: string - type: 'null' title: Scheduled At started_at: anyOf: - format: date-time type: string - type: 'null' title: Started At completed_at: anyOf: - format: date-time type: string - type: 'null' title: Completed At resources_allocated: anyOf: - additionalProperties: true type: object - type: 'null' title: Resources Allocated checkpoints: items: $ref: '#/$defs/Checkpoint' title: Checkpoints type: array required: - job_uuid - status title: PostTrainingJobStatusResponse type: object ListPostTrainingJobsResponse: $defs: PostTrainingJob: properties: job_uuid: title: Job Uuid type: string required: - job_uuid title: PostTrainingJob type: object properties: data: items: $ref: '#/$defs/PostTrainingJob' title: Data type: array required: - data title: ListPostTrainingJobsResponse type: object PreferenceOptimizeRequest: type: object PostTrainingJob: properties: job_uuid: title: Job Uuid type: string required: - job_uuid title: PostTrainingJob type: object SupervisedFineTuneRequest: type: object responses: BadRequest400: description: The request was invalid or malformed content: application/json: schema: $ref: '#/components/schemas/Error' example: status: 400 title: Bad Request detail: The request was invalid or malformed TooManyRequests429: description: >- The client has sent too many requests in a given amount of time content: application/json: schema: $ref: '#/components/schemas/Error' example: status: 429 title: Too Many Requests detail: >- You have exceeded the rate limit. Please try again later. InternalServerError500: description: >- The server encountered an unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' example: status: 500 title: Internal Server Error detail: >- An unexpected error occurred. Our team has been notified. DefaultError: description: An unexpected error occurred content: application/json: schema: $ref: '#/components/schemas/Error' example: status: 0 title: Error detail: An unexpected error occurred security: - Default: [] tags: - name: Agents description: >- APIs for creating and interacting with agentic systems. x-displayName: Agents - name: Batches description: >- The API is designed to allow use of openai client libraries for seamless integration. This API provides the following extensions: - idempotent batch creation Note: This API is currently under active development and may undergo changes. x-displayName: >- The Batches API enables efficient processing of multiple requests in a single operation, particularly useful for processing large datasets, batch evaluation workflows, and cost-effective inference at scale. - name: Benchmarks description: '' - name: Conversations description: >- Protocol for conversation management operations. x-displayName: Conversations - name: DatasetIO description: '' - name: Datasets description: '' - name: Eval description: >- Llama Stack Evaluation API for running evaluations on model and agent candidates. x-displayName: Evaluations - name: Files description: >- This API is used to upload documents that can be used with other Llama Stack APIs. x-displayName: Files - name: Inference description: >- Llama Stack Inference API for generating completions, chat completions, and embeddings. This API provides the raw interface to the underlying models. Three kinds of models are supported: - LLM models: these models generate "raw" and "chat" (conversational) completions. - Embedding models: these models generate embeddings to be used for semantic search. - Rerank models: these models reorder the documents based on their relevance to a query. x-displayName: Inference - name: Inspect description: >- APIs for inspecting the Llama Stack service, including health status, available API routes with methods and implementing providers. x-displayName: Inspect - name: Models description: '' - name: PostTraining (Coming Soon) description: '' - name: Prompts description: >- Protocol for prompt management operations. x-displayName: Prompts - name: Providers description: >- Providers API for inspecting, listing, and modifying providers and their configurations. x-displayName: Providers - name: Safety description: OpenAI-compatible Moderations API. x-displayName: Safety - name: Scoring description: '' - name: ScoringFunctions description: '' - name: Shields description: '' - name: ToolGroups description: '' - name: ToolRuntime description: '' - name: VectorIO description: '' x-tagGroups: - name: Operations tags: - Agents - Batches - Benchmarks - Conversations - DatasetIO - Datasets - Eval - Files - Inference - Inspect - Models - PostTraining (Coming Soon) - Prompts - Providers - Safety - Scoring - ScoringFunctions - Shields - ToolGroups - ToolRuntime - VectorIO