openapi: 3.1.0 info: title: Mistral AI API description: Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it. version: 1.0.0 paths: /v1/models: get: summary: List Models description: List all models available to the user. operationId: list_models_v1_models_get parameters: - name: provider in: query required: false schema: anyOf: - type: string - type: 'null' title: Provider - name: model in: query required: false schema: anyOf: - type: string - type: 'null' title: Model responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ModelList' examples: userExample: value: - id: capabilities: completion_chat: true completion_fim: false function_calling: false fine_tuning: false vision: false classification: false job: root: open-mistral-7b object: model created: 1756746619 owned_by: name: null description: null max_context_length: 32768 aliases: [] deprecation: null deprecation_replacement_model: null default_model_temperature: null TYPE: fine-tuned archived: false '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - models /v1/models/{model_id}: get: summary: Retrieve Model description: Retrieve information about a model. operationId: retrieve_model_v1_models__model_id__get parameters: - name: model_id in: path required: true schema: type: string title: Model Id example: ft:open-mistral-7b:587a6b29:20240514:7e773925 description: The ID of the model to retrieve. responses: '200': description: Successful Response content: application/json: schema: oneOf: - $ref: '#/components/schemas/BaseModelCard' - $ref: '#/components/schemas/FTModelCard' discriminator: propertyName: type mapping: base: '#/components/schemas/BaseModelCard' fine-tuned: '#/components/schemas/FTModelCard' title: Response Retrieve Model V1 Models Model Id Get examples: userExample: value: id: capabilities: completion_chat: true completion_fim: false function_calling: false fine_tuning: false vision: false classification: false job: root: open-mistral-7b object: model created: 1756746619 owned_by: name: null description: null max_context_length: 32768 aliases: [] deprecation: null deprecation_replacement_model: null default_model_temperature: null TYPE: fine-tuned archived: false '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - models delete: summary: Delete Model description: Delete a fine-tuned model. operationId: delete_model_v1_models__model_id__delete parameters: - name: model_id in: path required: true schema: type: string title: Model Id example: ft:open-mistral-7b:587a6b29:20240514:7e773925 description: The ID of the model to delete. responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DeleteModelOut' examples: userExample: value: id: ft:open-mistral-7b:587a6b29:20240514:7e773925 object: model deleted: true '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - models /v1/conversations: post: operationId: agents_api_v1_conversations_start summary: Create a conversation and append entries to it. description: Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. tags: - beta.conversations parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ConversationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: operationId: agents_api_v1_conversations_list summary: List all created conversations. description: Retrieve a list of conversation entities sorted by creation time. tags: - beta.conversations parameters: - name: page in: query required: false schema: type: integer title: Page default: 0 - name: page_size in: query required: false schema: type: integer title: Page Size default: 100 - name: metadata in: query required: false content: application/json: schema: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata responses: '200': description: Successful Response content: application/json: schema: type: array items: anyOf: - $ref: '#/components/schemas/ModelConversation' - $ref: '#/components/schemas/AgentConversation' title: Response V1 Conversations List '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/conversations/{conversation_id}: get: operationId: agents_api_v1_conversations_get summary: Retrieve a conversation information. description: Given a conversation_id retrieve a conversation entity with its attributes. tags: - beta.conversations parameters: - name: conversation_id in: path description: ID of the conversation from which we are fetching metadata. required: true schema: type: string title: Conversation Id description: ID of the conversation from which we are fetching metadata. responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/ModelConversation' - $ref: '#/components/schemas/AgentConversation' title: Response V1 Conversations Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: operationId: agents_api_v1_conversations_delete summary: Delete a conversation. description: Delete a conversation given a conversation_id. tags: - beta.conversations parameters: - name: conversation_id in: path description: ID of the conversation from which we are fetching metadata. required: true schema: type: string title: Conversation Id description: ID of the conversation from which we are fetching metadata. responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: operationId: agents_api_v1_conversations_append summary: Append new entries to an existing conversation. description: Run completion on the history of the conversation and the user entries. Return the new created entries. tags: - beta.conversations parameters: - name: conversation_id in: path description: ID of the conversation to which we append entries. required: true schema: type: string title: Conversation Id description: ID of the conversation to which we append entries. requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationAppendRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ConversationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/conversations/{conversation_id}/history: get: operationId: agents_api_v1_conversations_history summary: Retrieve all entries in a conversation. description: Given a conversation_id retrieve all the entries belonging to that conversation. The entries are sorted in the order they were appended, those can be messages, connectors or function_call. tags: - beta.conversations parameters: - name: conversation_id in: path description: ID of the conversation from which we are fetching entries. required: true schema: type: string title: Conversation Id description: ID of the conversation from which we are fetching entries. responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ConversationHistory' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/conversations/{conversation_id}/messages: get: operationId: agents_api_v1_conversations_messages summary: Retrieve all messages in a conversation. description: Given a conversation_id retrieve all the messages belonging to that conversation. This is similar to retrieving all entries except we filter the messages only. tags: - beta.conversations parameters: - name: conversation_id in: path description: ID of the conversation from which we are fetching messages. required: true schema: type: string title: Conversation Id description: ID of the conversation from which we are fetching messages. responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ConversationMessages' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/conversations/{conversation_id}/restart: post: operationId: agents_api_v1_conversations_restart summary: Restart a conversation starting from a given entry. description: Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned. tags: - beta.conversations parameters: - name: conversation_id in: path description: ID of the original conversation which is being restarted. required: true schema: type: string title: Conversation Id description: ID of the original conversation which is being restarted. requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationRestartRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ConversationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents: post: operationId: agents_api_v1_agents_create summary: Create a agent that can be used within a conversation. description: Create a new agent giving it instructions, tools, description. The agent is then available to be used as a regular assistant in a conversation or as part of an agent pool from which it can be used. tags: - beta.agents parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AgentCreationRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Agent' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: operationId: agents_api_v1_agents_list summary: List agent entities. description: Retrieve a list of agent entities sorted by creation time. tags: - beta.agents parameters: - name: page in: query description: Page number (0-indexed) required: false schema: type: integer title: Page minimum: 0 description: Page number (0-indexed) default: 0 - name: page_size in: query description: Number of agents per page required: false schema: type: integer title: Page Size maximum: 1000 minimum: 1 description: Number of agents per page default: 20 - name: deployment_chat in: query required: false schema: anyOf: - type: boolean - type: 'null' title: Deployment Chat - name: sources in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/RequestSource' - type: 'null' title: Sources - name: name in: query description: Filter by agent name required: false schema: anyOf: - type: string - type: 'null' title: Name description: Filter by agent name - name: search in: query description: Search agents by name or ID required: false schema: anyOf: - type: string - type: 'null' title: Search description: Search agents by name or ID - name: id in: query required: false schema: anyOf: - type: string - type: 'null' title: Id - name: metadata in: query required: false content: application/json: schema: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/Agent' title: Response V1 Agents List '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}: get: operationId: agents_api_v1_agents_get summary: Retrieve an agent entity. description: Given an agent, retrieve an agent entity with its attributes. The agent_version parameter can be an integer version number or a string alias. tags: - beta.agents parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id - name: agent_version in: query required: false schema: anyOf: - type: integer - type: string - type: 'null' title: Agent Version responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Agent' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: operationId: agents_api_v1_agents_update summary: Update an agent entity. description: Update an agent attributes and create a new version. tags: - beta.agents parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id requestBody: content: application/json: schema: $ref: '#/components/schemas/AgentUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Agent' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: operationId: agents_api_v1_agents_delete summary: Delete an agent entity. tags: - beta.agents parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/version: patch: operationId: agents_api_v1_agents_update_version summary: Update an agent version. description: Switch the version of an agent. tags: - beta.agents parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id - name: version in: query required: true schema: type: integer title: Version responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Agent' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/versions: get: operationId: agents_api_v1_agents_list_versions summary: List all versions of an agent. description: Retrieve all versions for a specific agent with full agent context. Supports pagination. tags: - beta.agents parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id - name: page in: query description: Page number (0-indexed) required: false schema: type: integer title: Page minimum: 0 description: Page number (0-indexed) default: 0 - name: page_size in: query description: Number of versions per page required: false schema: type: integer title: Page Size maximum: 100 minimum: 1 description: Number of versions per page default: 20 responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/Agent' title: Response V1 Agents List Versions '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/versions/{version}: get: operationId: agents_api_v1_agents_get_version summary: Retrieve a specific version of an agent. description: Get a specific agent version by version number. tags: - beta.agents parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id - name: version in: path required: true schema: type: string title: Version responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Agent' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/{agent_id}/aliases: put: operationId: agents_api_v1_agents_create_or_update_alias summary: Create or update an agent version alias. description: Create a new alias or update an existing alias to point to a specific version. Aliases are unique per agent and can be reassigned to different versions. tags: - beta.agents parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id - name: alias in: query required: true schema: type: string title: Alias maxLength: 64 minLength: 1 pattern: ^[a-z]([a-z0-9_-]*[a-z0-9])?$ - name: version in: query required: true schema: type: integer title: Version responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AgentAliasResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: operationId: agents_api_v1_agents_list_version_aliases summary: List all aliases for an agent. description: Retrieve all version aliases for a specific agent. tags: - beta.agents parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/AgentAliasResponse' title: Response V1 Agents List Version Aliases '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: operationId: agents_api_v1_agents_delete_alias summary: Delete an agent version alias. description: Delete an existing alias for an agent. tags: - beta.agents parameters: - name: agent_id in: path required: true schema: type: string title: Agent Id - name: alias in: query required: true schema: type: string title: Alias maxLength: 64 minLength: 1 pattern: ^[a-z]([a-z0-9_-]*[a-z0-9])?$ responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/conversations#stream: post: operationId: agents_api_v1_conversations_start_stream summary: Create a conversation and append entries to it. description: Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. tags: - beta.conversations parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationStreamRequest' required: true responses: '200': description: Successful Response content: text/event-stream: schema: $ref: '#/components/schemas/ConversationEvents' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/conversations/{conversation_id}#stream: post: operationId: agents_api_v1_conversations_append_stream summary: Append new entries to an existing conversation. description: Run completion on the history of the conversation and the user entries. Return the new created entries. tags: - beta.conversations parameters: - name: conversation_id in: path description: ID of the conversation to which we append entries. required: true schema: type: string title: Conversation Id description: ID of the conversation to which we append entries. requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationAppendStreamRequest' required: true responses: '200': description: Successful Response content: text/event-stream: schema: $ref: '#/components/schemas/ConversationEvents' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/conversations/{conversation_id}/restart#stream: post: operationId: agents_api_v1_conversations_restart_stream summary: Restart a conversation starting from a given entry. description: Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned. tags: - beta.conversations parameters: - name: conversation_id in: path description: ID of the original conversation which is being restarted. required: true schema: type: string title: Conversation Id description: ID of the original conversation which is being restarted. requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationRestartStreamRequest' required: true responses: '200': description: Successful Response content: text/event-stream: schema: $ref: '#/components/schemas/ConversationEvents' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/files: post: operationId: files_api_routes_upload_file summary: Upload File description: 'Upload a file that can be used across various endpoints. The size of individual files can be a maximum of 512 MB. The Fine-tuning API only supports .jsonl files. Please contact us if you need to increase these storage limits.' tags: - files parameters: [] requestBody: content: multipart/form-data: schema: type: object properties: expiry: anyOf: - type: integer - type: 'null' title: Expiry visibility: allOf: - type: string title: FileVisibility enum: - workspace - user default: workspace purpose: $ref: '#/components/schemas/FilePurpose' file: $ref: '#/components/schemas/File' title: MultiPartBodyParams required: - file required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UploadFileOut' examples: userExample: value: id: e85980c9-409e-4a46-9304-36588f6292b0 object: file bytes: null created_at: 1759500189 filename: example.file.jsonl purpose: fine-tune sample_type: instruct source: upload num_lines: 2 mimetype: application/jsonl signature: d4821d2de1917341 get: operationId: files_api_routes_list_files summary: List Files description: Returns a list of files that belong to the user's organization. tags: - files parameters: - name: page in: query required: false schema: type: integer title: Page default: 0 - name: page_size in: query required: false schema: type: integer title: Page Size default: 100 - name: include_total in: query required: false schema: type: boolean title: Include Total default: true - name: sample_type in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/SampleType' - type: 'null' title: Sample Type - name: source in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/Source' - type: 'null' title: Source - name: search in: query required: false schema: anyOf: - type: string - type: 'null' title: Search - name: purpose in: query required: false schema: anyOf: - $ref: '#/components/schemas/FilePurpose' - type: 'null' - name: mimetypes in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' title: Mimetypes responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListFilesOut' examples: userExample: value: data: - id: object: file bytes: null created_at: 1759491994 filename: purpose: batch sample_type: batch_result source: mistral num_lines: 2 mimetype: application/jsonl signature: null - id: object: file bytes: null created_at: 1759491994 filename: purpose: batch sample_type: batch_result source: mistral num_lines: 2 mimetype: application/jsonl signature: null object: list total: 2 /v1/files/{file_id}: get: operationId: files_api_routes_retrieve_file summary: Retrieve File description: Returns information about a specific file. tags: - files parameters: - name: file_id in: path required: true schema: type: string title: File Id format: uuid responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RetrieveFileOut' examples: userExample: value: id: e85980c9-409e-4a46-9304-36588f6292b0 object: file bytes: null created_at: 1759500189 filename: example.file.jsonl purpose: fine-tune sample_type: instruct source: upload deleted: false num_lines: 2 mimetype: application/jsonl signature: d4821d2de1917341 delete: operationId: files_api_routes_delete_file summary: Delete File description: Delete a file. tags: - files parameters: - name: file_id in: path required: true schema: type: string title: File Id format: uuid responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/DeleteFileOut' examples: userExample: value: id: e85980c9-409e-4a46-9304-36588f6292b0 object: file deleted: true /v1/files/{file_id}/content: get: operationId: files_api_routes_download_file summary: Download File description: Download a file tags: - files parameters: - name: file_id in: path required: true schema: type: string title: File Id format: uuid responses: '200': description: OK content: application/octet-stream: schema: type: string format: binary /v1/files/{file_id}/url: get: operationId: files_api_routes_get_signed_url summary: Get Signed Url tags: - files parameters: - name: file_id in: path required: true schema: type: string title: File Id format: uuid - name: expiry in: query description: Number of hours before the url becomes invalid. Defaults to 24h required: false schema: type: integer title: Expiry description: Number of hours before the url becomes invalid. Defaults to 24h default: 24 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/FileSignedURL' examples: userExample: value: url: https://mistralaifilesapiprodswe.blob.core.windows.net/fine-tune/.../.../e85980c9409e4a46930436588f6292b0.jsonl?se=2025-10-04T14%3A16%3A17Z&sp=r&sv=2025-01-05&sr=b&sig=... /v1/fine_tuning/jobs: get: operationId: jobs_api_routes_fine_tuning_get_fine_tuning_jobs summary: Get Fine Tuning Jobs description: Get a list of fine-tuning jobs for your organization and user. tags: - deprecated.fine-tuning parameters: - name: page in: query description: The page number of the results to be returned. required: false schema: type: integer title: Page default: 0 - name: page_size in: query description: The number of items to return per page. required: false schema: type: integer title: Page Size default: 100 - name: model in: query description: The model name used for fine-tuning to filter on. When set, the other results are not displayed. required: false schema: anyOf: - type: string - type: 'null' title: Model - name: created_after in: query description: The date/time to filter on. When set, the results for previous creation times are not displayed. required: false schema: anyOf: - type: string format: date-time - type: 'null' title: Created After - name: created_before in: query required: false schema: anyOf: - type: string format: date-time - type: 'null' title: Created Before - name: created_by_me in: query description: When set, only return results for jobs created by the API caller. Other results are not displayed. required: false schema: type: boolean title: Created By Me default: false - name: status in: query description: The current job state to filter on. When set, the other results are not displayed. required: false schema: anyOf: - type: string enum: - QUEUED - STARTED - VALIDATING - VALIDATED - RUNNING - FAILED_VALIDATION - FAILED - SUCCESS - CANCELLED - CANCELLATION_REQUESTED - type: 'null' title: Status - name: wandb_project in: query description: The Weights and Biases project to filter on. When set, the other results are not displayed. required: false schema: anyOf: - type: string - type: 'null' title: Wandb Project - name: wandb_name in: query description: The Weight and Biases run name to filter on. When set, the other results are not displayed. required: false schema: anyOf: - type: string - type: 'null' title: Wandb Name - name: suffix in: query description: The model suffix to filter on. When set, the other results are not displayed. required: false schema: anyOf: - type: string - type: 'null' title: Suffix responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/JobsOut' post: operationId: jobs_api_routes_fine_tuning_create_fine_tuning_job summary: Create Fine Tuning Job description: Create a new fine-tuning job, it will be queued for processing. tags: - deprecated.fine-tuning parameters: - name: dry_run in: query required: false schema: anyOf: - type: boolean - type: 'null' title: Dry Run description: "* If `true` the job is not spawned, instead the query returns a handful of useful metadata\n for the user to perform sanity checks (see `LegacyJobMetadataOut` response).\n* Otherwise, the job is started and the query returns the job ID along with some of the\n input parameters (see `JobOut` response).\n" requestBody: content: application/json: schema: $ref: '#/components/schemas/JobIn' required: true responses: '200': description: OK content: application/json: schema: anyOf: - oneOf: - $ref: '#/components/schemas/CompletionJobOut' - $ref: '#/components/schemas/ClassifierJobOut' discriminator: propertyName: job_type mapping: classifier: '#/components/schemas/ClassifierJobOut' completion: '#/components/schemas/CompletionJobOut' - $ref: '#/components/schemas/LegacyJobMetadataOut' title: Response /v1/fine_tuning/jobs/{job_id}: get: operationId: jobs_api_routes_fine_tuning_get_fine_tuning_job summary: Get Fine Tuning Job description: Get a fine-tuned job details by its UUID. tags: - deprecated.fine-tuning parameters: - name: job_id in: path description: The ID of the job to analyse. required: true schema: type: string title: Job Id format: uuid responses: '200': description: OK content: application/json: schema: oneOf: - $ref: '#/components/schemas/CompletionDetailedJobOut' - $ref: '#/components/schemas/ClassifierDetailedJobOut' discriminator: propertyName: job_type mapping: classifier: '#/components/schemas/ClassifierDetailedJobOut' completion: '#/components/schemas/CompletionDetailedJobOut' title: Response /v1/fine_tuning/jobs/{job_id}/cancel: post: operationId: jobs_api_routes_fine_tuning_cancel_fine_tuning_job summary: Cancel Fine Tuning Job description: Request the cancellation of a fine tuning job. tags: - deprecated.fine-tuning parameters: - name: job_id in: path description: The ID of the job to cancel. required: true schema: type: string title: Job Id format: uuid responses: '200': description: OK content: application/json: schema: oneOf: - $ref: '#/components/schemas/CompletionDetailedJobOut' - $ref: '#/components/schemas/ClassifierDetailedJobOut' discriminator: propertyName: job_type mapping: classifier: '#/components/schemas/ClassifierDetailedJobOut' completion: '#/components/schemas/CompletionDetailedJobOut' title: Response /v1/fine_tuning/jobs/{job_id}/start: post: operationId: jobs_api_routes_fine_tuning_start_fine_tuning_job summary: Start Fine Tuning Job description: Request the start of a validated fine tuning job. tags: - deprecated.fine-tuning parameters: - name: job_id in: path required: true schema: type: string title: Job Id format: uuid responses: '200': description: OK content: application/json: schema: oneOf: - $ref: '#/components/schemas/CompletionDetailedJobOut' - $ref: '#/components/schemas/ClassifierDetailedJobOut' discriminator: propertyName: job_type mapping: classifier: '#/components/schemas/ClassifierDetailedJobOut' completion: '#/components/schemas/CompletionDetailedJobOut' title: Response /v1/fine_tuning/models/{model_id}: patch: operationId: jobs_api_routes_fine_tuning_update_fine_tuned_model summary: Update Fine Tuned Model description: Update a model name or description. tags: - models parameters: - name: model_id in: path description: The ID of the model to update. required: true schema: type: string title: Model Id example: ft:open-mistral-7b:587a6b29:20240514:7e773925 requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateFTModelIn' required: true responses: '200': description: OK content: application/json: schema: oneOf: - $ref: '#/components/schemas/CompletionFTModelOut' - $ref: '#/components/schemas/ClassifierFTModelOut' discriminator: propertyName: model_type mapping: classifier: '#/components/schemas/ClassifierFTModelOut' completion: '#/components/schemas/CompletionFTModelOut' title: Response /v1/fine_tuning/models/{model_id}/archive: post: operationId: jobs_api_routes_fine_tuning_archive_fine_tuned_model summary: Archive Fine Tuned Model description: Archive a fine-tuned model. tags: - models parameters: - name: model_id in: path description: The ID of the model to archive. required: true schema: type: string title: Model Id example: ft:open-mistral-7b:587a6b29:20240514:7e773925 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ArchiveFTModelOut' delete: operationId: jobs_api_routes_fine_tuning_unarchive_fine_tuned_model summary: Unarchive Fine Tuned Model description: Un-archive a fine-tuned model. tags: - models parameters: - name: model_id in: path description: The ID of the model to unarchive. required: true schema: type: string title: Model Id example: ft:open-mistral-7b:587a6b29:20240514:7e773925 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UnarchiveFTModelOut' /v1/batch/jobs: get: operationId: jobs_api_routes_batch_get_batch_jobs summary: Get Batch Jobs description: Get a list of batch jobs for your organization and user. tags: - batch parameters: - name: page in: query required: false schema: type: integer title: Page default: 0 - name: page_size in: query required: false schema: type: integer title: Page Size default: 100 - name: model in: query required: false schema: anyOf: - type: string - type: 'null' title: Model - name: agent_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Agent Id - name: metadata in: query required: false schema: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata - name: created_after in: query required: false schema: anyOf: - type: string format: date-time - type: 'null' title: Created After - name: created_by_me in: query required: false schema: type: boolean title: Created By Me default: false - name: status in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/BatchJobStatus' - type: 'null' title: Status - name: order_by in: query required: false schema: type: string title: Order By enum: - created - -created default: -created responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/BatchJobsOut' post: operationId: jobs_api_routes_batch_create_batch_job summary: Create Batch Job description: Create a new batch job, it will be queued for processing. tags: - batch parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/BatchJobIn' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/BatchJobOut' /v1/batch/jobs/{job_id}: get: operationId: jobs_api_routes_batch_get_batch_job summary: Get Batch Job description: "Get a batch job details by its UUID.\n\nArgs:\n inline: If True, return results inline in the response." tags: - batch parameters: - name: job_id in: path required: true schema: type: string title: Job Id format: uuid - name: inline in: query required: false schema: anyOf: - type: boolean - type: 'null' title: Inline responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/BatchJobOut' /v1/batch/jobs/{job_id}/cancel: post: operationId: jobs_api_routes_batch_cancel_batch_job summary: Cancel Batch Job description: Request the cancellation of a batch job. tags: - batch parameters: - name: job_id in: path required: true schema: type: string title: Job Id format: uuid responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/BatchJobOut' /v1/chat/completions: post: operationId: chat_completion_v1_chat_completions_post summary: Chat Completion tags: - chat requestBody: content: application/json: schema: $ref: '#/components/schemas/ChatCompletionRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ChatCompletionResponse' text/event-stream: schema: $ref: '#/components/schemas/CompletionEvent' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/fim/completions: post: operationId: fim_completion_v1_fim_completions_post summary: Fim Completion description: FIM completion. tags: - fim requestBody: content: application/json: schema: $ref: '#/components/schemas/FIMCompletionRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/FIMCompletionResponse' examples: userExample: value: id: 447e3e0d457e42e98248b5d2ef52a2a3 object: chat.completion model: codestral-2508 usage: prompt_tokens: 8 completion_tokens: 91 total_tokens: 99 created: 1759496862 choices: - index: 0 message: content: "add_numbers(a: int, b: int) -> int:\n \"\"\"\n You are given two integers `a` and `b`. Your task is to write a function that\n returns the sum of these two integers. The function should be implemented in a\n way that it can handle very large integers (up to 10^18). As a reminder, your\n code has to be in python\n \"\"\"\n" tool_calls: null prefix: false role: assistant finish_reason: stop text/event-stream: schema: $ref: '#/components/schemas/CompletionEvent' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/agents/completions: post: operationId: agents_completion_v1_agents_completions_post summary: Agents Completion deprecated: true tags: - deprecated.agents requestBody: content: application/json: schema: $ref: '#/components/schemas/AgentsCompletionRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ChatCompletionResponse' examples: userExample: value: id: cf79f7daaee244b1a0ae5c7b1444424a object: chat.completion model: mistral-medium-latest usage: prompt_tokens: 24 completion_tokens: 27 total_tokens: 51 prompt_audio_seconds: {} created: 1759500534 choices: - index: 0 message: content: Arrr, the scallywag Claude Monet be the finest French painter to ever splash colors on a canvas, savvy? tool_calls: null prefix: false role: assistant finish_reason: stop '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/embeddings: post: operationId: embeddings_v1_embeddings_post summary: Embeddings description: Embeddings tags: - embeddings requestBody: content: application/json: schema: $ref: '#/components/schemas/EmbeddingRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/EmbeddingResponse' examples: userExample: value: data: - embedding: - -0.016632080078125 - 0.0701904296875 - 0.03143310546875 - 0.01309967041015625 - 0.0202789306640625 index: 0 object: embedding - embedding: - -0.0230560302734375 - 0.039337158203125 - 0.0521240234375 - -0.0184783935546875 - 0.034271240234375 index: 1 object: embedding model: mistral-embed object: list usage: prompt_tokens: 15 completion_tokens: 0 total_tokens: 15 prompt_audio_seconds: null '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/moderations: post: operationId: moderations_v1_moderations_post summary: Moderations tags: - classifiers requestBody: content: application/json: schema: $ref: '#/components/schemas/ClassificationRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ModerationResponse' examples: userExample: value: id: 4d71ae510af942108ef7344f903e2b88 model: mistral-moderation-latest results: - categories: sexual: false hate_and_discrimination: false violence_and_threats: false dangerous_and_criminal_content: false selfharm: false health: false financial: false law: false pii: false category_scores: sexual: 0.0011335690505802631 hate_and_discrimination: 0.0030753696337342262 violence_and_threats: 0.0003569706459529698 dangerous_and_criminal_content: 0.002251847181469202 selfharm: 0.00017952796770259738 health: 0.0002780309587251395 financial: 8.481103577651083e-05 law: 4.539786823443137e-05 pii: 0.0023967307060956955 - categories: sexual: false hate_and_discrimination: false violence_and_threats: false dangerous_and_criminal_content: false selfharm: false health: false financial: false law: false pii: false category_scores: sexual: 0.000626334105618298 hate_and_discrimination: 0.0013670255430042744 violence_and_threats: 0.0002611903182696551 dangerous_and_criminal_content: 0.0030753696337342262 selfharm: 0.00010889690747717395 health: 0.00015843621804378927 financial: 0.000191104321856983 law: 4.006369272246957e-05 pii: 0.0035936026833951473 '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/chat/moderations: post: operationId: chat_moderations_v1_chat_moderations_post summary: Chat Moderations tags: - classifiers requestBody: content: application/json: schema: $ref: '#/components/schemas/ChatModerationRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ModerationResponse' examples: userExample: value: id: 352bce1a55814127a3b0bc4fb8f02a35 model: mistral-moderation-latest results: - categories: sexual: false hate_and_discrimination: false violence_and_threats: false dangerous_and_criminal_content: false selfharm: false health: false financial: false law: false pii: false category_scores: sexual: 0.0010322310263291001 hate_and_discrimination: 0.001597845577634871 violence_and_threats: 0.00020342698553577065 dangerous_and_criminal_content: 0.0029810327105224133 selfharm: 0.00017952796770259738 health: 0.0002959570847451687 financial: 7.9673009167891e-05 law: 4.539786823443137e-05 pii: 0.004198795650154352 '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/ocr: post: operationId: ocr_v1_ocr_post summary: OCR tags: - ocr requestBody: content: application/json: schema: $ref: '#/components/schemas/OCRRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/OCRResponse' examples: userExample: value: pages: - index: 1 markdown: '# LEVERAGING UNLABELED DATA TO PREDICT OUT-OF-DISTRIBUTION PERFORMANCE Saurabh Garg*
Carnegie Mellon University
sgarg2@andrew.cmu.edu
Sivaraman Balakrishnan
Carnegie Mellon University
sbalakri@andrew.cmu.edu
Zachary C. Lipton
Carnegie Mellon University
zlipton@andrew.cmu.edu ## Behnam Neyshabur Google Research, Blueshift team
neyshabur@google.com Hanie Sedghi
Google Research, Brain team
hsedghi@google.com #### Abstract Real-world machine learning deployments are characterized by mismatches between the source (training) and target (test) distributions that may cause performance drops. In this work, we investigate methods for predicting the target domain accuracy using only labeled source data and unlabeled target data. We propose Average Thresholded Confidence (ATC), a practical method that learns a threshold on the model''s confidence, predicting accuracy as the fraction of unlabeled examples for which model confidence exceeds that threshold. ATC outperforms previous methods across several model architectures, types of distribution shifts (e.g., due to synthetic corruptions, dataset reproduction, or novel subpopulations), and datasets (WILDS, ImageNet, BREEDS, CIFAR, and MNIST). In our experiments, ATC estimates target performance $2-4 \times$ more accurately than prior methods. We also explore the theoretical foundations of the problem, proving that, in general, identifying the accuracy is just as hard as identifying the optimal predictor and thus, the efficacy of any method rests upon (perhaps unstated) assumptions on the nature of the shift. Finally, analyzing our method on some toy distributions, we provide insights concerning when it works ${ }^{1}$. ## 1 INTRODUCTION Machine learning models deployed in the real world typically encounter examples from previously unseen distributions. While the IID assumption enables us to evaluate models using held-out data from the source distribution (from which training data is sampled), this estimate is no longer valid in presence of a distribution shift. Moreover, under such shifts, model accuracy tends to degrade (Szegedy et al., 2014; Recht et al., 2019; Koh et al., 2021). Commonly, the only data available to the practitioner are a labeled training set (source) and unlabeled deployment-time data which makes the problem more difficult. In this setting, detecting shifts in the distribution of covariates is known to be possible (but difficult) in theory (Ramdas et al., 2015), and in practice (Rabanser et al., 2018). However, producing an optimal predictor using only labeled source and unlabeled target data is well-known to be impossible absent further assumptions (Ben-David et al., 2010; Lipton et al., 2018). Two vital questions that remain are: (i) the precise conditions under which we can estimate a classifier''s target-domain accuracy; and (ii) which methods are most practically useful. To begin, the straightforward way to assess the performance of a model under distribution shift would be to collect labeled (target domain) examples and then to evaluate the model on that data. However, collecting fresh labeled data from the target distribution is prohibitively expensive and time-consuming, especially if the target distribution is non-stationary. Hence, instead of using labeled data, we aim to use unlabeled data from the target distribution, that is comparatively abundant, to predict model performance. Note that in this work, our focus is not to improve performance on the target but, rather, to estimate the accuracy on the target for a given classifier. [^0]: Work done in part while Saurabh Garg was interning at Google ${ }^{1}$ Code is available at [https://github.com/saurabhgarg1996/ATC_code](https://github.com/saurabhgarg1996/ATC_code). ' images: [] dimensions: dpi: 200 height: 2200 width: 1700 - index: 2 markdown: '![img-0.jpeg](img-0.jpeg) Figure 1: Illustration of our proposed method ATC. Left: using source domain validation data, we identify a threshold on a score (e.g. negative entropy) computed on model confidence such that fraction of examples above the threshold matches the validation set accuracy. ATC estimates accuracy on unlabeled target data as the fraction of examples with the score above the threshold. Interestingly, this threshold yields accurate estimates on a wide set of target distributions resulting from natural and synthetic shifts. Right: Efficacy of ATC over previously proposed approaches on our testbed with a post-hoc calibrated model. To obtain errors on the same scale, we rescale all errors with Average Confidence (AC) error. Lower estimation error is better. See Table 1 for exact numbers and comparison on various types of distribution shift. See Sec. 5 for details on our testbed. Recently, numerous methods have been proposed for this purpose (Deng & Zheng, 2021; Chen et al., 2021b; Jiang et al., 2021; Deng et al., 2021; Guillory et al., 2021). These methods either require calibration on the target domain to yield consistent estimates (Jiang et al., 2021; Guillory et al., 2021) or additional labeled data from several target domains to learn a linear regression function on a distributional distance that then predicts model performance (Deng et al., 2021; Deng & Zheng, 2021; Guillory et al., 2021). However, methods that require calibration on the target domain typically yield poor estimates since deep models trained and calibrated on source data are not, in general, calibrated on a (previously unseen) target domain (Ovadia et al., 2019). Besides, methods that leverage labeled data from target domains rely on the fact that unseen target domains exhibit strong linear correlation with seen target domains on the underlying distance measure and, hence, can be rendered ineffective when such target domains with labeled data are unavailable (in Sec. 5.1 we demonstrate such a failure on a real-world distribution shift problem). Therefore, throughout the paper, we assume access to labeled source data and only unlabeled data from target domain(s). In this work, we first show that absent assumptions on the source classifier or the nature of the shift, no method of estimating accuracy will work generally (even in non-contrived settings). To estimate accuracy on target domain perfectly, we highlight that even given perfect knowledge of the labeled source distribution (i.e., $p_{s}(x, y)$ ) and unlabeled target distribution (i.e., $p_{t}(x)$ ), we need restrictions on the nature of the shift such that we can uniquely identify the target conditional $p_{t}(y \mid x)$. Thus, in general, identifying the accuracy of the classifier is as hard as identifying the optimal predictor. Second, motivated by the superiority of methods that use maximum softmax probability (or logit) of a model for Out-Of-Distribution (OOD) detection (Hendrycks & Gimpel, 2016; Hendrycks et al., 2019), we propose a simple method that leverages softmax probability to predict model performance. Our method, Average Thresholded Confidence (ATC), learns a threshold on a score (e.g., maximum confidence or negative entropy) of model confidence on validation source data and predicts target domain accuracy as the fraction of unlabeled target points that receive a score above that threshold. ATC selects a threshold on validation source data such that the fraction of source examples that receive the score above the threshold match the accuracy of those examples. Our primary contribution in ATC is the proposal of obtaining the threshold and observing its efficacy on (practical) accuracy estimation. Importantly, our work takes a step forward in positively answering the question raised in Deng & Zheng (2021); Deng et al. (2021) about a practical strategy to select a threshold that enables accuracy prediction with thresholded model confidence. ' images: - id: img-0.jpeg top_left_x: 292 top_left_y: 217 bottom_right_x: 1405 bottom_right_y: 649 image_base64: '...' dimensions: dpi: 200 height: 2200 width: 1700 - index: 3 markdown: '...' images: [] dimensions: {} - index: 27 markdown: '![img-8.jpeg](img-8.jpeg) Figure 9: Scatter plot of predicted accuracy versus (true) OOD accuracy for vision datasets except MNIST with a ResNet50 model. Results reported by aggregating MAE numbers over 4 different seeds. ' images: - id: img-8.jpeg top_left_x: 290 top_left_y: 226 bottom_right_x: 1405 bottom_right_y: 1834 image_base64: '...' dimensions: dpi: 200 height: 2200 width: 1700 - index: 28 markdown: '| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 6.60 | 5.74 | 9.88 | 6.89 | 7.25 | 6.07 | 4.77 | 3.21 | 3.02 | 2.99 | 2.85 | | | | (0.35) | (0.30) | (0.16) | (0.13) | (0.15) | (0.16) | (0.13) | (0.49) | (0.40) | (0.37) | (0.29) | | | Synthetic | 12.33 | 10.20 | 16.50 | 11.91 | 13.87 | 11.08 | 6.55 | 4.65 | 4.25 | 4.21 | 3.87 | | | | (0.51) | (0.48) | (0.26) | (0.17) | (0.18) | (0.17) | (0.35) | (0.55) | (0.55) | (0.55) | (0.75) | | CIFAR100 | Synthetic | 13.69 | 11.51 | 23.61 | 13.10 | 14.60 | 10.14 | 9.85 | 5.50 | 4.75 | 4.72 | 4.94 | | | | (0.55) | (0.41) | (1.16) | (0.80) | (0.77) | (0.64) | (0.57) | (0.70) | (0.73) | (0.74) | (0.74) | | ImageNet200 | Natural | 12.37 | 8.19 | 22.07 | 8.61 | 15.17 | 7.81 | 5.13 | 4.37 | 2.04 | 3.79 | 1.45 | | | | (0.25) | (0.33) | (0.08) | (0.25) | (0.11) | (0.29) | (0.08) | (0.39) | (0.24) | (0.30) | (0.27) | | | Synthetic | 19.86 | 12.94 | 32.44 | 13.35 | 25.02 | 12.38 | 5.41 | 5.93 | 3.09 | 5.00 | 2.68 | | | | (1.38) | (1.81) | (1.00) | (1.30) | (1.10) | (1.38) | (0.89) | (1.38) | (0.87) | (1.28) | (0.45) | | ImageNet | Natural | 7.77 | 6.50 | 18.13 | 6.02 | 8.13 | 5.76 | 6.23 | 3.88 | 2.17 | 2.06 | 0.80 | | | | (0.27) | (0.33) | (0.23) | (0.34) | (0.27) | (0.37) | (0.41) | (0.53) | (0.62) | (0.54) | (0.44) | | | Synthetic | 13.39 | 10.12 | 24.62 | 8.51 | 13.55 | 7.90 | 6.32 | 3.34 | 2.53 | 2.61 | 4.89 | | | | (0.53) | (0.63) | (0.64) | (0.71) | (0.61) | (0.72) | (0.33) | (0.53) | (0.36) | (0.33) | (0.83) | | FMoW-WILDS | Natural | 5.53 | 4.31 | 33.53 | 12.84 | 5.94 | 4.45 | 5.74 | 3.06 | 2.70 | 3.02 | 2.72 | | | | (0.33) | (0.63) | (0.13) | (12.06) | (0.36) | (0.77) | (0.55) | (0.36) | (0.54) | (0.35) | (0.44) | | RxRx1-WILDS | Natural | 5.80 | 5.72 | 7.90 | 4.84 | 5.98 | 5.98 | 6.03 | 4.66 | 4.56 | 4.41 | 4.47 | | | | (0.17) | (0.15) | (0.24) | (0.09) | (0.15) | (0.13) | (0.08) | (0.38) | (0.38) | (0.31) | (0.26) | | Amazon-WILDS | Natural | 2.40 | 2.29 | 8.01 | 2.38 | 2.40 | 2.28 | 17.87 | 1.65 | 1.62 | 1.60 | 1.59 | | | | (0.08) | (0.09) | (0.53) | (0.17) | (0.09) | (0.09) | (0.18) | (0.06) | (0.05) | (0.14) | (0.15) | | CivilCom.-WILDS | Natural | 12.64 | 10.80 | 16.76 | 11.03 | 13.31 | 10.99 | 16.65 | | 7.14 | | | | | | (0.52) | (0.48) | (0.53) | (0.49) | (0.52) | (0.49) | (0.25) | | (0.41) | | | | MNIST | Natural | 18.48 | 15.99 | 21.17 | 14.81 | 20.19 | 14.56 | 24.42 | 5.02 | 2.40 | 3.14 | 3.50 | | | | (0.45) | (1.53) | (0.24) | (3.89) | (0.23) | (3.47) | (0.41) | (0.44) | (1.83) | (0.49) | (0.17) | | ENTITY-13 | Same | 16.23 | 11.14 | 24.97 | 10.88 | 19.08 | 10.47 | 10.71 | 5.39 | 3.88 | 4.58 | 4.19 | | | | (0.77) | (0.65) | (0.70) | (0.77) | (0.65) | (0.72) | (0.74) | (0.92) | (0.61) | (0.85) | (0.16) | | | Novel | 28.53 | 22.02 | 38.33 | 21.64 | 32.43 | 21.22 | 20.61 | 13.58 | 10.28 | 12.25 | 6.63 | | | | (0.82) | (0.68) | (0.75) | (0.86) | (0.69) | (0.80) | (0.60) | (1.15) | (1.34) | (1.21) | (0.93) | | ENTITY-30 | Same | 18.59 | 14.46 | 28.82 | 14.30 | 21.63 | 13.46 | 12.92 | 9.12 | 7.75 | 8.15 | 7.64 | | | | (0.51) | (0.52) | (0.43) | (0.71) | (0.37) | (0.59) | (0.14) | (0.62) | (0.72) | (0.68) | (0.88) | | | Novel | 32.34 | 26.85 | 44.02 | 26.27 | 36.82 | 25.42 | 23.16 | 17.75 | 14.30 | 15.60 | 10.57 | | | | (0.60) | (0.58) | (0.56) | (0.79) | (0.47) | (0.68) | (0.12) | (0.76) | (0.85) | (0.86) | (0.86) | | NONLIVING-26 | Same | 18.66 | 17.17 | 26.39 | 16.14 | 19.86 | 15.58 | 16.63 | 10.87 | 10.24 | 10.07 | 10.26 | | | | (0.76) | (0.74) | (0.82) | (0.81) | (0.67) | (0.76) | (0.45) | (0.98) | (0.83) | (0.92) | (1.18) | | | Novel | 33.43 | 31.53 | 41.66 | 29.87 | 35.13 | 29.31 | 29.56 | 21.70 | 20.12 | 19.08 | 18.26 | | | | (0.67) | (0.65) | (0.67) | (0.71) | (0.54) | (0.64) | (0.21) | (0.86) | (0.75) | (0.82) | (1.12) | | LIVING-17 | Same | 12.63 | 11.05 | 18.32 | 10.46 | 14.43 | 10.14 | 9.87 | 4.57 | 3.95 | 3.81 | 4.21 | | | | (1.25) | (1.20) | (1.01) | (1.12) | (1.11) | (1.16) | (0.61) | (0.71) | (0.48) | (0.22) | (0.53) | | | Novel | 29.03 | 26.96 | 35.67 | 26.11 | 31.73 | 25.73 | 23.53 | 16.15 | 14.49 | 12.97 | 11.39 | | | | (1.44) | (1.38) | (1.09) | (1.27) | (1.19) | (1.35) | (0.52) | (1.36) | (1.46) | (1.52) | (1.72) | Table 3: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift. ''Same'' refers to same subpopulation shifts and ''Novel'' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. For language datasets, we use DistilBERT-base-uncased, for vision dataset we report results with DenseNet model with the exception of MNIST where we use FCN. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn''t alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\cdot)$ ) denote standard deviation values. ' images: [] dimensions: dpi: 200 height: 2200 width: 1700 - index: 29 markdown: '| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 7.14 | 6.20 | 10.25 | 7.06 | 7.68 | 6.35 | 5.74 | 4.02 | 3.85 | 3.76 | 3.38 | | | | (0.14) | (0.11) | (0.31) | (0.33) | (0.28) | (0.27) | (0.25) | (0.38) | (0.30) | (0.33) | (0.32) | | | Synthetic | 12.62 | 10.75 | 16.50 | 11.91 | 13.93 | 11.20 | 7.97 | 5.66 | 5.03 | 4.87 | 3.63 | | | | (0.76) | (0.71) | (0.28) | (0.24) | (0.29) | (0.28) | (0.13) | (0.64) | (0.71) | (0.71) | (0.62) | | CIFAR100 | Synthetic | 12.77 | 12.34 | 16.89 | 12.73 | 11.18 | 9.63 | 12.00 | 5.61 | 5.55 | 5.65 | 5.76 | | | | (0.43) | (0.68) | (0.20) | (2.59) | (0.35) | (1.25) | (0.48) | (0.51) | (0.55) | (0.35) | (0.27) | | ImageNet200 | Natural | 12.63 | 7.99 | 23.08 | 7.22 | 15.40 | 6.33 | 5.00 | 4.60 | 1.80 | 4.06 | 1.38 | | | | (0.59) | (0.47) | (0.31) | (0.22) | (0.42) | (0.24) | (0.36) | (0.63) | (0.17) | (0.69) | (0.29) | | | Synthetic | 20.17 | 11.74 | 33.69 | 9.51 | 25.49 | 8.61 | 4.19 | 5.37 | 2.78 | 4.53 | 3.58 | | | | (0.74) | (0.80) | (0.73) | (0.51) | (0.66) | (0.50) | (0.14) | (0.88) | (0.23) | (0.79) | (0.33) | | ImageNet | Natural | 8.09 | 6.42 | 21.66 | 5.91 | 8.53 | 5.21 | 5.90 | 3.93 | 1.89 | 2.45 | 0.73 | | | | (0.25) | (0.28) | (0.38) | (0.22) | (0.26) | (0.25) | (0.44) | (0.26) | (0.21) | (0.16) | (0.10) | | | Synthetic | 13.93 | 9.90 | 28.05 | 7.56 | 13.82 | 6.19 | 6.70 | 3.33 | 2.55 | 2.12 | 5.06 | | | | (0.14) | (0.23) | (0.39) | (0.13) | (0.31) | (0.07) | (0.52) | (0.25) | (0.25) | (0.31) | (0.27) | | FMoW-WILDS | Natural | 5.15 | 3.55 | 34.64 | 5.03 | 5.58 | 3.46 | 5.08 | 2.59 | 2.33 | 2.52 | 2.22 | | | | (0.19) | (0.41) | (0.22) | (0.29) | (0.17) | (0.37) | (0.46) | (0.32) | (0.28) | (0.25) | (0.30) | | RxRx1-WILDS | Natural | 6.17 | 6.11 | 21.05 | 5.21 | 6.54 | 6.27 | 6.82 | 5.30 | 5.20 | 5.19 | 5.63 | | | | (0.20) | (0.24) | (0.31) | (0.18) | (0.21) | (0.20) | (0.31) | (0.30) | (0.44) | (0.43) | (0.55) | | Entity-13 | Same | 18.32 | 14.38 | 27.79 | 13.56 | 20.50 | 13.22 | 16.09 | 9.35 | 7.50 | 7.80 | 6.94 | | | | (0.29) | (0.53) | (1.18) | (0.58) | (0.47) | (0.58) | (0.84) | (0.79) | (0.65) | (0.62) | (0.71) | | | Novel | 28.82 | 24.03 | 38.97 | 22.96 | 31.66 | 22.61 | 25.26 | 17.11 | 13.96 | 14.75 | 9.94 | | | | (0.30) | (0.55) | (1.32) | (0.59) | (0.54) | (0.58) | (1.08) | (0.93) | (0.64) | (0.78) | | | Entity-30 | Same | 16.91 | 14.61 | 26.84 | 14.37 | 18.60 | 13.11 | 13.74 | 8.54 | 7.94 | 7.77 | 8.04 | | | | (1.33) | (1.11) | (2.15) | (1.34) | (1.69) | (1.30) | (1.07) | (1.47) | (1.38) | (1.44) | (1.51) | | | Novel | 28.66 | 25.83 | 39.21 | 25.03 | 30.95 | 23.73 | 23.15 | 15.57 | 13.24 | 12.44 | 11.05 | | | | (1.16) | (0.88) | (2.03) | (1.11) | (1.64) | (1.11) | (0.51) | (1.44) | (1.15) | (1.26) | (1.13) | | NonLIVING-26 | Same | 17.43 | 15.95 | 27.70 | 15.40 | 18.06 | 14.58 | 16.99 | 10.79 | 10.13 | 10.05 | 10.29 | | | | (0.90) | (0.86) | (0.90) | (0.69) | (1.00) | (0.78) | (1.25) | (0.62) | (0.32) | (0.46) | (0.79) | | | Novel | 29.51 | 27.75 | 40.02 | 26.77 | 30.36 | 25.93 | 27.70 | 19.64 | 17.75 | 16.90 | 15.69 | | | | (0.86) | (0.82) | (0.76) | (0.82) | (0.95) | (0.80) | (1.42) | (0.68) | (0.53) | (0.60) | (0.83) | | LIVING-17 | Same | 14.28 | 12.21 | 23.46 | 11.16 | 15.22 | 10.78 | 10.49 | 4.92 | 4.23 | 4.19 | 4.73 | | | | (0.96) | (0.93) | (1.16) | (0.90) | (0.96) | (0.99) | (0.97) | (0.57) | (0.42) | (0.35) | (0.24) | | | Novel | 28.91 | 26.35 | 38.62 | 24.91 | 30.32 | 24.52 | 22.49 | 15.42 | 13.02 | 12.29 | 10.34 | | | | (0.66) | (0.73) | (1.01) | (0.61) | (0.59) | (0.74) | (0.85) | (0.59) | (0.53) | (0.73) | (0.62) | Table 4: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift for ResNet model. ''Same'' refers to same subpopulation shifts and ''Novel'' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn''t alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\cdot)$ ) denote standard deviation values. ' images: [] dimensions: dpi: 200 height: 2200 width: 1700 model: mistral-ocr-2503-completion usage_info: pages_processed: 29 doc_size_bytes: null '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/classifications: post: operationId: classifications_v1_classifications_post summary: Classifications tags: - classifiers requestBody: content: application/json: schema: $ref: '#/components/schemas/ClassificationRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ClassificationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/chat/classifications: post: operationId: chat_classifications_v1_chat_classifications_post summary: Chat Classifications tags: - classifiers requestBody: content: application/json: schema: $ref: '#/components/schemas/ChatClassificationRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ClassificationResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/audio/transcriptions: post: operationId: audio_api_v1_transcriptions_post summary: Create Transcription tags: - audio.transcriptions requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/AudioTranscriptionRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TranscriptionResponse' examples: userExample: value: model: voxtral-mini-2507 text: 'This week, I traveled to Chicago to deliver my final farewell address to the nation, following in the tradition of presidents before me. It was an opportunity to say thank you. Whether we''ve seen eye to eye or rarely agreed at all, my conversations with you, the American people, in living rooms, in schools, at farms and on factory floors, at diners and on distant military outposts, All these conversations are what have kept me honest, kept me inspired, and kept me going. Every day, I learned from you. You made me a better President, and you made me a better man. Over the course of these eight years, I''ve seen the goodness, the resilience, and the hope of the American people. I''ve seen neighbors looking out for each other as we rescued our economy from the worst crisis of our lifetimes. I''ve hugged cancer survivors who finally know the security of affordable health care. I''ve seen communities like Joplin rebuild from disaster, and cities like Boston show the world that no terrorist will ever break the American spirit. I''ve seen the hopeful faces of young graduates and our newest military officers. I''ve mourned with grieving families searching for answers. And I found grace in a Charleston church. I''ve seen our scientists help a paralyzed man regain his sense of touch, and our wounded warriors walk again. I''ve seen our doctors and volunteers rebuild after earthquakes and stop pandemics in their tracks. I''ve learned from students who are building robots and curing diseases, and who will change the world in ways we can''t even imagine. I''ve seen the youngest of children remind us of our obligations to care for our refugees, to work in peace, and above all, to look out for each other. That''s what''s possible when we come together in the slow, hard, sometimes frustrating, but always vital work of self-government. But we can''t take our democracy for granted. All of us, regardless of party, should throw ourselves into the work of citizenship. Not just when there is an election. Not just when our own narrow interest is at stake. But over the full span of a lifetime. If you''re tired of arguing with strangers on the Internet, try to talk with one in real life. If something needs fixing, lace up your shoes and do some organizing. If you''re disappointed by your elected officials, then grab a clipboard, get some signatures, and run for office yourself. Our success depends on our participation, regardless of which way the pendulum of power swings. It falls on each of us to be guardians of our democracy, to embrace the joyous task we''ve been given to continually try to improve this great nation of ours. Because for all our outward differences, we all share the same proud title – citizen. It has been the honor of my life to serve you as President. Eight years later, I am even more optimistic about our country''s promise. And I look forward to working along your side as a citizen for all my days that remain. Thanks, everybody. God bless you. And God bless the United States of America. ' language: en segments: [] usage: prompt_audio_seconds: 203 prompt_tokens: 4 total_tokens: 3264 completion_tokens: 635 /v1/audio/transcriptions#stream: post: operationId: audio_api_v1_transcriptions_post_stream summary: Create Streaming Transcription (SSE) tags: - audio.transcriptions requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/AudioTranscriptionRequestStream' required: true responses: '200': description: Stream of transcription events content: text/event-stream: schema: $ref: '#/components/schemas/TranscriptionStreamEvents' /v1/audio/speech: post: summary: Speech description: Generate speech from text using a saved voice or a reference audio clip. operationId: speech_v1_audio_speech_post requestBody: content: application/json: schema: $ref: '#/components/schemas/SpeechRequest' required: true responses: '200': description: Speech audio data. content: application/json: schema: $ref: '#/components/schemas/SpeechResponse' text/event-stream: schema: $ref: '#/components/schemas/SpeechStreamEvents' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - audio.speech /v1/audio/voices: get: operationId: list_voices_v1_audio_voices_get summary: List all voices description: List all voices (excluding sample data) tags: - audio.voices parameters: - name: limit in: query description: Maximum number of voices to return required: false schema: type: integer title: Limit description: Maximum number of voices to return default: 10 - name: offset in: query description: Offset for pagination required: false schema: type: integer title: Offset description: Offset for pagination default: 0 responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VoiceListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: operationId: create_voice_v1_audio_voices_post summary: Create a new voice description: Create a new voice with a base64-encoded audio sample tags: - audio.voices requestBody: content: application/json: schema: $ref: '#/components/schemas/VoiceCreateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VoiceResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/audio/voices/{voice_id}: get: operationId: get_voice_v1_audio_voices__voice_id__get summary: Get voice details description: Get voice details (excluding sample) tags: - audio.voices parameters: - name: voice_id in: path required: true schema: type: string title: Voice Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VoiceResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: operationId: update_voice_v1_audio_voices__voice_id__patch summary: Update voice metadata description: Update voice metadata (name, gender, languages, age, tags). tags: - audio.voices parameters: - name: voice_id in: path required: true schema: type: string title: Voice Id format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/VoiceUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VoiceResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: operationId: delete_voice_v1_audio_voices__voice_id__delete summary: Delete a custom voice description: Delete a custom voice tags: - audio.voices parameters: - name: voice_id in: path required: true schema: type: string title: Voice Id format: uuid responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VoiceResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/audio/voices/{voice_id}/sample: get: operationId: get_voice_sample_audio_v1_audio_voices__voice_id__sample_get summary: Get voice sample audio description: Get the audio sample for a voice tags: - audio.voices parameters: - name: voice_id in: path required: true schema: type: string title: Voice Id responses: '200': description: Successful Response content: application/json: schema: type: string title: Response Get Voice Sample Audio V1 Audio Voices Voice Id Sample Get audio/wav: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/libraries: get: operationId: libraries_list_v1 summary: List all libraries you have access to. description: List all libraries that you have created or have been shared with you. tags: - beta.libraries responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ListLibraryOut' post: operationId: libraries_create_v1 summary: Create a new Library. description: Create a new Library, you will be marked as the owner and only you will have the possibility to share it with others. When first created this will only be accessible by you. tags: - beta.libraries requestBody: content: application/json: schema: $ref: '#/components/schemas/LibraryIn' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LibraryOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/libraries/{library_id}: get: operationId: libraries_get_v1 summary: Detailed information about a specific Library. description: Given a library id, details information about that Library. tags: - beta.libraries parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LibraryOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: operationId: libraries_delete_v1 summary: Delete a library and all of it's document. description: Given a library id, deletes it together with all documents that have been uploaded to that library. tags: - beta.libraries parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LibraryOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: operationId: libraries_update_v1 summary: Update a library. description: Given a library id, you can update the name and description. tags: - beta.libraries parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/LibraryInUpdate' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LibraryOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/libraries/{library_id}/documents: get: operationId: libraries_documents_list_v1 summary: List documents in a given library. description: Given a library, lists the document that have been uploaded to that library. tags: - beta.libraries.documents parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid - name: search in: query required: false schema: anyOf: - type: string - type: 'null' title: Search - name: page_size in: query required: false schema: type: integer title: Page Size maximum: 100 minimum: 1 default: 100 - name: page in: query required: false schema: type: integer title: Page minimum: 0 default: 0 - name: filters_attributes in: query required: false schema: anyOf: - type: string - type: 'null' title: Filters Attributes - name: sort_by in: query required: false schema: type: string title: Sort By default: created_at - name: sort_order in: query required: false schema: type: string title: Sort Order default: desc responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ListDocumentOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: operationId: libraries_documents_upload_v1 summary: Upload a new document. description: Given a library, upload a new document to that library. It is queued for processing, it status will change it has been processed. The processing has to be completed in order be discoverable for the library search tags: - beta.libraries.documents parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid requestBody: content: multipart/form-data: schema: type: object properties: file: $ref: '#/components/schemas/File' title: DocumentUpload required: - file required: true responses: '201': description: Upload successful, returns the created document information's. content: application/json: schema: $ref: '#/components/schemas/DocumentOut' '200': description: A document with the same hash was found in this library. Returns the existing document. content: application/json: schema: $ref: '#/components/schemas/DocumentOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/libraries/{library_id}/documents/{document_id}: get: operationId: libraries_documents_get_v1 summary: Retrieve the metadata of a specific document. description: Given a library and a document in this library, you can retrieve the metadata of that document. tags: - beta.libraries.documents parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid - name: document_id in: path required: true schema: type: string title: Document Id format: uuid responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DocumentOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: operationId: libraries_documents_update_v1 summary: Update the metadata of a specific document. description: Given a library and a document in that library, update the name of that document. tags: - beta.libraries.documents parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid - name: document_id in: path required: true schema: type: string title: Document Id format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/DocumentUpdateIn' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DocumentOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: operationId: libraries_documents_delete_v1 summary: Delete a document. description: Given a library and a document in that library, delete that document. The document will be deleted from the library and the search index. tags: - beta.libraries.documents parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid - name: document_id in: path required: true schema: type: string title: Document Id format: uuid responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/libraries/{library_id}/documents/{document_id}/text_content: get: operationId: libraries_documents_get_text_content_v1 summary: Retrieve the text content of a specific document. description: Given a library and a document in that library, you can retrieve the text content of that document if it exists. For documents like pdf, docx and pptx the text content results from our processing using Mistral OCR. tags: - beta.libraries.documents parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid - name: document_id in: path required: true schema: type: string title: Document Id format: uuid responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DocumentTextContent' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/libraries/{library_id}/documents/{document_id}/status: get: operationId: libraries_documents_get_status_v1 summary: Retrieve the processing status of a specific document. description: Given a library and a document in that library, retrieve the processing status of that document. tags: - beta.libraries.documents parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid - name: document_id in: path required: true schema: type: string title: Document Id format: uuid responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ProcessingStatusOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/libraries/{library_id}/documents/{document_id}/signed-url: get: operationId: libraries_documents_get_signed_url_v1 summary: Retrieve the signed URL of a specific document. description: Given a library and a document in that library, retrieve the signed URL of a specific document.The url will expire after 30 minutes and can be accessed by anyone with the link. tags: - beta.libraries.documents parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid - name: document_id in: path required: true schema: type: string title: Document Id format: uuid responses: '200': description: Successful Response content: application/json: schema: type: string title: Response Libraries Documents Get Signed Url V1 '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/libraries/{library_id}/documents/{document_id}/extracted-text-signed-url: get: operationId: libraries_documents_get_extracted_text_signed_url_v1 summary: Retrieve the signed URL of text extracted from a given document. description: Given a library and a document in that library, retrieve the signed URL of text extracted. For documents that are sent to the OCR this returns the result of the OCR queries. tags: - beta.libraries.documents parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid - name: document_id in: path required: true schema: type: string title: Document Id format: uuid responses: '200': description: Successful Response content: application/json: schema: type: string title: Response Libraries Documents Get Extracted Text Signed Url V1 '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/libraries/{library_id}/documents/{document_id}/reprocess: post: operationId: libraries_documents_reprocess_v1 summary: Reprocess a document. description: Given a library and a document in that library, reprocess that document, it will be billed again. tags: - beta.libraries.documents parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid - name: document_id in: path required: true schema: type: string title: Document Id format: uuid responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/libraries/{library_id}/share: get: operationId: libraries_share_list_v1 summary: List all of the access to this library. description: Given a library, list all of the Entity that have access and to what level. tags: - beta.libraries.accesses parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ListSharingOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: operationId: libraries_share_create_v1 summary: Create or update an access level. description: Given a library id, you can create or update the access level of an entity. You have to be owner of the library to share a library. An owner cannot change their own role. A library cannot be shared outside of the organization. tags: - beta.libraries.accesses parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/SharingIn' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SharingOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: operationId: libraries_share_delete_v1 summary: Delete an access level. description: Given a library id, you can delete the access level of an entity. An owner cannot delete it's own access. You have to be the owner of the library to delete an acces other than yours. tags: - beta.libraries.accesses parameters: - name: library_id in: path required: true schema: type: string title: Library Id format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/SharingDelete' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SharingOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: BaseModelCard: properties: id: type: string title: Id object: type: string title: Object default: model created: type: integer title: Created owned_by: type: string title: Owned By default: mistralai capabilities: $ref: '#/components/schemas/ModelCapabilities' name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description max_context_length: type: integer title: Max Context Length default: 32768 aliases: items: type: string type: array title: Aliases default: [] deprecation: anyOf: - type: string format: date-time - type: 'null' title: Deprecation deprecation_replacement_model: anyOf: - type: string - type: 'null' title: Deprecation Replacement Model default_model_temperature: anyOf: - type: number - type: 'null' title: Default Model Temperature type: type: string const: base title: Type default: base type: object required: - id - capabilities title: BaseModelCard DeleteModelOut: properties: id: type: string title: Id description: The ID of the deleted model. examples: - ft:open-mistral-7b:587a6b29:20240514:7e773925 object: type: string title: Object default: model description: The object type that was deleted deleted: type: boolean title: Deleted default: true description: The deletion status examples: - true type: object required: - id title: DeleteModelOut FTModelCard: properties: id: type: string title: Id object: type: string title: Object default: model created: type: integer title: Created owned_by: type: string title: Owned By default: mistralai capabilities: $ref: '#/components/schemas/ModelCapabilities' name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description max_context_length: type: integer title: Max Context Length default: 32768 aliases: items: type: string type: array title: Aliases default: [] deprecation: anyOf: - type: string format: date-time - type: 'null' title: Deprecation deprecation_replacement_model: anyOf: - type: string - type: 'null' title: Deprecation Replacement Model default_model_temperature: anyOf: - type: number - type: 'null' title: Default Model Temperature type: type: string const: fine-tuned title: Type default: fine-tuned job: type: string title: Job root: type: string title: Root archived: type: boolean title: Archived default: false type: object required: - id - capabilities - job - root title: FTModelCard description: Extra fields for fine-tuned models. HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ModelCapabilities: properties: completion_chat: type: boolean title: Completion Chat default: false function_calling: type: boolean title: Function Calling default: false completion_fim: type: boolean title: Completion Fim default: false fine_tuning: type: boolean title: Fine Tuning default: false vision: type: boolean title: Vision default: false ocr: type: boolean title: Ocr default: false classification: type: boolean title: Classification default: false moderation: type: boolean title: Moderation default: false audio: type: boolean title: Audio default: false audio_transcription: type: boolean title: Audio Transcription default: false type: object title: ModelCapabilities ModelList: properties: object: type: string title: Object default: list data: items: oneOf: - $ref: '#/components/schemas/BaseModelCard' - $ref: '#/components/schemas/FTModelCard' discriminator: propertyName: type mapping: base: '#/components/schemas/BaseModelCard' fine-tuned: '#/components/schemas/FTModelCard' type: array title: Data type: object title: ModelList ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError APIKeyAuth: type: object properties: type: type: string title: Type enum: - api-key default: api-key value: type: string title: Value title: APIKeyAuth required: - value additionalProperties: false Agent: type: object properties: instructions: anyOf: - type: string - type: 'null' title: Instructions description: Instruction prompt the model will follow during the conversation. tools: type: array items: oneOf: - $ref: '#/components/schemas/FunctionTool' - $ref: '#/components/schemas/WebSearchTool' - $ref: '#/components/schemas/WebSearchPremiumTool' - $ref: '#/components/schemas/CodeInterpreterTool' - $ref: '#/components/schemas/ImageGenerationTool' - $ref: '#/components/schemas/DocumentLibraryTool' - $ref: '#/components/schemas/CustomConnector' discriminator: propertyName: type mapping: code_interpreter: '#/components/schemas/CodeInterpreterTool' connector: '#/components/schemas/CustomConnector' document_library: '#/components/schemas/DocumentLibraryTool' function: '#/components/schemas/FunctionTool' image_generation: '#/components/schemas/ImageGenerationTool' web_search: '#/components/schemas/WebSearchTool' web_search_premium: '#/components/schemas/WebSearchPremiumTool' title: Tools description: List of tools which are available to the model during the conversation. completion_args: $ref: '#/components/schemas/CompletionArgs' description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request. guardrails: anyOf: - type: array items: $ref: '#/components/schemas/GuardrailConfig' - type: 'null' title: Guardrails model: type: string title: Model name: type: string title: Name description: anyOf: - type: string - type: 'null' title: Description handoffs: anyOf: - type: array items: type: string minItems: 1 - type: 'null' title: Handoffs metadata: anyOf: - $ref: '#/components/schemas/MetadataDict' - type: 'null' object: type: string title: Object default: agent const: agent id: type: string title: Id version: type: integer title: Version versions: type: array items: type: integer title: Versions created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time deployment_chat: type: boolean title: Deployment Chat source: type: string title: Source version_message: anyOf: - type: string - type: 'null' title: Version Message title: Agent required: - model - name - id - version - versions - created_at - updated_at - deployment_chat - source additionalProperties: false AgentAliasResponse: type: object properties: alias: type: string title: Alias version: type: integer title: Version created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time title: AgentAliasResponse required: - alias - version - created_at - updated_at additionalProperties: false AgentConversation: type: object properties: name: anyOf: - type: string - type: 'null' title: Name description: Name given to the conversation. description: anyOf: - type: string - type: 'null' title: Description description: Description of the what the conversation is about. metadata: anyOf: - $ref: '#/components/schemas/MetadataDict' - type: 'null' description: Custom metadata for the conversation. object: type: string title: Object default: conversation const: conversation id: type: string title: Id created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time agent_id: type: string title: Agent Id agent_version: anyOf: - type: string - type: integer - type: 'null' title: Agent Version title: AgentConversation required: - id - created_at - updated_at - agent_id additionalProperties: false AgentCreationRequest: type: object properties: instructions: anyOf: - type: string - type: 'null' title: Instructions description: Instruction prompt the model will follow during the conversation. tools: type: array items: oneOf: - $ref: '#/components/schemas/FunctionTool' - $ref: '#/components/schemas/WebSearchTool' - $ref: '#/components/schemas/WebSearchPremiumTool' - $ref: '#/components/schemas/CodeInterpreterTool' - $ref: '#/components/schemas/ImageGenerationTool' - $ref: '#/components/schemas/DocumentLibraryTool' - $ref: '#/components/schemas/CustomConnector' discriminator: propertyName: type mapping: code_interpreter: '#/components/schemas/CodeInterpreterTool' connector: '#/components/schemas/CustomConnector' document_library: '#/components/schemas/DocumentLibraryTool' function: '#/components/schemas/FunctionTool' image_generation: '#/components/schemas/ImageGenerationTool' web_search: '#/components/schemas/WebSearchTool' web_search_premium: '#/components/schemas/WebSearchPremiumTool' title: Tools description: List of tools which are available to the model during the conversation. completion_args: $ref: '#/components/schemas/CompletionArgs' description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request. guardrails: anyOf: - type: array items: $ref: '#/components/schemas/GuardrailConfig' - type: 'null' title: Guardrails model: type: string title: Model name: type: string title: Name description: anyOf: - type: string - type: 'null' title: Description handoffs: anyOf: - type: array items: type: string minItems: 1 - type: 'null' title: Handoffs metadata: anyOf: - $ref: '#/components/schemas/MetadataDict' - type: 'null' version_message: anyOf: - type: string maxLength: 500 - type: 'null' title: Version Message title: AgentCreationRequest required: - model - name additionalProperties: false AgentHandoffEntry: type: object properties: object: type: string title: Object default: entry const: entry type: type: string title: Type default: agent.handoff const: agent.handoff created_at: type: string title: Created At format: date-time completed_at: anyOf: - type: string format: date-time - type: 'null' title: Completed At id: type: string title: Id previous_agent_id: type: string title: Previous Agent Id previous_agent_name: type: string title: Previous Agent Name next_agent_id: type: string title: Next Agent Id next_agent_name: type: string title: Next Agent Name title: AgentHandoffEntry required: - previous_agent_id - previous_agent_name - next_agent_id - next_agent_name additionalProperties: false AgentUpdateRequest: type: object properties: instructions: anyOf: - type: string - type: 'null' title: Instructions description: Instruction prompt the model will follow during the conversation. tools: type: array items: oneOf: - $ref: '#/components/schemas/FunctionTool' - $ref: '#/components/schemas/WebSearchTool' - $ref: '#/components/schemas/WebSearchPremiumTool' - $ref: '#/components/schemas/CodeInterpreterTool' - $ref: '#/components/schemas/ImageGenerationTool' - $ref: '#/components/schemas/DocumentLibraryTool' - $ref: '#/components/schemas/CustomConnector' discriminator: propertyName: type mapping: code_interpreter: '#/components/schemas/CodeInterpreterTool' connector: '#/components/schemas/CustomConnector' document_library: '#/components/schemas/DocumentLibraryTool' function: '#/components/schemas/FunctionTool' image_generation: '#/components/schemas/ImageGenerationTool' web_search: '#/components/schemas/WebSearchTool' web_search_premium: '#/components/schemas/WebSearchPremiumTool' title: Tools description: List of tools which are available to the model during the conversation. completion_args: $ref: '#/components/schemas/CompletionArgs' description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request. guardrails: anyOf: - type: array items: $ref: '#/components/schemas/GuardrailConfig' - type: 'null' title: Guardrails model: anyOf: - type: string - type: 'null' title: Model name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description handoffs: anyOf: - type: array items: type: string minItems: 1 - type: 'null' title: Handoffs deployment_chat: anyOf: - type: boolean - type: 'null' title: Deployment Chat metadata: anyOf: - $ref: '#/components/schemas/MetadataDict' - type: 'null' version_message: anyOf: - type: string maxLength: 500 - type: 'null' title: Version Message title: AgentUpdateRequest additionalProperties: false BuiltInConnectors: type: string title: BuiltInConnectors enum: - web_search - web_search_premium - code_interpreter - image_generation - document_library CodeInterpreterTool: type: object properties: tool_configuration: anyOf: - $ref: '#/components/schemas/ToolConfiguration' - type: 'null' type: type: string title: Type enum: - code_interpreter default: code_interpreter title: CodeInterpreterTool additionalProperties: false CompletionArgs: type: object properties: stop: $ref: '#/components/schemas/CompletionArgsStop' presence_penalty: anyOf: - type: number maximum: 2 minimum: -2 - type: 'null' title: Presence Penalty frequency_penalty: anyOf: - type: number maximum: 2 minimum: -2 - type: 'null' title: Frequency Penalty temperature: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Temperature top_p: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Top P max_tokens: anyOf: - type: integer minimum: 0 - type: 'null' title: Max Tokens random_seed: anyOf: - type: integer minimum: 0 - type: 'null' title: Random Seed prediction: anyOf: - $ref: '#/components/schemas/Prediction' - type: 'null' response_format: anyOf: - $ref: '#/components/schemas/ResponseFormat' - type: 'null' tool_choice: $ref: '#/components/schemas/ToolChoiceEnum' default: auto reasoning_effort: anyOf: - type: string enum: - high - none - type: 'null' description: Controls the reasoning effort level for reasoning models. "high" enables comprehensive reasoning traces, "none" disables reasoning effort. title: CompletionArgs additionalProperties: false description: White-listed arguments from the completion API ConversationAppendRequest: allOf: - $ref: '#/components/schemas/ConversationAppendRequestBase' - type: object properties: stream: type: boolean enum: - false default: false ConversationHistory: type: object properties: object: type: string title: Object default: conversation.history const: conversation.history conversation_id: type: string title: Conversation Id entries: type: array items: anyOf: - $ref: '#/components/schemas/MessageInputEntry' - $ref: '#/components/schemas/MessageOutputEntry' - $ref: '#/components/schemas/FunctionResultEntry' - $ref: '#/components/schemas/FunctionCallEntry' - $ref: '#/components/schemas/ToolExecutionEntry' - $ref: '#/components/schemas/AgentHandoffEntry' title: Entries title: ConversationHistory required: - conversation_id - entries additionalProperties: false description: Retrieve all entries in a conversation. ConversationMessages: type: object properties: object: type: string title: Object default: conversation.messages const: conversation.messages conversation_id: type: string title: Conversation Id messages: $ref: '#/components/schemas/MessageEntries' title: ConversationMessages required: - conversation_id - messages additionalProperties: false description: Similar to the conversation history but only keep the messages ConversationRestartRequest: allOf: - $ref: '#/components/schemas/ConversationRestartRequestBase' - type: object properties: stream: type: boolean enum: - false default: false CustomConnector: type: object properties: type: type: string title: Type enum: - connector default: connector connector_id: type: string title: Connector Id authorization: anyOf: - oneOf: - $ref: '#/components/schemas/OAuth2TokenAuth' - $ref: '#/components/schemas/APIKeyAuth' discriminator: propertyName: type mapping: api-key: '#/components/schemas/APIKeyAuth' oauth2-token: '#/components/schemas/OAuth2TokenAuth' - type: 'null' title: Authorization tool_configuration: anyOf: - $ref: '#/components/schemas/ToolConfiguration' - type: 'null' title: CustomConnector required: - connector_id additionalProperties: false DocumentLibraryTool: type: object properties: tool_configuration: anyOf: - $ref: '#/components/schemas/ToolConfiguration' - type: 'null' type: type: string title: Type enum: - document_library default: document_library library_ids: type: array items: type: string title: Library Ids minItems: 1 description: Ids of the library in which to search. title: DocumentLibraryTool required: - library_ids additionalProperties: false DocumentURLChunk: type: object properties: type: type: string title: Type default: document_url const: document_url document_url: type: string title: Document Url document_name: anyOf: - type: string - type: 'null' title: Document Name description: The filename of the document title: DocumentURLChunk required: - document_url additionalProperties: false Function: type: object properties: name: type: string title: Name description: type: string title: Description default: '' strict: type: boolean title: Strict default: false parameters: type: object title: Parameters additionalProperties: true title: Function required: - name - parameters additionalProperties: false FunctionCallEntry: type: object properties: object: type: string title: Object default: entry const: entry type: type: string title: Type default: function.call const: function.call created_at: type: string title: Created At format: date-time completed_at: anyOf: - type: string format: date-time - type: 'null' title: Completed At agent_id: anyOf: - type: string - type: 'null' title: Agent Id model: anyOf: - type: string - type: 'null' title: Model id: type: string title: Id tool_call_id: type: string title: Tool Call Id name: type: string title: Name arguments: $ref: '#/components/schemas/FunctionCallEntryArguments' confirmation_status: anyOf: - type: string enum: - pending - allowed - denied - type: 'null' title: Confirmation Status title: FunctionCallEntry required: - tool_call_id - name - arguments additionalProperties: false FunctionResultEntry: type: object properties: object: type: string title: Object default: entry const: entry type: type: string title: Type default: function.result const: function.result created_at: type: string title: Created At format: date-time completed_at: anyOf: - type: string format: date-time - type: 'null' title: Completed At id: type: string title: Id tool_call_id: type: string title: Tool Call Id result: type: string title: Result title: FunctionResultEntry required: - tool_call_id - result additionalProperties: false FunctionTool: type: object properties: type: type: string title: Type enum: - function default: function function: $ref: '#/components/schemas/Function' title: FunctionTool required: - function additionalProperties: false GuardrailConfig: type: object properties: block_on_error: type: boolean title: Block On Error description: If true, return HTTP 403 and block request in the event of a server-side error default: false moderation_llm_v1: anyOf: - $ref: '#/components/schemas/ModerationLLMV1Config' - type: 'null' moderation_llm_v2: anyOf: - $ref: '#/components/schemas/ModerationLLMV2Config' - type: 'null' title: GuardrailConfig ImageDetail: type: string title: ImageDetail enum: - low - auto - high ImageGenerationTool: type: object properties: tool_configuration: anyOf: - $ref: '#/components/schemas/ToolConfiguration' - type: 'null' type: type: string title: Type enum: - image_generation default: image_generation title: ImageGenerationTool additionalProperties: false ImageURL: type: object properties: url: type: string title: Url detail: anyOf: - $ref: '#/components/schemas/ImageDetail' - type: 'null' title: ImageURL required: - url additionalProperties: false ImageURLChunk: type: object properties: type: type: string title: Type default: image_url const: image_url image_url: anyOf: - $ref: '#/components/schemas/ImageURL' - type: string title: Image Url title: ImageURLChunk required: - image_url additionalProperties: false description: '{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0' JsonSchema: type: object properties: name: type: string title: Name description: anyOf: - type: string - type: 'null' title: Description schema: type: object title: Schema additionalProperties: true x-speakeasy-name-override: schema_definition strict: type: boolean title: Strict default: false title: JsonSchema required: - name - schema additionalProperties: false MessageInputEntry: type: object properties: object: type: string title: Object default: entry const: entry type: type: string title: Type default: message.input const: message.input created_at: type: string title: Created At format: date-time completed_at: anyOf: - type: string format: date-time - type: 'null' title: Completed At id: type: string title: Id role: type: string title: Role enum: - assistant - user content: anyOf: - type: string - $ref: '#/components/schemas/MessageInputContentChunks' title: Content prefix: type: boolean title: Prefix default: false title: MessageInputEntry required: - role - content additionalProperties: false description: Representation of an input message inside the conversation. MessageOutputEntry: type: object properties: object: type: string title: Object default: entry const: entry type: type: string title: Type default: message.output const: message.output created_at: type: string title: Created At format: date-time completed_at: anyOf: - type: string format: date-time - type: 'null' title: Completed At agent_id: anyOf: - type: string - type: 'null' title: Agent Id model: anyOf: - type: string - type: 'null' title: Model id: type: string title: Id role: type: string title: Role default: assistant const: assistant content: anyOf: - type: string - $ref: '#/components/schemas/MessageOutputContentChunks' title: Content title: MessageOutputEntry required: - content additionalProperties: false MetadataDict: type: object title: MetadataDict additionalProperties: true description: Custom type for metadata with embedded validation. ModelConversation: type: object properties: instructions: anyOf: - type: string - type: 'null' title: Instructions description: Instruction prompt the model will follow during the conversation. tools: type: array items: oneOf: - $ref: '#/components/schemas/FunctionTool' - $ref: '#/components/schemas/WebSearchTool' - $ref: '#/components/schemas/WebSearchPremiumTool' - $ref: '#/components/schemas/CodeInterpreterTool' - $ref: '#/components/schemas/ImageGenerationTool' - $ref: '#/components/schemas/DocumentLibraryTool' - $ref: '#/components/schemas/CustomConnector' discriminator: propertyName: type mapping: code_interpreter: '#/components/schemas/CodeInterpreterTool' connector: '#/components/schemas/CustomConnector' document_library: '#/components/schemas/DocumentLibraryTool' function: '#/components/schemas/FunctionTool' image_generation: '#/components/schemas/ImageGenerationTool' web_search: '#/components/schemas/WebSearchTool' web_search_premium: '#/components/schemas/WebSearchPremiumTool' title: Tools description: List of tools which are available to the model during the conversation. completion_args: $ref: '#/components/schemas/CompletionArgs' description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request. guardrails: anyOf: - type: array items: $ref: '#/components/schemas/GuardrailConfig' - type: 'null' title: Guardrails name: anyOf: - type: string - type: 'null' title: Name description: Name given to the conversation. description: anyOf: - type: string - type: 'null' title: Description description: Description of the what the conversation is about. metadata: anyOf: - $ref: '#/components/schemas/MetadataDict' - type: 'null' description: Custom metadata for the conversation. object: type: string title: Object default: conversation const: conversation id: type: string title: Id created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time model: type: string title: Model title: ModelConversation required: - id - created_at - updated_at - model additionalProperties: false ModerationLLMAction: type: string title: ModerationLLMAction enum: - none - block ModerationLLMV1CategoryThresholds: type: object properties: sexual: anyOf: - type: number - type: 'null' title: Sexual hate_and_discrimination: anyOf: - type: number - type: 'null' title: Hate And Discrimination violence_and_threats: anyOf: - type: number - type: 'null' title: Violence And Threats dangerous_and_criminal_content: anyOf: - type: number - type: 'null' title: Dangerous And Criminal Content selfharm: anyOf: - type: number - type: 'null' title: Selfharm health: anyOf: - type: number - type: 'null' title: Health financial: anyOf: - type: number - type: 'null' title: Financial law: anyOf: - type: number - type: 'null' title: Law pii: anyOf: - type: number - type: 'null' title: Pii title: ModerationLLMV1CategoryThresholds ModerationLLMV1Config: type: object properties: model_name: type: string title: Model Name description: Override model name. Should be omitted in general. default: mistral-moderation-2411 custom_category_thresholds: anyOf: - $ref: '#/components/schemas/ModerationLLMV1CategoryThresholds' - type: 'null' ignore_other_categories: type: boolean title: Ignore Other Categories description: If true, only evaluate categories in custom_category_thresholds; others are ignored. default: false action: $ref: '#/components/schemas/ModerationLLMAction' description: Action to take if any score is above the threshold for any category. default: none title: ModerationLLMV1Config ModerationLLMV2CategoryThresholds: type: object properties: sexual: anyOf: - type: number - type: 'null' title: Sexual hate_and_discrimination: anyOf: - type: number - type: 'null' title: Hate And Discrimination violence_and_threats: anyOf: - type: number - type: 'null' title: Violence And Threats dangerous: anyOf: - type: number - type: 'null' title: Dangerous criminal: anyOf: - type: number - type: 'null' title: Criminal selfharm: anyOf: - type: number - type: 'null' title: Selfharm health: anyOf: - type: number - type: 'null' title: Health financial: anyOf: - type: number - type: 'null' title: Financial law: anyOf: - type: number - type: 'null' title: Law pii: anyOf: - type: number - type: 'null' title: Pii jailbreaking: anyOf: - type: number - type: 'null' title: Jailbreaking title: ModerationLLMV2CategoryThresholds ModerationLLMV2Config: type: object properties: model_name: type: string title: Model Name description: Override model name. Should be omitted in general. default: mistral-moderation-2603 custom_category_thresholds: anyOf: - $ref: '#/components/schemas/ModerationLLMV2CategoryThresholds' - type: 'null' ignore_other_categories: type: boolean title: Ignore Other Categories description: If true, only evaluate categories in custom_category_thresholds; others are ignored. default: false action: $ref: '#/components/schemas/ModerationLLMAction' description: Action to take if any score is above the threshold for any category. default: none title: ModerationLLMV2Config OAuth2TokenAuth: type: object properties: type: type: string title: Type enum: - oauth2-token default: oauth2-token value: type: string title: Value title: OAuth2TokenAuth required: - value additionalProperties: false Prediction: type: object properties: type: type: string title: Type default: content const: content content: type: string title: Content default: '' title: Prediction additionalProperties: false description: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. RequestSource: type: string title: RequestSource enum: - api - playground - agent_builder_v1 ResponseFormat: type: object examples: - type: text - type: json_object - type: json_schema json_schema: schema: properties: name: title: Name type: string authors: items: type: string title: Authors type: array required: - name - authors title: Book type: object additionalProperties: false name: book strict: true properties: type: $ref: '#/components/schemas/ResponseFormats' default: text json_schema: anyOf: - $ref: '#/components/schemas/JsonSchema' - type: 'null' title: ResponseFormat additionalProperties: false description: 'Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.' ResponseFormats: type: string title: ResponseFormats enum: - text - json_object - json_schema TextChunk: type: object properties: type: type: string title: Type default: text const: text text: type: string title: Text title: TextChunk required: - text additionalProperties: false ThinkChunk: type: object properties: type: type: string title: Type default: thinking const: thinking thinking: type: array items: anyOf: - $ref: '#/components/schemas/TextChunk' - $ref: '#/components/schemas/ToolReferenceChunk' - $ref: '#/components/schemas/ReferenceChunk' title: Thinking closed: type: boolean title: Closed description: Whether the thinking chunk is closed or not. Currently only used for prefixing. default: true title: ThinkChunk required: - thinking additionalProperties: false ToolCallConfirmation: type: object properties: tool_call_id: type: string title: Tool Call Id confirmation: type: string title: Confirmation enum: - allow - deny title: ToolCallConfirmation required: - tool_call_id - confirmation additionalProperties: false ToolChoiceEnum: type: string title: ToolChoiceEnum enum: - auto - none - any - required ToolConfiguration: type: object properties: exclude: anyOf: - type: array items: type: string - type: 'null' title: Exclude include: anyOf: - type: array items: type: string - type: 'null' title: Include requires_confirmation: anyOf: - type: array items: type: string - type: 'null' title: Requires Confirmation title: ToolConfiguration additionalProperties: false ToolExecutionEntry: type: object properties: object: type: string title: Object default: entry const: entry type: type: string title: Type default: tool.execution const: tool.execution created_at: type: string title: Created At format: date-time completed_at: anyOf: - type: string format: date-time - type: 'null' title: Completed At agent_id: anyOf: - type: string - type: 'null' title: Agent Id model: anyOf: - type: string - type: 'null' title: Model id: type: string title: Id name: anyOf: - $ref: '#/components/schemas/BuiltInConnectors' - type: string title: Name arguments: type: string title: Arguments info: $ref: '#/components/schemas/ToolExecutionInfo' title: ToolExecutionEntry required: - name - arguments additionalProperties: false ToolFileChunk: type: object properties: type: type: string title: Type default: tool_file const: tool_file tool: anyOf: - $ref: '#/components/schemas/BuiltInConnectors' - type: string title: Tool file_id: type: string title: File Id file_name: anyOf: - type: string - type: 'null' title: File Name file_type: anyOf: - type: string - type: 'null' title: File Type title: ToolFileChunk required: - tool - file_id additionalProperties: false ToolReferenceChunk: type: object properties: type: type: string title: Type default: tool_reference const: tool_reference tool: anyOf: - $ref: '#/components/schemas/BuiltInConnectors' - type: string title: Tool title: type: string title: Title url: anyOf: - type: string - type: 'null' title: Url favicon: anyOf: - type: string - type: 'null' title: Favicon description: anyOf: - type: string - type: 'null' title: Description title: ToolReferenceChunk required: - tool - title additionalProperties: false WebSearchPremiumTool: type: object properties: tool_configuration: anyOf: - $ref: '#/components/schemas/ToolConfiguration' - type: 'null' type: type: string title: Type enum: - web_search_premium default: web_search_premium title: WebSearchPremiumTool additionalProperties: false WebSearchTool: type: object properties: tool_configuration: anyOf: - $ref: '#/components/schemas/ToolConfiguration' - type: 'null' type: type: string title: Type enum: - web_search default: web_search title: WebSearchTool additionalProperties: false ConversationUsageInfo: type: object properties: prompt_tokens: type: integer title: Prompt Tokens default: 0 completion_tokens: type: integer title: Completion Tokens default: 0 total_tokens: type: integer title: Total Tokens default: 0 connector_tokens: anyOf: - type: integer - type: 'null' title: Connector Tokens default: null connectors: anyOf: - type: object additionalProperties: type: integer - type: 'null' title: Connectors default: null title: ConversationUsageInfo additionalProperties: false ConversationResponse: type: object properties: object: type: string title: Object default: conversation.response const: conversation.response conversation_id: type: string title: Conversation Id outputs: type: array items: anyOf: - $ref: '#/components/schemas/MessageOutputEntry' - $ref: '#/components/schemas/ToolExecutionEntry' - $ref: '#/components/schemas/FunctionCallEntry' - $ref: '#/components/schemas/AgentHandoffEntry' title: Outputs usage: $ref: '#/components/schemas/ConversationUsageInfo' guardrails: anyOf: - type: array items: type: object - type: 'null' title: Guardrails default: null title: ConversationResponse required: - conversation_id - outputs - usage additionalProperties: false description: The response after appending new entries to the conversation. ConversationRequest: allOf: - $ref: '#/components/schemas/ConversationRequestBase' - type: object properties: stream: type: boolean enum: - false default: false AgentHandoffDoneEvent: type: object properties: type: type: string title: Type default: agent.handoff.done const: agent.handoff.done created_at: type: string title: Created At format: date-time output_index: type: integer title: Output Index default: 0 id: type: string title: Id next_agent_id: type: string title: Next Agent Id next_agent_name: type: string title: Next Agent Name title: AgentHandoffDoneEvent required: - id - next_agent_id - next_agent_name additionalProperties: false AgentHandoffStartedEvent: type: object properties: type: type: string title: Type default: agent.handoff.started const: agent.handoff.started created_at: type: string title: Created At format: date-time output_index: type: integer title: Output Index default: 0 id: type: string title: Id previous_agent_id: type: string title: Previous Agent Id previous_agent_name: type: string title: Previous Agent Name title: AgentHandoffStartedEvent required: - id - previous_agent_id - previous_agent_name additionalProperties: false FunctionCallEvent: type: object properties: type: type: string title: Type default: function.call.delta const: function.call.delta created_at: type: string title: Created At format: date-time output_index: type: integer title: Output Index default: 0 id: type: string title: Id model: anyOf: - type: string - type: 'null' title: Model default: null agent_id: anyOf: - type: string - type: 'null' title: Agent Id default: null name: type: string title: Name tool_call_id: type: string title: Tool Call Id arguments: type: string title: Arguments confirmation_status: anyOf: - type: string enum: - pending - allowed - denied - type: 'null' title: Confirmation Status default: null title: FunctionCallEvent required: - id - name - tool_call_id - arguments additionalProperties: false MessageOutputEvent: type: object properties: type: type: string title: Type default: message.output.delta const: message.output.delta created_at: type: string title: Created At format: date-time output_index: type: integer title: Output Index default: 0 id: type: string title: Id content_index: type: integer title: Content Index default: 0 model: anyOf: - type: string - type: 'null' title: Model default: null agent_id: anyOf: - type: string - type: 'null' title: Agent Id default: null role: type: string title: Role default: assistant const: assistant content: anyOf: - type: string - $ref: '#/components/schemas/OutputContentChunks' title: Content title: MessageOutputEvent required: - id - content additionalProperties: false ResponseDoneEvent: type: object properties: type: type: string title: Type default: conversation.response.done const: conversation.response.done created_at: type: string title: Created At format: date-time usage: $ref: '#/components/schemas/ConversationUsageInfo' title: ResponseDoneEvent required: - usage additionalProperties: false ResponseErrorEvent: type: object properties: type: type: string title: Type default: conversation.response.error const: conversation.response.error created_at: type: string title: Created At format: date-time message: type: string title: Message code: type: integer title: Code title: ResponseErrorEvent required: - message - code additionalProperties: false ResponseStartedEvent: type: object properties: type: type: string title: Type default: conversation.response.started const: conversation.response.started created_at: type: string title: Created At format: date-time conversation_id: type: string title: Conversation Id title: ResponseStartedEvent required: - conversation_id additionalProperties: false SSETypes: type: string title: SSETypes enum: - conversation.response.started - conversation.response.done - conversation.response.error - message.output.delta - tool.execution.started - tool.execution.delta - tool.execution.done - agent.handoff.started - agent.handoff.done - function.call.delta description: Server side events sent when streaming a conversation response. ToolExecutionDeltaEvent: type: object properties: type: type: string title: Type default: tool.execution.delta const: tool.execution.delta created_at: type: string title: Created At format: date-time output_index: type: integer title: Output Index default: 0 id: type: string title: Id name: anyOf: - $ref: '#/components/schemas/BuiltInConnectors' - type: string title: Name arguments: type: string title: Arguments title: ToolExecutionDeltaEvent required: - id - name - arguments additionalProperties: false ToolExecutionDoneEvent: type: object properties: type: type: string title: Type default: tool.execution.done const: tool.execution.done created_at: type: string title: Created At format: date-time output_index: type: integer title: Output Index default: 0 id: type: string title: Id name: anyOf: - $ref: '#/components/schemas/BuiltInConnectors' - type: string title: Name info: $ref: '#/components/schemas/ToolExecutionInfo' title: ToolExecutionDoneEvent required: - id - name additionalProperties: false ToolExecutionStartedEvent: type: object properties: type: type: string title: Type default: tool.execution.started const: tool.execution.started created_at: type: string title: Created At format: date-time output_index: type: integer title: Output Index default: 0 id: type: string title: Id model: anyOf: - type: string - type: 'null' title: Model default: null agent_id: anyOf: - type: string - type: 'null' title: Agent Id default: null name: anyOf: - $ref: '#/components/schemas/BuiltInConnectors' - type: string title: Name arguments: type: string title: Arguments title: ToolExecutionStartedEvent required: - id - name - arguments additionalProperties: false ConversationEvents: type: object properties: event: $ref: '#/components/schemas/SSETypes' data: oneOf: - $ref: '#/components/schemas/ResponseStartedEvent' - $ref: '#/components/schemas/ResponseDoneEvent' - $ref: '#/components/schemas/ResponseErrorEvent' - $ref: '#/components/schemas/ToolExecutionStartedEvent' - $ref: '#/components/schemas/ToolExecutionDeltaEvent' - $ref: '#/components/schemas/ToolExecutionDoneEvent' - $ref: '#/components/schemas/MessageOutputEvent' - $ref: '#/components/schemas/FunctionCallEvent' - $ref: '#/components/schemas/AgentHandoffStartedEvent' - $ref: '#/components/schemas/AgentHandoffDoneEvent' discriminator: propertyName: type mapping: agent.handoff.done: '#/components/schemas/AgentHandoffDoneEvent' agent.handoff.started: '#/components/schemas/AgentHandoffStartedEvent' conversation.response.done: '#/components/schemas/ResponseDoneEvent' conversation.response.error: '#/components/schemas/ResponseErrorEvent' conversation.response.started: '#/components/schemas/ResponseStartedEvent' function.call.delta: '#/components/schemas/FunctionCallEvent' message.output.delta: '#/components/schemas/MessageOutputEvent' tool.execution.delta: '#/components/schemas/ToolExecutionDeltaEvent' tool.execution.done: '#/components/schemas/ToolExecutionDoneEvent' tool.execution.started: '#/components/schemas/ToolExecutionStartedEvent' title: Data title: ConversationEvents required: - event - data MessageInputContentChunks: type: array items: anyOf: - $ref: '#/components/schemas/TextChunk' - $ref: '#/components/schemas/ImageURLChunk' - $ref: '#/components/schemas/ToolFileChunk' - $ref: '#/components/schemas/DocumentURLChunk' - $ref: '#/components/schemas/ThinkChunk' title: MessageInputContentChunks MessageOutputContentChunks: type: array items: anyOf: - $ref: '#/components/schemas/TextChunk' - $ref: '#/components/schemas/ImageURLChunk' - $ref: '#/components/schemas/ToolFileChunk' - $ref: '#/components/schemas/DocumentURLChunk' - $ref: '#/components/schemas/ThinkChunk' - $ref: '#/components/schemas/ToolReferenceChunk' title: MessageOutputContentChunks OutputContentChunks: anyOf: - $ref: '#/components/schemas/TextChunk' - $ref: '#/components/schemas/ImageURLChunk' - $ref: '#/components/schemas/ToolFileChunk' - $ref: '#/components/schemas/DocumentURLChunk' - $ref: '#/components/schemas/ThinkChunk' - $ref: '#/components/schemas/ToolReferenceChunk' title: OutputContentChunks MessageEntries: type: array items: anyOf: - $ref: '#/components/schemas/MessageInputEntry' - $ref: '#/components/schemas/MessageOutputEntry' title: MessageEntries InputEntries: type: array items: anyOf: - $ref: '#/components/schemas/MessageInputEntry' - $ref: '#/components/schemas/MessageOutputEntry' - $ref: '#/components/schemas/FunctionResultEntry' - $ref: '#/components/schemas/FunctionCallEntry' - $ref: '#/components/schemas/ToolExecutionEntry' - $ref: '#/components/schemas/AgentHandoffEntry' title: InputEntries CompletionArgsStop: anyOf: - type: string - type: array items: type: string - type: 'null' title: CompletionArgsStop FunctionCallEntryArguments: anyOf: - type: object additionalProperties: true - type: string title: FunctionCallEntryArguments ConversationInputs: anyOf: - type: string - $ref: '#/components/schemas/InputEntries' title: ConversationInputs ToolExecutionInfo: type: object title: ToolExecutionInfo additionalProperties: true ConversationRequestBase: type: object properties: inputs: $ref: '#/components/schemas/ConversationInputs' stream: anyOf: - type: boolean - type: 'null' title: Stream default: null store: anyOf: - type: boolean - type: 'null' title: Store default: null handoff_execution: anyOf: - type: string enum: - client - server - type: 'null' title: Handoff Execution default: null instructions: anyOf: - type: string - type: 'null' title: Instructions default: null tools: anyOf: - type: array items: oneOf: - $ref: '#/components/schemas/FunctionTool' - $ref: '#/components/schemas/WebSearchTool' - $ref: '#/components/schemas/WebSearchPremiumTool' - $ref: '#/components/schemas/CodeInterpreterTool' - $ref: '#/components/schemas/ImageGenerationTool' - $ref: '#/components/schemas/DocumentLibraryTool' - $ref: '#/components/schemas/CustomConnector' discriminator: propertyName: type mapping: code_interpreter: '#/components/schemas/CodeInterpreterTool' connector: '#/components/schemas/CustomConnector' document_library: '#/components/schemas/DocumentLibraryTool' function: '#/components/schemas/FunctionTool' image_generation: '#/components/schemas/ImageGenerationTool' web_search: '#/components/schemas/WebSearchTool' web_search_premium: '#/components/schemas/WebSearchPremiumTool' - type: 'null' title: Tools default: null completion_args: anyOf: - $ref: '#/components/schemas/CompletionArgs' - type: 'null' default: null guardrails: anyOf: - type: array items: $ref: '#/components/schemas/GuardrailConfig' - type: 'null' title: Guardrails default: null name: anyOf: - type: string - type: 'null' title: Name default: null description: anyOf: - type: string - type: 'null' title: Description default: null metadata: anyOf: - $ref: '#/components/schemas/MetadataDict' - type: 'null' default: null agent_id: anyOf: - type: string - type: 'null' title: Agent Id default: null agent_version: anyOf: - type: string - type: integer - type: 'null' title: Agent Version default: null model: anyOf: - type: string - type: 'null' title: Model default: null title: ConversationRequest required: - inputs ConversationStreamRequest: allOf: - $ref: '#/components/schemas/ConversationRequestBase' - type: object properties: stream: type: boolean enum: - true default: true ConversationAppendRequestBase: type: object properties: inputs: $ref: '#/components/schemas/ConversationInputs' stream: type: boolean title: Stream description: Whether to stream back partial progress. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. default: false store: type: boolean title: Store description: Whether to store the results into our servers or not. default: true handoff_execution: type: string title: Handoff Execution enum: - client - server default: server completion_args: $ref: '#/components/schemas/CompletionArgs' description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request. tool_confirmations: anyOf: - type: array items: $ref: '#/components/schemas/ToolCallConfirmation' - type: 'null' title: Tool Confirmations title: ConversationAppendRequest additionalProperties: false ConversationAppendStreamRequest: allOf: - $ref: '#/components/schemas/ConversationAppendRequestBase' - type: object properties: stream: type: boolean enum: - true default: true ConversationRestartRequestBase: type: object properties: inputs: $ref: '#/components/schemas/ConversationInputs' stream: type: boolean title: Stream description: Whether to stream back partial progress. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. default: false store: type: boolean title: Store description: Whether to store the results into our servers or not. default: true handoff_execution: type: string title: Handoff Execution enum: - client - server default: server completion_args: $ref: '#/components/schemas/CompletionArgs' description: Completion arguments that will be used to generate assistant responses. Can be overridden at each message request. guardrails: anyOf: - type: array items: $ref: '#/components/schemas/GuardrailConfig' - type: 'null' title: Guardrails metadata: anyOf: - $ref: '#/components/schemas/MetadataDict' - type: 'null' description: Custom metadata for the conversation. from_entry_id: type: string title: From Entry Id agent_version: anyOf: - type: string - type: integer - type: 'null' title: Agent Version description: Specific version of the agent to use when restarting. If not provided, uses the current version. title: ConversationRestartRequest required: - from_entry_id additionalProperties: false description: Request to restart a new conversation from a given entry in the conversation. ConversationRestartStreamRequest: allOf: - $ref: '#/components/schemas/ConversationRestartRequestBase' - type: object properties: stream: type: boolean enum: - true default: true ReferenceChunk: type: object properties: type: type: string title: Type default: reference const: reference reference_ids: type: array items: type: integer title: Reference Ids title: ReferenceChunk required: - reference_ids additionalProperties: false FilePurpose: type: string title: FilePurpose enum: - fine-tune - batch - ocr FileVisibility: type: string title: FileVisibility enum: - workspace - user SampleType: type: string title: SampleType enum: - pretrain - instruct - batch_request - batch_result - batch_error Source: type: string title: Source enum: - upload - repository - mistral UploadFileOut: type: object properties: id: type: string examples: - 497f6eca-6276-4993-bfeb-53cbbbba6f09 title: Id format: uuid description: The unique identifier of the file. object: type: string examples: - file title: Object description: The object type, which is always "file". bytes: type: integer examples: - 13000 title: Bytes description: The size of the file, in bytes. created_at: type: integer examples: - 1716963433 title: Created At description: The UNIX timestamp (in seconds) of the event. filename: type: string examples: - files_upload.jsonl title: Filename description: The name of the uploaded file. purpose: $ref: '#/components/schemas/FilePurpose' examples: - fine-tune - ocr - batch - audio description: The intended purpose of the uploaded file, currently supports fine-tuning (`fine-tune`), OCR (`ocr`), Audio/Transcription (`audio`) and batch inference (`batch`). sample_type: $ref: '#/components/schemas/SampleType' num_lines: anyOf: - type: integer - type: 'null' title: Num Lines mimetype: anyOf: - type: string - type: 'null' title: Mimetype source: $ref: '#/components/schemas/Source' signature: anyOf: - type: string - type: 'null' title: Signature expires_at: anyOf: - type: integer - type: 'null' title: Expires At visibility: anyOf: - $ref: '#/components/schemas/FileVisibility' - type: 'null' title: UploadFileOut required: - id - object - bytes - created_at - filename - purpose - sample_type - source FileSchema: type: object properties: id: type: string examples: - 497f6eca-6276-4993-bfeb-53cbbbba6f09 title: Id format: uuid description: The unique identifier of the file. object: type: string examples: - file title: Object description: The object type, which is always "file". bytes: type: integer examples: - 13000 title: Bytes description: The size of the file, in bytes. created_at: type: integer examples: - 1716963433 title: Created At description: The UNIX timestamp (in seconds) of the event. filename: type: string examples: - files_upload.jsonl title: Filename description: The name of the uploaded file. purpose: $ref: '#/components/schemas/FilePurpose' examples: - fine-tune - ocr - batch - audio description: The intended purpose of the uploaded file, currently supports fine-tuning (`fine-tune`), OCR (`ocr`), Audio/Transcription (`audio`) and batch inference (`batch`). sample_type: $ref: '#/components/schemas/SampleType' num_lines: anyOf: - type: integer - type: 'null' title: Num Lines mimetype: anyOf: - type: string - type: 'null' title: Mimetype source: $ref: '#/components/schemas/Source' signature: anyOf: - type: string - type: 'null' title: Signature expires_at: anyOf: - type: integer - type: 'null' title: Expires At visibility: anyOf: - $ref: '#/components/schemas/FileVisibility' - type: 'null' title: FileSchema required: - id - object - bytes - created_at - filename - purpose - sample_type - source ListFilesOut: type: object properties: data: type: array items: $ref: '#/components/schemas/FileSchema' title: Data object: type: string title: Object total: anyOf: - type: integer - type: 'null' title: Total title: ListFilesOut required: - data - object RetrieveFileOut: type: object properties: id: type: string examples: - 497f6eca-6276-4993-bfeb-53cbbbba6f09 title: Id format: uuid description: The unique identifier of the file. object: type: string examples: - file title: Object description: The object type, which is always "file". bytes: type: integer examples: - 13000 title: Bytes description: The size of the file, in bytes. created_at: type: integer examples: - 1716963433 title: Created At description: The UNIX timestamp (in seconds) of the event. filename: type: string examples: - files_upload.jsonl title: Filename description: The name of the uploaded file. purpose: $ref: '#/components/schemas/FilePurpose' examples: - fine-tune - ocr - batch - audio description: The intended purpose of the uploaded file, currently supports fine-tuning (`fine-tune`), OCR (`ocr`), Audio/Transcription (`audio`) and batch inference (`batch`). sample_type: $ref: '#/components/schemas/SampleType' num_lines: anyOf: - type: integer - type: 'null' title: Num Lines mimetype: anyOf: - type: string - type: 'null' title: Mimetype source: $ref: '#/components/schemas/Source' signature: anyOf: - type: string - type: 'null' title: Signature expires_at: anyOf: - type: integer - type: 'null' title: Expires At visibility: anyOf: - $ref: '#/components/schemas/FileVisibility' - type: 'null' deleted: type: boolean title: Deleted title: RetrieveFileOut required: - id - object - bytes - created_at - filename - purpose - sample_type - source - deleted DeleteFileOut: type: object properties: id: type: string examples: - 497f6eca-6276-4993-bfeb-53cbbbba6f09 title: Id format: uuid description: The ID of the deleted file. object: type: string examples: - file title: Object description: The object type that was deleted deleted: type: boolean examples: - false title: Deleted description: The deletion status. title: DeleteFileOut required: - id - object - deleted FileSignedURL: type: object properties: url: type: string title: Url title: FileSignedURL required: - url FineTuneableModelType: type: string title: FineTuneableModelType enum: - completion - classifier ClassifierJobOut: type: object properties: id: type: string title: Id format: uuid description: The ID of the job. auto_start: type: boolean title: Auto Start model: type: string title: Model status: type: string title: Status enum: - QUEUED - STARTED - VALIDATING - VALIDATED - RUNNING - FAILED_VALIDATION - FAILED - SUCCESS - CANCELLED - CANCELLATION_REQUESTED description: The current status of the fine-tuning job. created_at: type: integer title: Created At description: The UNIX timestamp (in seconds) for when the fine-tuning job was created. modified_at: type: integer title: Modified At description: The UNIX timestamp (in seconds) for when the fine-tuning job was last modified. training_files: type: array items: type: string format: uuid title: Training Files description: A list containing the IDs of uploaded files that contain training data. validation_files: anyOf: - type: array items: type: string format: uuid - type: 'null' title: Validation Files description: A list containing the IDs of uploaded files that contain validation data. default: [] object: type: string title: Object description: The object type of the fine-tuning job. default: job const: job fine_tuned_model: anyOf: - type: string - type: 'null' title: Fine Tuned Model description: The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running. suffix: anyOf: - type: string - type: 'null' title: Suffix description: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. integrations: anyOf: - type: array items: oneOf: - $ref: '#/components/schemas/WandbIntegrationOut' discriminator: propertyName: type mapping: wandb: '#/components/schemas/WandbIntegrationOut' - type: 'null' title: Integrations description: A list of integrations enabled for your fine-tuning job. trained_tokens: anyOf: - type: integer - type: 'null' title: Trained Tokens description: Total number of tokens trained. metadata: anyOf: - $ref: '#/components/schemas/JobMetadataOut' - type: 'null' job_type: type: string title: Job Type description: The type of job (`FT` for fine-tuning). default: classifier const: classifier hyperparameters: $ref: '#/components/schemas/ClassifierTrainingParameters' title: ClassifierJobOut required: - id - auto_start - model - status - created_at - modified_at - training_files - hyperparameters ClassifierTrainingParameters: type: object properties: training_steps: anyOf: - type: integer minimum: 1 - type: 'null' title: Training Steps learning_rate: type: number title: Learning Rate maximum: 1 minimum: 1e-08 default: 0.0001 weight_decay: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Weight Decay default: 0.1 warmup_fraction: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Warmup Fraction default: 0.05 epochs: anyOf: - exclusiveMinimum: 0 type: number - type: 'null' title: Epochs seq_len: anyOf: - type: integer minimum: 100 - type: 'null' title: Seq Len title: ClassifierTrainingParameters CompletionJobOut: type: object properties: id: type: string title: Id format: uuid description: The ID of the job. auto_start: type: boolean title: Auto Start model: type: string title: Model status: type: string title: Status enum: - QUEUED - STARTED - VALIDATING - VALIDATED - RUNNING - FAILED_VALIDATION - FAILED - SUCCESS - CANCELLED - CANCELLATION_REQUESTED description: The current status of the fine-tuning job. created_at: type: integer title: Created At description: The UNIX timestamp (in seconds) for when the fine-tuning job was created. modified_at: type: integer title: Modified At description: The UNIX timestamp (in seconds) for when the fine-tuning job was last modified. training_files: type: array items: type: string format: uuid title: Training Files description: A list containing the IDs of uploaded files that contain training data. validation_files: anyOf: - type: array items: type: string format: uuid - type: 'null' title: Validation Files description: A list containing the IDs of uploaded files that contain validation data. default: [] object: type: string title: Object description: The object type of the fine-tuning job. default: job const: job fine_tuned_model: anyOf: - type: string - type: 'null' title: Fine Tuned Model description: The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running. suffix: anyOf: - type: string - type: 'null' title: Suffix description: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. integrations: anyOf: - type: array items: oneOf: - $ref: '#/components/schemas/WandbIntegrationOut' discriminator: propertyName: type mapping: wandb: '#/components/schemas/WandbIntegrationOut' - type: 'null' title: Integrations description: A list of integrations enabled for your fine-tuning job. trained_tokens: anyOf: - type: integer - type: 'null' title: Trained Tokens description: Total number of tokens trained. metadata: anyOf: - $ref: '#/components/schemas/JobMetadataOut' - type: 'null' job_type: type: string title: Job Type description: The type of job (`FT` for fine-tuning). default: completion const: completion hyperparameters: $ref: '#/components/schemas/CompletionTrainingParameters' repositories: type: array items: oneOf: - $ref: '#/components/schemas/GithubRepositoryOut' discriminator: propertyName: type mapping: github: '#/components/schemas/GithubRepositoryOut' title: Repositories default: [] title: CompletionJobOut required: - id - auto_start - model - status - created_at - modified_at - training_files - hyperparameters CompletionTrainingParameters: type: object properties: training_steps: anyOf: - type: integer minimum: 1 - type: 'null' title: Training Steps learning_rate: type: number title: Learning Rate maximum: 1 minimum: 1e-08 default: 0.0001 weight_decay: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Weight Decay default: 0.1 warmup_fraction: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Warmup Fraction default: 0.05 epochs: anyOf: - exclusiveMinimum: 0 type: number - type: 'null' title: Epochs seq_len: anyOf: - type: integer minimum: 100 - type: 'null' title: Seq Len fim_ratio: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Fim Ratio default: 0.9 title: CompletionTrainingParameters GithubRepositoryOut: type: object properties: type: type: string title: Type default: github const: github name: type: string title: Name owner: type: string title: Owner ref: anyOf: - type: string - type: 'null' title: Ref weight: exclusiveMinimum: 0 type: number title: Weight default: 1.0 commit_id: type: string title: Commit Id maxLength: 40 minLength: 40 title: GithubRepositoryOut required: - name - owner - commit_id JobMetadataOut: type: object properties: expected_duration_seconds: anyOf: - type: integer - type: 'null' title: Expected Duration Seconds cost: anyOf: - type: number - type: 'null' title: Cost cost_currency: anyOf: - type: string - type: 'null' title: Cost Currency train_tokens_per_step: anyOf: - type: integer - type: 'null' title: Train Tokens Per Step train_tokens: anyOf: - type: integer - type: 'null' title: Train Tokens data_tokens: anyOf: - type: integer - type: 'null' title: Data Tokens estimated_start_time: anyOf: - type: integer - type: 'null' title: Estimated Start Time title: JobMetadataOut JobsOut: type: object properties: data: type: array items: oneOf: - $ref: '#/components/schemas/CompletionJobOut' - $ref: '#/components/schemas/ClassifierJobOut' discriminator: propertyName: job_type mapping: classifier: '#/components/schemas/ClassifierJobOut' completion: '#/components/schemas/CompletionJobOut' title: Data default: [] object: type: string title: Object default: list const: list total: type: integer title: Total title: JobsOut required: - total WandbIntegrationOut: type: object properties: type: type: string title: Type default: wandb const: wandb project: type: string title: Project description: The name of the project that the new run will be created under. name: anyOf: - type: string - type: 'null' title: Name description: A display name to set for the run. If not set, will use the job ID as the name. run_name: anyOf: - type: string - type: 'null' title: Run Name url: anyOf: - type: string - type: 'null' title: Url title: WandbIntegrationOut required: - project LegacyJobMetadataOut: type: object properties: expected_duration_seconds: anyOf: - type: integer - type: 'null' examples: - 220 title: Expected Duration Seconds description: The approximated time (in seconds) for the fine-tuning process to complete. cost: anyOf: - type: number - type: 'null' examples: - 10 title: Cost description: The cost of the fine-tuning job. cost_currency: anyOf: - type: string - type: 'null' examples: - EUR title: Cost Currency description: The currency used for the fine-tuning job cost. train_tokens_per_step: anyOf: - type: integer - type: 'null' examples: - 131072 title: Train Tokens Per Step description: The number of tokens consumed by one training step. train_tokens: anyOf: - type: integer - type: 'null' examples: - 1310720 title: Train Tokens description: The total number of tokens used during the fine-tuning process. data_tokens: anyOf: - type: integer - type: 'null' examples: - 305375 title: Data Tokens description: The total number of tokens in the training dataset. estimated_start_time: anyOf: - type: integer - type: 'null' title: Estimated Start Time deprecated: type: boolean title: Deprecated default: true details: type: string title: Details epochs: anyOf: - type: number - type: 'null' examples: - 4.2922 title: Epochs description: The number of complete passes through the entire training dataset. training_steps: anyOf: - type: integer - type: 'null' examples: - 10 title: Training Steps description: The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset. object: type: string title: Object default: job.metadata const: job.metadata title: LegacyJobMetadataOut required: - details ClassifierTargetIn: type: object properties: name: type: string title: Name labels: type: array items: type: string title: Labels weight: type: number title: Weight minimum: 0 default: 1.0 loss_function: anyOf: - $ref: '#/components/schemas/FTClassifierLossFunction' - type: 'null' title: ClassifierTargetIn required: - name - labels ClassifierTrainingParametersIn: type: object properties: training_steps: anyOf: - type: integer minimum: 1 - type: 'null' title: Training Steps description: The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset. learning_rate: type: number title: Learning Rate maximum: 1 minimum: 1e-08 description: A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process. default: 0.0001 weight_decay: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Weight Decay description: (Advanced Usage) Weight decay adds a term to the loss function that is proportional to the sum of the squared weights. This term reduces the magnitude of the weights and prevents them from growing too large. default: 0.1 warmup_fraction: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Warmup Fraction description: (Advanced Usage) A parameter that specifies the percentage of the total training steps at which the learning rate warm-up phase ends. During this phase, the learning rate gradually increases from a small value to the initial learning rate, helping to stabilize the training process and improve convergence. Similar to `pct_start` in [mistral-finetune](https://github.com/mistralai/mistral-finetune) default: 0.05 epochs: anyOf: - exclusiveMinimum: 0 type: number - type: 'null' title: Epochs seq_len: anyOf: - type: integer minimum: 100 - type: 'null' title: Seq Len title: ClassifierTrainingParametersIn description: The fine-tuning hyperparameter settings used in a classifier fine-tune job. CompletionTrainingParametersIn: type: object properties: training_steps: anyOf: - type: integer minimum: 1 - type: 'null' title: Training Steps description: The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset. learning_rate: type: number title: Learning Rate maximum: 1 minimum: 1e-08 description: A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process. default: 0.0001 weight_decay: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Weight Decay description: (Advanced Usage) Weight decay adds a term to the loss function that is proportional to the sum of the squared weights. This term reduces the magnitude of the weights and prevents them from growing too large. default: 0.1 warmup_fraction: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Warmup Fraction description: (Advanced Usage) A parameter that specifies the percentage of the total training steps at which the learning rate warm-up phase ends. During this phase, the learning rate gradually increases from a small value to the initial learning rate, helping to stabilize the training process and improve convergence. Similar to `pct_start` in [mistral-finetune](https://github.com/mistralai/mistral-finetune) default: 0.05 epochs: anyOf: - exclusiveMinimum: 0 type: number - type: 'null' title: Epochs seq_len: anyOf: - type: integer minimum: 100 - type: 'null' title: Seq Len fim_ratio: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Fim Ratio default: 0.9 title: CompletionTrainingParametersIn description: The fine-tuning hyperparameter settings used in a fine-tune job. FTClassifierLossFunction: type: string title: FTClassifierLossFunction enum: - single_class - multi_class GithubRepositoryIn: type: object properties: type: type: string title: Type default: github const: github name: type: string title: Name owner: type: string title: Owner ref: anyOf: - type: string - type: 'null' title: Ref weight: exclusiveMinimum: 0 type: number title: Weight default: 1.0 token: type: string title: Token title: GithubRepositoryIn required: - name - owner - token JobIn: type: object properties: model: type: string title: Model training_files: type: array items: $ref: '#/components/schemas/TrainingFile' title: Training Files default: [] validation_files: anyOf: - type: array items: type: string format: uuid - type: 'null' title: Validation Files description: A list containing the IDs of uploaded files that contain validation data. If you provide these files, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in `checkpoints` when getting the status of a running fine-tuning job. The same data should not be present in both train and validation files. suffix: anyOf: - type: string maxLength: 18 - type: 'null' title: Suffix description: A string that will be added to your fine-tuning model name. For example, a suffix of "my-great-model" would produce a model name like `ft:open-mistral-7b:my-great-model:xxx...` integrations: anyOf: - type: array items: oneOf: - $ref: '#/components/schemas/WandbIntegration' discriminator: propertyName: type mapping: wandb: '#/components/schemas/WandbIntegration' - type: 'null' title: Integrations description: A list of integrations to enable for your fine-tuning job. auto_start: type: boolean title: Auto Start description: This field will be required in a future release. invalid_sample_skip_percentage: type: number title: Invalid Sample Skip Percentage maximum: 0.5 minimum: 0 default: 0 job_type: anyOf: - $ref: '#/components/schemas/FineTuneableModelType' - type: 'null' hyperparameters: anyOf: - $ref: '#/components/schemas/CompletionTrainingParametersIn' - $ref: '#/components/schemas/ClassifierTrainingParametersIn' title: Hyperparameters repositories: anyOf: - type: array items: oneOf: - $ref: '#/components/schemas/GithubRepositoryIn' discriminator: propertyName: type mapping: github: '#/components/schemas/GithubRepositoryIn' - type: 'null' title: Repositories classifier_targets: anyOf: - type: array items: $ref: '#/components/schemas/ClassifierTargetIn' - type: 'null' title: Classifier Targets title: JobIn required: - model - hyperparameters TrainingFile: type: object properties: file_id: type: string title: File Id format: uuid weight: exclusiveMinimum: 0 type: number title: Weight default: 1.0 title: TrainingFile required: - file_id WandbIntegration: type: object properties: type: type: string title: Type default: wandb const: wandb project: type: string title: Project description: The name of the project that the new run will be created under. name: anyOf: - type: string - type: 'null' title: Name description: A display name to set for the run. If not set, will use the job ID as the name. api_key: type: string title: Api Key maxLength: 40 minLength: 40 description: The WandB API key to use for authentication. run_name: anyOf: - type: string - type: 'null' title: Run Name title: WandbIntegration required: - project - api_key CheckpointOut: type: object properties: metrics: $ref: '#/components/schemas/MetricOut' step_number: type: integer title: Step Number description: The step number that the checkpoint was created at. created_at: type: integer examples: - 1716963433 title: Created At description: The UNIX timestamp (in seconds) for when the checkpoint was created. title: CheckpointOut required: - metrics - step_number - created_at ClassifierDetailedJobOut: type: object properties: id: type: string title: Id format: uuid auto_start: type: boolean title: Auto Start model: type: string title: Model status: type: string title: Status enum: - QUEUED - STARTED - VALIDATING - VALIDATED - RUNNING - FAILED_VALIDATION - FAILED - SUCCESS - CANCELLED - CANCELLATION_REQUESTED created_at: type: integer title: Created At modified_at: type: integer title: Modified At training_files: type: array items: type: string format: uuid title: Training Files validation_files: anyOf: - type: array items: type: string format: uuid - type: 'null' title: Validation Files default: [] object: type: string title: Object default: job const: job fine_tuned_model: anyOf: - type: string - type: 'null' title: Fine Tuned Model suffix: anyOf: - type: string - type: 'null' title: Suffix integrations: anyOf: - type: array items: oneOf: - $ref: '#/components/schemas/WandbIntegrationOut' discriminator: propertyName: type mapping: wandb: '#/components/schemas/WandbIntegrationOut' - type: 'null' title: Integrations trained_tokens: anyOf: - type: integer - type: 'null' title: Trained Tokens metadata: anyOf: - $ref: '#/components/schemas/JobMetadataOut' - type: 'null' job_type: type: string title: Job Type default: classifier const: classifier hyperparameters: $ref: '#/components/schemas/ClassifierTrainingParameters' events: type: array items: $ref: '#/components/schemas/EventOut' title: Events description: Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here. default: [] checkpoints: type: array items: $ref: '#/components/schemas/CheckpointOut' title: Checkpoints default: [] classifier_targets: type: array items: $ref: '#/components/schemas/ClassifierTargetOut' title: Classifier Targets title: ClassifierDetailedJobOut required: - id - auto_start - model - status - created_at - modified_at - training_files - hyperparameters - classifier_targets ClassifierTargetOut: type: object properties: name: type: string title: Name labels: type: array items: type: string title: Labels weight: type: number title: Weight loss_function: $ref: '#/components/schemas/FTClassifierLossFunction' title: ClassifierTargetOut required: - name - labels - weight - loss_function CompletionDetailedJobOut: type: object properties: id: type: string title: Id format: uuid auto_start: type: boolean title: Auto Start model: type: string title: Model status: type: string title: Status enum: - QUEUED - STARTED - VALIDATING - VALIDATED - RUNNING - FAILED_VALIDATION - FAILED - SUCCESS - CANCELLED - CANCELLATION_REQUESTED created_at: type: integer title: Created At modified_at: type: integer title: Modified At training_files: type: array items: type: string format: uuid title: Training Files validation_files: anyOf: - type: array items: type: string format: uuid - type: 'null' title: Validation Files default: [] object: type: string title: Object default: job const: job fine_tuned_model: anyOf: - type: string - type: 'null' title: Fine Tuned Model suffix: anyOf: - type: string - type: 'null' title: Suffix integrations: anyOf: - type: array items: oneOf: - $ref: '#/components/schemas/WandbIntegrationOut' discriminator: propertyName: type mapping: wandb: '#/components/schemas/WandbIntegrationOut' - type: 'null' title: Integrations trained_tokens: anyOf: - type: integer - type: 'null' title: Trained Tokens metadata: anyOf: - $ref: '#/components/schemas/JobMetadataOut' - type: 'null' job_type: type: string title: Job Type default: completion const: completion hyperparameters: $ref: '#/components/schemas/CompletionTrainingParameters' repositories: type: array items: oneOf: - $ref: '#/components/schemas/GithubRepositoryOut' discriminator: propertyName: type mapping: github: '#/components/schemas/GithubRepositoryOut' title: Repositories default: [] events: type: array items: $ref: '#/components/schemas/EventOut' title: Events description: Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here. default: [] checkpoints: type: array items: $ref: '#/components/schemas/CheckpointOut' title: Checkpoints default: [] title: CompletionDetailedJobOut required: - id - auto_start - model - status - created_at - modified_at - training_files - hyperparameters EventOut: type: object properties: name: type: string title: Name description: The name of the event. data: anyOf: - type: object additionalProperties: true - type: 'null' title: Data created_at: type: integer title: Created At description: The UNIX timestamp (in seconds) of the event. title: EventOut required: - name - created_at MetricOut: type: object properties: train_loss: anyOf: - type: number - type: 'null' title: Train Loss valid_loss: anyOf: - type: number - type: 'null' title: Valid Loss valid_mean_token_accuracy: anyOf: - type: number - type: 'null' title: Valid Mean Token Accuracy title: MetricOut description: Metrics at the step number during the fine-tuning job. Use these metrics to assess if the training is going smoothly (loss should decrease, token accuracy should increase). ClassifierFTModelOut: type: object properties: id: type: string title: Id object: type: string title: Object default: model const: model created: type: integer title: Created owned_by: type: string title: Owned By workspace_id: type: string title: Workspace Id root: type: string title: Root root_version: type: string title: Root Version archived: type: boolean title: Archived name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description capabilities: $ref: '#/components/schemas/FTModelCapabilitiesOut' max_context_length: type: integer title: Max Context Length default: 32768 aliases: type: array items: type: string title: Aliases default: [] job: type: string title: Job format: uuid classifier_targets: type: array items: $ref: '#/components/schemas/ClassifierTargetOut' title: Classifier Targets model_type: type: string title: Model Type default: classifier const: classifier title: ClassifierFTModelOut required: - id - created - owned_by - workspace_id - root - root_version - archived - capabilities - job - classifier_targets CompletionFTModelOut: type: object properties: id: type: string title: Id object: type: string title: Object default: model const: model created: type: integer title: Created owned_by: type: string title: Owned By workspace_id: type: string title: Workspace Id root: type: string title: Root root_version: type: string title: Root Version archived: type: boolean title: Archived name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description capabilities: $ref: '#/components/schemas/FTModelCapabilitiesOut' max_context_length: type: integer title: Max Context Length default: 32768 aliases: type: array items: type: string title: Aliases default: [] job: type: string title: Job format: uuid model_type: type: string title: Model Type default: completion const: completion title: CompletionFTModelOut required: - id - created - owned_by - workspace_id - root - root_version - archived - capabilities - job FTModelCapabilitiesOut: type: object properties: completion_chat: type: boolean title: Completion Chat default: true completion_fim: type: boolean title: Completion Fim default: false function_calling: type: boolean title: Function Calling default: false fine_tuning: type: boolean title: Fine Tuning default: false classification: type: boolean title: Classification default: false title: FTModelCapabilitiesOut UpdateFTModelIn: type: object properties: name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description title: UpdateFTModelIn ArchiveFTModelOut: type: object properties: id: type: string title: Id object: type: string title: Object default: model const: model archived: type: boolean title: Archived default: true title: ArchiveFTModelOut required: - id UnarchiveFTModelOut: type: object properties: id: type: string title: Id object: type: string title: Object default: model const: model archived: type: boolean title: Archived default: false title: UnarchiveFTModelOut required: - id BatchJobStatus: type: string title: BatchJobStatus enum: - QUEUED - RUNNING - SUCCESS - FAILED - TIMEOUT_EXCEEDED - CANCELLATION_REQUESTED - CANCELLED BatchError: type: object properties: message: type: string title: Message count: type: integer title: Count default: 1 title: BatchError required: - message BatchJobOut: type: object properties: id: type: string title: Id object: type: string title: Object default: batch const: batch input_files: type: array items: type: string format: uuid title: Input Files metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata endpoint: type: string title: Endpoint model: anyOf: - type: string - type: 'null' title: Model agent_id: anyOf: - type: string - type: 'null' title: Agent Id output_file: anyOf: - type: string format: uuid - type: 'null' title: Output File error_file: anyOf: - type: string format: uuid - type: 'null' title: Error File errors: type: array items: $ref: '#/components/schemas/BatchError' title: Errors outputs: anyOf: - type: array items: type: object additionalProperties: true - type: 'null' title: Outputs status: $ref: '#/components/schemas/BatchJobStatus' created_at: type: integer title: Created At total_requests: type: integer title: Total Requests completed_requests: type: integer title: Completed Requests succeeded_requests: type: integer title: Succeeded Requests failed_requests: type: integer title: Failed Requests started_at: anyOf: - type: integer - type: 'null' title: Started At completed_at: anyOf: - type: integer - type: 'null' title: Completed At title: BatchJobOut required: - id - input_files - endpoint - errors - status - created_at - total_requests - completed_requests - succeeded_requests - failed_requests BatchJobsOut: type: object properties: data: type: array items: $ref: '#/components/schemas/BatchJobOut' title: Data default: [] object: type: string title: Object default: list const: list total: type: integer title: Total title: BatchJobsOut required: - total ApiEndpoint: type: string title: ApiEndpoint enum: - /v1/chat/completions - /v1/embeddings - /v1/fim/completions - /v1/moderations - /v1/chat/moderations - /v1/ocr - /v1/classifications - /v1/chat/classifications - /v1/conversations - /v1/audio/transcriptions BatchJobIn: type: object properties: input_files: anyOf: - type: array items: type: string format: uuid - type: 'null' title: Input Files description: 'The list of input files to be used for batch inference, these files should be `jsonl` files, containing the input data corresponding to the bory request for the batch inference in a "body" field. An example of such file is the following: ```json {"custom_id": "0", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French cheese?"}]}} {"custom_id": "1", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French wine?"}]}} ```' requests: anyOf: - type: array items: $ref: '#/components/schemas/BatchRequest' maxItems: 10000 - type: 'null' title: Requests endpoint: $ref: '#/components/schemas/ApiEndpoint' examples: - /v1/chat/completions - /v1/embeddings - /v1/fim/completions description: The endpoint to be used for batch inference. model: anyOf: - type: string - type: 'null' examples: - mistral-small-latest - mistral-medium-latest title: Model description: The model to be used for batch inference. agent_id: anyOf: - type: string - type: 'null' title: Agent Id description: In case you want to use a specific agent from the **deprecated** agents api for batch inference, you can specify the agent ID here. metadata: anyOf: - type: object propertyNames: maxLength: 32 minLength: 1 additionalProperties: type: string maxLength: 512 minLength: 1 - type: 'null' title: Metadata description: The metadata of your choice to be associated with the batch inference job. timeout_hours: type: integer title: Timeout Hours description: The timeout in hours for the batch inference job. default: 24 title: BatchJobIn required: - endpoint BatchRequest: type: object properties: custom_id: anyOf: - type: string - type: 'null' title: Custom Id body: type: object title: Body additionalProperties: true title: BatchRequest required: - body AssistantMessage: type: object properties: role: type: string title: Role default: assistant const: assistant content: anyOf: - type: string - type: 'null' - type: array items: $ref: '#/components/schemas/ContentChunk' title: Content tool_calls: anyOf: - type: array items: $ref: '#/components/schemas/ToolCall' - type: 'null' title: Tool Calls prefix: type: boolean title: Prefix description: Set this to `true` when adding an assistant message as prefix to condition the model response. The role of the prefix message is to force the model to start its answer by the content of the message. default: false title: AssistantMessage additionalProperties: false AudioChunk: type: object properties: type: type: string title: Type default: input_audio const: input_audio input_audio: anyOf: - type: string - type: string format: binary title: Input Audio title: AudioChunk required: - input_audio additionalProperties: false ChatCompletionRequest: type: object properties: model: type: string examples: - mistral-large-latest title: Model description: ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. temperature: anyOf: - type: number maximum: 1.5 minimum: 0 - type: 'null' title: Temperature description: What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. top_p: type: number title: Top P maximum: 1 minimum: 0 description: Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. default: 1.0 max_tokens: anyOf: - type: integer minimum: 0 - type: 'null' title: Max Tokens description: The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. stream: type: boolean title: Stream description: 'Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.' default: false stop: anyOf: - type: string - type: array items: type: string title: Stop description: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array random_seed: anyOf: - type: integer minimum: 0 - type: 'null' title: Random Seed description: The seed to use for random sampling. If set, different calls will generate deterministic results. metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata messages: type: array examples: - - role: user content: Who is the best French painter? Answer in one short sentence. items: oneOf: - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/AssistantMessage' - $ref: '#/components/schemas/ToolMessage' discriminator: propertyName: role mapping: assistant: '#/components/schemas/AssistantMessage' system: '#/components/schemas/SystemMessage' tool: '#/components/schemas/ToolMessage' user: '#/components/schemas/UserMessage' title: Messages description: The prompt(s) to generate completions for, encoded as a list of dict with role and content. response_format: $ref: '#/components/schemas/ResponseFormat' tools: anyOf: - type: array items: $ref: '#/components/schemas/Tool' - type: 'null' title: Tools description: A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. tool_choice: anyOf: - $ref: '#/components/schemas/ToolChoice' - $ref: '#/components/schemas/ToolChoiceEnum' title: Tool Choice description: 'Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.' default: auto presence_penalty: type: number title: Presence Penalty maximum: 2 minimum: -2 description: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. default: 0.0 frequency_penalty: type: number title: Frequency Penalty maximum: 2 minimum: -2 description: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. default: 0.0 n: anyOf: - type: integer minimum: 1 - type: 'null' title: N description: Number of completions to return for each request, input tokens are only billed once. prediction: $ref: '#/components/schemas/Prediction' description: Enable users to specify expected results, optimizing response times by leveraging known or predictable content. This approach is especially effective for updating text documents or code files with minimal changes, reducing latency while maintaining high-quality results. default: type: content content: '' parallel_tool_calls: type: boolean title: Parallel Tool Calls description: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. default: true prompt_mode: anyOf: - $ref: '#/components/schemas/MistralPromptMode' - type: 'null' description: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. **Deprecated for reasoning models - use `reasoning_effort` parameter instead.** reasoning_effort: type: string enum: - high - none description: Controls the reasoning effort level for reasoning models. "high" enables comprehensive reasoning traces, "none" disables reasoning effort. guardrails: anyOf: - type: array items: $ref: '#/components/schemas/GuardrailConfig' - type: 'null' title: Guardrails description: A list of guardrail configurations to apply to this request. Each guardrail specifies a moderation type, categories with thresholds to evaluate, and an action to take on violation. default: null safe_prompt: type: boolean description: Whether to inject a safety prompt before all conversations. default: false title: ChatCompletionRequest required: - messages - model additionalProperties: false ChatModerationRequest: type: object properties: input: anyOf: - type: array items: oneOf: - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/AssistantMessage' - $ref: '#/components/schemas/ToolMessage' discriminator: propertyName: role mapping: assistant: '#/components/schemas/AssistantMessage' system: '#/components/schemas/SystemMessage' tool: '#/components/schemas/ToolMessage' user: '#/components/schemas/UserMessage' - type: array items: type: array items: oneOf: - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/AssistantMessage' - $ref: '#/components/schemas/ToolMessage' discriminator: propertyName: role mapping: assistant: '#/components/schemas/AssistantMessage' system: '#/components/schemas/SystemMessage' tool: '#/components/schemas/ToolMessage' user: '#/components/schemas/UserMessage' title: Input description: Chat to classify model: type: string title: Model title: ChatModerationRequest required: - input - model additionalProperties: false ClassificationRequest: type: object properties: model: type: string examples: - mistral-moderation-latest title: Model description: ID of the model to use. metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata input: anyOf: - type: string - type: array items: type: string title: Input description: Text to classify. title: ClassificationRequest required: - input - model additionalProperties: false EmbeddingDtype: type: string title: EmbeddingDtype enum: - float - int8 - uint8 - binary - ubinary EmbeddingRequest: type: object properties: model: type: string title: Model description: ID of the model to use. example: mistral-embed metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata input: anyOf: - type: string - type: array items: type: string title: Input description: Text to embed. example: - Embed this sentence. - As well as this one. output_dimension: anyOf: - exclusiveMinimum: 0 type: integer - type: 'null' title: Output Dimension description: The dimension of the output embeddings when feature available. If not provided, a default output dimension will be used. output_dtype: $ref: '#/components/schemas/EmbeddingDtype' description: The data type of the output embeddings when feature available. If not provided, a default output data type will be used. default: float encoding_format: $ref: '#/components/schemas/EncodingFormat' description: The format of embeddings in the response. default: float title: EmbeddingRequest required: - input - model additionalProperties: false EncodingFormat: type: string title: EncodingFormat enum: - float - base64 FIMCompletionRequest: type: object properties: model: type: string examples: - codestral-latest title: Model description: ID of the model with FIM to use. default: codestral-2404 temperature: anyOf: - type: number maximum: 1.5 minimum: 0 - type: 'null' title: Temperature description: What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. top_p: type: number title: Top P maximum: 1 minimum: 0 description: Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. default: 1.0 max_tokens: anyOf: - type: integer minimum: 0 - type: 'null' title: Max Tokens description: The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. stream: type: boolean title: Stream description: 'Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.' default: false stop: anyOf: - type: string - type: array items: type: string title: Stop description: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array random_seed: anyOf: - type: integer minimum: 0 - type: 'null' title: Random Seed description: The seed to use for random sampling. If set, different calls will generate deterministic results. metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata prompt: type: string examples: - def title: Prompt description: The text/code to complete. suffix: anyOf: - type: string - type: 'null' examples: - return a+b title: Suffix description: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. default: '' min_tokens: anyOf: - type: integer minimum: 0 - type: 'null' title: Min Tokens description: The minimum number of tokens to generate in the completion. title: FIMCompletionRequest required: - prompt - model additionalProperties: false FileChunk: type: object properties: type: type: string title: Type default: file const: file file_id: type: string title: File Id format: uuid title: FileChunk required: - file_id additionalProperties: false FunctionCall: type: object properties: name: type: string title: Name arguments: title: Arguments anyOf: - type: object additionalProperties: true - type: string title: FunctionCall required: - name - arguments additionalProperties: false FunctionName: type: object properties: name: type: string title: Name title: FunctionName required: - name additionalProperties: false description: this restriction of `Function` is used to select a specific function to call InstructRequest: type: object properties: messages: type: array items: oneOf: - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/AssistantMessage' - $ref: '#/components/schemas/ToolMessage' discriminator: propertyName: role mapping: assistant: '#/components/schemas/AssistantMessage' system: '#/components/schemas/SystemMessage' tool: '#/components/schemas/ToolMessage' user: '#/components/schemas/UserMessage' title: Messages title: InstructRequest required: - messages additionalProperties: false MistralPromptMode: type: string title: MistralPromptMode enum: - reasoning description: 'Available options to the prompt_mode argument on the chat completion endpoint. Values represent high-level intent. Assignment to actual SPs is handled internally. System prompt may include knowledge cutoff date, model capabilities, tone to use, safety guidelines, etc.' OCRImageObject: type: object properties: id: type: string title: Id description: Image ID for extracted image in a page top_left_x: anyOf: - type: integer minimum: 0 - type: 'null' title: Top Left X description: X coordinate of top-left corner of the extracted image top_left_y: anyOf: - type: integer minimum: 0 - type: 'null' title: Top Left Y description: Y coordinate of top-left corner of the extracted image bottom_right_x: anyOf: - type: integer minimum: 0 - type: 'null' title: Bottom Right X description: X coordinate of bottom-right corner of the extracted image bottom_right_y: anyOf: - type: integer minimum: 0 - type: 'null' title: Bottom Right Y description: Y coordinate of bottom-right corner of the extracted image image_base64: anyOf: - type: string - type: 'null' title: Image Base64 description: Base64 string of the extracted image image_annotation: anyOf: - type: string - type: 'null' title: Image Annotation description: Annotation of the extracted image in json str title: OCRImageObject required: - id - top_left_x - top_left_y - bottom_right_x - bottom_right_y additionalProperties: false OCRPageDimensions: type: object properties: dpi: type: integer title: Dpi minimum: 0 description: Dots per inch of the page-image height: type: integer title: Height minimum: 0 description: Height of the image in pixels width: type: integer title: Width minimum: 0 description: Width of the image in pixels title: OCRPageDimensions required: - dpi - height - width additionalProperties: false OCRPageObject: type: object properties: index: type: integer title: Index minimum: 0 description: The page index in a pdf document starting from 0 markdown: type: string title: Markdown description: The markdown string response of the page images: type: array items: $ref: '#/components/schemas/OCRImageObject' title: Images description: List of all extracted images in the page tables: type: array items: $ref: '#/components/schemas/OCRTableObject' title: Tables description: List of all extracted tables in the page hyperlinks: type: array items: type: string title: Hyperlinks description: List of all hyperlinks in the page header: anyOf: - type: string - type: 'null' title: Header description: Header of the page footer: anyOf: - type: string - type: 'null' title: Footer description: Footer of the page dimensions: anyOf: - $ref: '#/components/schemas/OCRPageDimensions' - type: 'null' description: The dimensions of the PDF Page's screenshot image title: OCRPageObject required: - index - markdown - images - dimensions additionalProperties: false OCRRequest: type: object properties: model: anyOf: - type: string - type: 'null' title: Model id: type: string title: Id document: anyOf: - $ref: '#/components/schemas/FileChunk' - $ref: '#/components/schemas/DocumentURLChunk' - $ref: '#/components/schemas/ImageURLChunk' title: Document description: Document to run OCR on pages: anyOf: - type: array items: type: integer - type: 'null' title: Pages description: 'Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0' include_image_base64: anyOf: - type: boolean - type: 'null' title: Include Image Base64 description: Include image URLs in response image_limit: anyOf: - type: integer - type: 'null' title: Image Limit description: Max images to extract image_min_size: anyOf: - type: integer - type: 'null' title: Image Min Size description: Minimum height and width of image to extract bbox_annotation_format: anyOf: - $ref: '#/components/schemas/ResponseFormat' - type: 'null' description: Structured output class for extracting useful information from each extracted bounding box / image from document. Only json_schema is valid for this field document_annotation_format: anyOf: - $ref: '#/components/schemas/ResponseFormat' - type: 'null' description: Structured output class for extracting useful information from the entire document. Only json_schema is valid for this field document_annotation_prompt: anyOf: - type: string - type: 'null' title: Document Annotation Prompt description: Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided. table_format: anyOf: - type: string enum: - markdown - html - type: 'null' title: Table Format extract_header: type: boolean title: Extract Header default: false extract_footer: type: boolean title: Extract Footer default: false title: OCRRequest required: - document - model additionalProperties: false OCRResponse: type: object properties: pages: type: array items: $ref: '#/components/schemas/OCRPageObject' title: Pages description: List of OCR info for pages. model: type: string title: Model description: The model used to generate the OCR. document_annotation: anyOf: - type: string - type: 'null' title: Document Annotation description: Formatted response in the request_format if provided in json str usage_info: $ref: '#/components/schemas/OCRUsageInfo' description: Usage info for the OCR request. title: OCRResponse required: - pages - model - usage_info additionalProperties: false OCRTableObject: type: object properties: id: type: string title: Id description: Table ID for extracted table in a page content: type: string title: Content description: Content of the table in the given format format: type: string title: Format enum: - markdown - html description: Format of the table title: OCRTableObject required: - id - content - format additionalProperties: false OCRUsageInfo: type: object properties: pages_processed: type: integer title: Pages Processed minimum: 0 description: Number of pages processed doc_size_bytes: anyOf: - type: integer - type: 'null' title: Doc Size Bytes description: Document size in bytes title: OCRUsageInfo required: - pages_processed additionalProperties: false SystemMessage: type: object properties: role: type: string title: Role default: system const: system content: anyOf: - type: string - type: array items: $ref: '#/components/schemas/SystemMessageContentChunks' title: Content title: SystemMessage required: - content additionalProperties: false Tool: type: object properties: type: $ref: '#/components/schemas/ToolTypes' default: function function: $ref: '#/components/schemas/Function' title: Tool required: - function additionalProperties: false ToolCall: type: object properties: id: type: string title: Id default: 'null' type: $ref: '#/components/schemas/ToolTypes' default: function function: $ref: '#/components/schemas/FunctionCall' index: type: integer title: Index default: 0 title: ToolCall required: - function additionalProperties: false ToolChoice: type: object properties: type: $ref: '#/components/schemas/ToolTypes' default: function function: $ref: '#/components/schemas/FunctionName' title: ToolChoice required: - function additionalProperties: false description: ToolChoice is either a ToolChoiceEnum or a ToolChoice ToolMessage: type: object properties: role: type: string title: Role default: tool const: tool content: anyOf: - type: string - type: 'null' - type: array items: $ref: '#/components/schemas/ContentChunk' title: Content tool_call_id: anyOf: - type: string - type: 'null' title: Tool Call Id name: anyOf: - type: string - type: 'null' title: Name title: ToolMessage required: - content additionalProperties: false ToolTypes: type: string title: ToolTypes enum: - function TranscriptionResponse: type: object properties: model: type: string title: Model text: type: string title: Text language: anyOf: - type: string pattern: ^\w{2}$ - type: 'null' title: Language segments: type: array items: $ref: '#/components/schemas/TranscriptionSegmentChunk' title: Segments usage: $ref: '#/components/schemas/UsageInfo' title: TranscriptionResponse required: - model - text - language - usage additionalProperties: false TranscriptionSegmentChunk: type: object properties: type: type: string title: Type default: transcription_segment const: transcription_segment text: type: string title: Text start: type: number title: Start end: type: number title: End score: anyOf: - type: number - type: 'null' title: Score speaker_id: anyOf: - type: string - type: 'null' title: Speaker Id title: TranscriptionSegmentChunk required: - text - start - end additionalProperties: false PromptTokensDetails: properties: cached_tokens: type: integer title: Cached Tokens default: 0 additionalProperties: false type: object title: PromptTokensDetails description: Token usage details for the prompt. UsageInfo: type: object properties: prompt_tokens: type: integer title: Prompt Tokens default: 0 completion_tokens: title: Completion Tokens default: 0 type: integer total_tokens: type: integer title: Total Tokens default: 0 prompt_audio_seconds: anyOf: - type: integer - type: 'null' title: Prompt Audio Seconds num_cached_tokens: anyOf: - type: integer - type: 'null' title: Num Cached Tokens prompt_tokens_details: anyOf: - $ref: '#/components/schemas/PromptTokensDetails' - type: 'null' prompt_token_details: anyOf: - $ref: '#/components/schemas/PromptTokensDetails' - type: 'null' title: UsageInfo additionalProperties: false required: - prompt_tokens - completion_tokens - total_tokens SpeechRequest: properties: model: anyOf: - type: string - type: 'null' title: Model stream: type: boolean title: Stream default: false voice_id: anyOf: - type: string - type: 'null' title: Voice Id description: The preset or custom voice to use for generating the speech. ref_audio: anyOf: - type: string - type: 'null' title: Ref Audio description: The base64-encoded audio reference for zero-shot voice cloning. input: type: string title: Input description: Text to generate speech from. response_format: $ref: '#/components/schemas/SpeechOutputFormat' description: Output audio format. Defaults to mp3. default: mp3 additionalProperties: true type: object required: - input title: SpeechRequest SpeechOutputFormat: type: string enum: - pcm - wav - mp3 - flac - opus title: SpeechOutputFormat SpeechResponse: properties: audio_data: type: string title: Audio Data description: Base64 encoded audio data additionalProperties: false type: object required: - audio_data title: SpeechResponse SpeechStreamAudioDelta: properties: type: type: string const: speech.audio.delta title: Type default: speech.audio.delta audio_data: type: string title: Audio Data additionalProperties: false type: object required: - audio_data title: SpeechStreamAudioDelta SpeechStreamDone: properties: type: type: string const: speech.audio.done title: Type default: speech.audio.done usage: $ref: '#/components/schemas/UsageInfo' additionalProperties: false type: object required: - usage title: SpeechStreamDone SpeechStreamEvents: properties: event: type: string enum: - speech.audio.delta - speech.audio.done title: Event data: oneOf: - $ref: '#/components/schemas/SpeechStreamAudioDelta' - $ref: '#/components/schemas/SpeechStreamDone' title: Data discriminator: propertyName: type mapping: speech.audio.delta: '#/components/schemas/SpeechStreamAudioDelta' speech.audio.done: '#/components/schemas/SpeechStreamDone' additionalProperties: false type: object required: - event - data title: SpeechStreamEvents VoiceCreateRequest: type: object properties: name: type: string title: Name slug: anyOf: - type: string - type: 'null' title: Slug languages: type: array items: type: string title: Languages default: [] gender: anyOf: - type: string - type: 'null' title: Gender age: anyOf: - type: integer - type: 'null' title: Age tags: anyOf: - type: array items: type: string - type: 'null' title: Tags color: anyOf: - type: string - type: 'null' title: Color retention_notice: type: integer title: Retention Notice default: 30 sample_audio: type: string title: Sample Audio description: Base64-encoded audio file sample_filename: anyOf: - type: string - type: 'null' title: Sample Filename description: Original filename for extension detection title: VoiceCreateRequest required: - name - sample_audio description: Request model for creating a new voice with base64 audio. VoiceListResponse: type: object properties: items: type: array items: $ref: '#/components/schemas/VoiceResponse' title: Items total: type: integer title: Total page: type: integer title: Page page_size: type: integer title: Page Size total_pages: type: integer title: Total Pages title: VoiceListResponse required: - items - total - page - page_size - total_pages description: Schema for voice list response VoiceResponse: type: object properties: name: type: string title: Name slug: anyOf: - type: string - type: 'null' title: Slug languages: type: array items: type: string title: Languages default: [] gender: anyOf: - type: string - type: 'null' title: Gender age: anyOf: - type: integer - type: 'null' title: Age tags: anyOf: - type: array items: type: string - type: 'null' title: Tags color: anyOf: - type: string - type: 'null' title: Color retention_notice: type: integer title: Retention Notice default: 30 id: type: string title: Id format: uuid created_at: type: string title: Created At format: date-time user_id: anyOf: - type: string - type: 'null' title: User Id title: VoiceResponse required: - name - id - created_at - user_id description: Schema for voice response VoiceUpdateRequest: type: object properties: name: anyOf: - type: string - type: 'null' title: Name languages: anyOf: - type: array items: type: string - type: 'null' title: Languages gender: anyOf: - type: string - type: 'null' title: Gender age: anyOf: - type: integer - type: 'null' title: Age tags: anyOf: - type: array items: type: string - type: 'null' title: Tags title: VoiceUpdateRequest description: Request model for partially updating voice metadata. UserMessage: type: object properties: role: type: string title: Role default: user const: user content: anyOf: - type: string - type: 'null' - type: array items: $ref: '#/components/schemas/ContentChunk' title: Content title: UserMessage required: - content additionalProperties: false File: type: string title: File format: binary description: "The File object (not file name) to be uploaded.\n To upload a file and specify a custom file name you should format your request as such:\n ```bash\n file=@path/to/your/file.jsonl;filename=custom_name.jsonl\n ```\n Otherwise, you can just keep the original file name:\n ```bash\n file=@path/to/your/file.jsonl\n ```" TimestampGranularity: type: string title: TimestampGranularity enum: - segment - word AudioTranscriptionRequest: type: object properties: model: type: string examples: - voxtral-mini-latest - voxtral-mini-2507 title: Model description: ID of the model to be used. file: anyOf: - $ref: '#/components/schemas/File' - type: 'null' title: File default: null file_url: anyOf: - type: string maxLength: 2083 minLength: 1 format: uri - type: 'null' title: File Url description: Url of a file to be transcribed default: null file_id: anyOf: - type: string - type: 'null' title: File Id description: ID of a file uploaded to /v1/files default: null language: anyOf: - type: string pattern: ^\w{2}$ - type: 'null' title: Language description: Language of the audio, e.g. 'en'. Providing the language can boost accuracy. default: null temperature: anyOf: - type: number - type: 'null' title: Temperature default: null stream: type: boolean title: Stream default: false const: false diarize: type: boolean title: Diarize default: false context_bias: type: array items: type: string pattern: ^[^,\s]+$ title: Context Bias default: [] timestamp_granularities: type: array items: $ref: '#/components/schemas/TimestampGranularity' title: Timestamp Granularities description: Granularities of timestamps to include in the response. $defs: TimestampGranularity: type: string title: TimestampGranularity enum: - segment - word title: AudioTranscriptionRequest required: - model AudioTranscriptionRequestStream: type: object properties: model: type: string title: Model file: anyOf: - $ref: '#/components/schemas/File' - type: 'null' title: File default: null file_url: anyOf: - type: string maxLength: 2083 minLength: 1 format: uri - type: 'null' title: File Url description: Url of a file to be transcribed default: null file_id: anyOf: - type: string - type: 'null' title: File Id description: ID of a file uploaded to /v1/files default: null language: anyOf: - type: string pattern: ^\w{2}$ - type: 'null' title: Language description: Language of the audio, e.g. 'en'. Providing the language can boost accuracy. default: null temperature: anyOf: - type: number - type: 'null' title: Temperature default: null stream: type: boolean title: Stream default: true const: true diarize: type: boolean title: Diarize default: false context_bias: type: array items: type: string pattern: ^[^,\s]+$ title: Context Bias default: [] timestamp_granularities: type: array items: $ref: '#/components/schemas/TimestampGranularity' title: Timestamp Granularities description: Granularities of timestamps to include in the response. $defs: TimestampGranularity: type: string title: TimestampGranularity enum: - segment - word title: AudioTranscriptionRequestStream required: - model TranscriptionStreamLanguage: type: object properties: type: type: string title: Type default: transcription.language const: transcription.language audio_language: type: string title: Audio Language pattern: ^\w{2}$ title: TranscriptionStreamLanguage required: - audio_language additionalProperties: false TranscriptionStreamSegmentDelta: type: object properties: type: type: string title: Type default: transcription.segment const: transcription.segment text: type: string title: Text start: type: number title: Start end: type: number title: End speaker_id: anyOf: - type: string - type: 'null' title: Speaker Id default: null title: TranscriptionStreamSegmentDelta required: - text - start - end additionalProperties: false TranscriptionStreamTextDelta: type: object properties: type: type: string title: Type default: transcription.text.delta const: transcription.text.delta text: type: string title: Text title: TranscriptionStreamTextDelta required: - text additionalProperties: false TranscriptionStreamDone: type: object properties: model: type: string title: Model text: type: string title: Text language: anyOf: - type: string pattern: ^\w{2}$ - type: 'null' title: Language segments: type: array items: $ref: '#/components/schemas/TranscriptionSegmentChunk' title: Segments usage: $ref: '#/components/schemas/UsageInfo' type: type: string title: Type default: transcription.done const: transcription.done title: TranscriptionStreamDone required: - model - text - language - usage additionalProperties: false TranscriptionStreamEvents: type: object properties: event: $ref: '#/components/schemas/TranscriptionStreamEventTypes' data: oneOf: - $ref: '#/components/schemas/TranscriptionStreamTextDelta' - $ref: '#/components/schemas/TranscriptionStreamLanguage' - $ref: '#/components/schemas/TranscriptionStreamSegmentDelta' - $ref: '#/components/schemas/TranscriptionStreamDone' discriminator: propertyName: type mapping: transcription.done: '#/components/schemas/TranscriptionStreamDone' transcription.language: '#/components/schemas/TranscriptionStreamLanguage' transcription.segment: '#/components/schemas/TranscriptionStreamSegmentDelta' transcription.text.delta: '#/components/schemas/TranscriptionStreamTextDelta' title: Data title: TranscriptionStreamEvents required: - event - data additionalProperties: false TranscriptionStreamEventTypes: type: string title: TranscriptionStreamEventTypes enum: - transcription.language - transcription.segment - transcription.text.delta - transcription.done RealtimeTranscriptionClientMessage: oneOf: - $ref: '#/components/schemas/RealtimeTranscriptionSessionUpdateMessage' - $ref: '#/components/schemas/RealtimeTranscriptionInputAudioAppend' - $ref: '#/components/schemas/RealtimeTranscriptionInputAudioFlush' - $ref: '#/components/schemas/RealtimeTranscriptionInputAudioEnd' discriminator: propertyName: type mapping: input_audio.append: '#/components/schemas/RealtimeTranscriptionInputAudioAppend' input_audio.end: '#/components/schemas/RealtimeTranscriptionInputAudioEnd' input_audio.flush: '#/components/schemas/RealtimeTranscriptionInputAudioFlush' session.update: '#/components/schemas/RealtimeTranscriptionSessionUpdateMessage' title: RealtimeTranscriptionClientMessage AudioEncoding: type: string title: AudioEncoding enum: - pcm_s16le - pcm_s32le - pcm_f16le - pcm_f32le - pcm_mulaw - pcm_alaw AudioFormat: type: object properties: encoding: $ref: '#/components/schemas/AudioEncoding' sample_rate: type: integer title: Sample Rate maximum: 96000 minimum: 8000 title: AudioFormat required: - encoding - sample_rate additionalProperties: false RealtimeTranscriptionInputAudioAppend: type: object properties: type: type: string title: Type default: input_audio.append const: input_audio.append audio: type: string title: Audio format: base64 description: 'Base64-encoded raw PCM bytes matching the current audio_format. Max decoded size: 262144 bytes.' title: RealtimeTranscriptionInputAudioAppend required: - audio additionalProperties: false RealtimeTranscriptionInputAudioEnd: type: object properties: type: type: string title: Type default: input_audio.end const: input_audio.end title: RealtimeTranscriptionInputAudioEnd additionalProperties: false RealtimeTranscriptionInputAudioFlush: type: object properties: type: type: string title: Type default: input_audio.flush const: input_audio.flush title: RealtimeTranscriptionInputAudioFlush additionalProperties: false RealtimeTranscriptionSessionUpdateMessage: type: object properties: type: type: string title: Type default: session.update const: session.update session: $ref: '#/components/schemas/RealtimeTranscriptionSessionUpdatePayload' title: RealtimeTranscriptionSessionUpdateMessage required: - session additionalProperties: false RealtimeTranscriptionSessionUpdatePayload: type: object properties: audio_format: anyOf: - $ref: '#/components/schemas/AudioFormat' - type: 'null' description: Set before sending audio. Audio format updates are rejected after audio starts. default: null target_streaming_delay_ms: anyOf: - type: integer - type: 'null' title: Target Streaming Delay Ms description: Set before sending audio. Streaming delay updates are rejected after audio starts. default: null title: RealtimeTranscriptionSessionUpdatePayload additionalProperties: false AgentsCompletionRequest: type: object properties: max_tokens: anyOf: - type: integer minimum: 0 - type: 'null' title: Max Tokens description: The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. stream: type: boolean title: Stream description: 'Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.' default: false stop: anyOf: - type: string - type: array items: type: string title: Stop description: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array random_seed: anyOf: - type: integer minimum: 0 - type: 'null' title: Random Seed description: The seed to use for random sampling. If set, different calls will generate deterministic results. metadata: anyOf: - type: object additionalProperties: true - type: 'null' title: Metadata messages: type: array examples: - - role: user content: Who is the best French painter? Answer in one short sentence. items: oneOf: - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/AssistantMessage' - $ref: '#/components/schemas/ToolMessage' discriminator: propertyName: role mapping: assistant: '#/components/schemas/AssistantMessage' system: '#/components/schemas/SystemMessage' tool: '#/components/schemas/ToolMessage' user: '#/components/schemas/UserMessage' title: Messages description: The prompt(s) to generate completions for, encoded as a list of dict with role and content. response_format: $ref: '#/components/schemas/ResponseFormat' tools: anyOf: - type: array items: $ref: '#/components/schemas/Tool' - type: 'null' title: Tools tool_choice: anyOf: - $ref: '#/components/schemas/ToolChoice' - $ref: '#/components/schemas/ToolChoiceEnum' title: Tool Choice default: auto presence_penalty: type: number title: Presence Penalty maximum: 2 minimum: -2 description: The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. default: 0.0 frequency_penalty: type: number title: Frequency Penalty maximum: 2 minimum: -2 description: The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. default: 0.0 n: anyOf: - type: integer minimum: 1 - type: 'null' title: N description: Number of completions to return for each request, input tokens are only billed once. prediction: $ref: '#/components/schemas/Prediction' description: Enable users to specify expected results, optimizing response times by leveraging known or predictable content. This approach is especially effective for updating text documents or code files with minimal changes, reducing latency while maintaining high-quality results. default: type: content content: '' parallel_tool_calls: type: boolean title: Parallel Tool Calls default: true prompt_mode: anyOf: - $ref: '#/components/schemas/MistralPromptMode' - type: 'null' description: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. **Deprecated for reasoning models - use `reasoning_effort` parameter instead.** reasoning_effort: type: string enum: - high - none description: Controls the reasoning effort level for reasoning models. "high" enables comprehensive reasoning traces, "none" disables reasoning effort. agent_id: type: string description: The ID of the agent to use for this completion. title: AgentsCompletionRequest required: - messages - agent_id additionalProperties: false ChatClassificationRequest: type: object properties: model: type: string title: Model input: $ref: '#/components/schemas/ChatClassificationRequestInputs' title: ChatClassificationRequest required: - input - model additionalProperties: false ChatClassificationRequestInputs: anyOf: - $ref: '#/components/schemas/InstructRequest' - type: array items: $ref: '#/components/schemas/InstructRequest' title: ChatClassificationRequestInputs description: Chat to classify ClassificationResponse: type: object properties: id: type: string example: mod-e5cc70bb28c444948073e77776eb30ef model: type: string results: type: array items: type: object title: ClassificationTargetResult additionalProperties: $ref: '#/components/schemas/ClassificationTargetResult' title: ClassificationResponse required: - id - model - results ClassificationTargetResult: type: object properties: scores: type: object title: ClassifierTargetResultScores additionalProperties: type: number title: ClassificationTargetResult required: - scores ContentChunk: oneOf: - $ref: '#/components/schemas/TextChunk' - $ref: '#/components/schemas/ImageURLChunk' - $ref: '#/components/schemas/DocumentURLChunk' - $ref: '#/components/schemas/ReferenceChunk' - $ref: '#/components/schemas/FileChunk' - $ref: '#/components/schemas/ThinkChunk' - $ref: '#/components/schemas/AudioChunk' discriminator: propertyName: type mapping: image_url: '#/components/schemas/ImageURLChunk' document_url: '#/components/schemas/DocumentURLChunk' text: '#/components/schemas/TextChunk' reference: '#/components/schemas/ReferenceChunk' file: '#/components/schemas/FileChunk' thinking: '#/components/schemas/ThinkChunk' input_audio: '#/components/schemas/AudioChunk' title: ContentChunk ModerationResponse: type: object properties: id: type: string example: mod-e5cc70bb28c444948073e77776eb30ef model: type: string results: type: array items: $ref: '#/components/schemas/ModerationObject' title: ModerationResponse required: - id - model - results ModerationObject: type: object properties: categories: type: object additionalProperties: type: boolean description: Moderation result thresholds category_scores: type: object additionalProperties: type: number description: Moderation result title: ModerationObject SystemMessageContentChunks: oneOf: - $ref: '#/components/schemas/TextChunk' - $ref: '#/components/schemas/ThinkChunk' discriminator: propertyName: type mapping: text: '#/components/schemas/TextChunk' thinking: '#/components/schemas/ThinkChunk' title: SystemMessageContentChunks DocumentOut: type: object properties: id: type: string title: Id format: uuid library_id: type: string title: Library Id format: uuid hash: anyOf: - type: string - type: 'null' title: Hash mime_type: anyOf: - type: string - type: 'null' title: Mime Type extension: anyOf: - type: string - type: 'null' title: Extension size: anyOf: - type: integer - type: 'null' title: Size name: type: string title: Name summary: anyOf: - type: string - type: 'null' title: Summary created_at: type: string title: Created At format: date-time last_processed_at: anyOf: - type: string format: date-time - type: 'null' title: Last Processed At number_of_pages: anyOf: - type: integer - type: 'null' title: Number Of Pages process_status: $ref: '#/components/schemas/ProcessStatus' uploaded_by_id: anyOf: - type: string format: uuid - type: 'null' title: Uploaded By Id uploaded_by_type: type: string tokens_processing_main_content: anyOf: - type: integer - type: 'null' title: Tokens Processing Main Content tokens_processing_summary: anyOf: - type: integer - type: 'null' title: Tokens Processing Summary url: anyOf: - type: string - type: 'null' title: Url attributes: anyOf: - type: object additionalProperties: true - type: 'null' title: Attributes processing_status: type: string title: Processing Status readOnly: true tokens_processing_total: type: integer title: Tokens Processing Total readOnly: true title: DocumentOut required: - id - library_id - hash - mime_type - extension - size - name - created_at - process_status - uploaded_by_id - uploaded_by_type - processing_status - tokens_processing_total DocumentTextContent: type: object properties: text: type: string title: Text title: DocumentTextContent required: - text DocumentUpdateIn: type: object properties: name: anyOf: - type: string - type: 'null' title: Name attributes: anyOf: - type: object additionalProperties: anyOf: - type: boolean - type: string - type: integer - type: number - type: string format: date-time - type: array items: type: string - type: array items: type: integer - type: array items: type: number - type: array items: type: boolean - type: 'null' title: Attributes title: DocumentUpdateIn FilterCondition: type: object properties: field: type: string title: Field op: type: string title: Op enum: - lt - lte - gt - gte - startswith - istartswith - endswith - iendswith - contains - icontains - matches - notcontains - inotcontains - eq - neq - isnull - includes - excludes - len_eq value: title: Value title: FilterCondition required: - field - op - value FilterGroup: type: object properties: AND: anyOf: - type: array items: anyOf: - $ref: '#/components/schemas/FilterGroup' - $ref: '#/components/schemas/FilterCondition' - type: 'null' title: And OR: anyOf: - type: array items: anyOf: - $ref: '#/components/schemas/FilterGroup' - $ref: '#/components/schemas/FilterCondition' - type: 'null' title: Or title: FilterGroup LibraryIn: type: object properties: name: type: string title: Name description: anyOf: - type: string - type: 'null' title: Description chunk_size: anyOf: - type: integer - type: 'null' title: Chunk Size title: LibraryIn required: - name LibraryInUpdate: type: object properties: name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description title: LibraryInUpdate LibraryOut: type: object properties: id: type: string title: Id format: uuid name: type: string title: Name created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time owner_id: anyOf: - type: string format: uuid - type: 'null' title: Owner Id owner_type: type: string total_size: type: integer title: Total Size nb_documents: type: integer title: Nb Documents chunk_size: anyOf: - type: integer - type: 'null' title: Chunk Size emoji: anyOf: - type: string - type: 'null' title: Emoji description: anyOf: - type: string - type: 'null' title: Description generated_description: anyOf: - type: string - type: 'null' title: Generated Description explicit_user_members_count: anyOf: - type: integer - type: 'null' title: Explicit User Members Count explicit_workspace_members_count: anyOf: - type: integer - type: 'null' title: Explicit Workspace Members Count org_sharing_role: anyOf: - type: string - type: 'null' generated_name: anyOf: - type: string - type: 'null' description: Generated Name title: LibraryOut required: - id - name - created_at - updated_at - owner_id - owner_type - total_size - nb_documents - chunk_size ListDocumentOut: type: object properties: pagination: $ref: '#/components/schemas/PaginationInfo' data: type: array items: $ref: '#/components/schemas/DocumentOut' title: Data title: ListDocumentOut required: - pagination - data ListLibraryOut: type: object properties: data: type: array items: $ref: '#/components/schemas/LibraryOut' title: Data title: ListLibraryOut required: - data ListSharingOut: type: object properties: data: type: array items: $ref: '#/components/schemas/SharingOut' title: Data title: ListSharingOut required: - data PaginationInfo: type: object properties: total_items: type: integer title: Total Items total_pages: type: integer title: Total Pages current_page: type: integer title: Current Page page_size: type: integer title: Page Size has_more: type: boolean title: Has More title: PaginationInfo required: - total_items - total_pages - current_page - page_size - has_more ProcessStatus: type: string title: ProcessStatus enum: - self_managed - missing_content - noop - done - todo - in_progress - error - waiting_for_capacity ProcessingStatusOut: type: object properties: document_id: type: string title: Document Id format: uuid process_status: $ref: '#/components/schemas/ProcessStatus' processing_status: type: string title: Processing Status readOnly: true title: ProcessingStatusOut required: - document_id - process_status - processing_status ShareEnum: type: string title: ShareEnum enum: - Viewer - Editor x-speakeasy-unknown-values: allow SharingDelete: type: object properties: org_id: anyOf: - type: string format: uuid - type: 'null' title: Org Id share_with_uuid: type: string format: uuid description: The id of the entity (user, workspace or organization) to share with share_with_type: $ref: '#/components/schemas/EntityType' title: SharingDelete required: - share_with_uuid - share_with_type - level SharingIn: type: object properties: org_id: anyOf: - type: string format: uuid - type: 'null' title: Org Id level: $ref: '#/components/schemas/ShareEnum' share_with_uuid: type: string format: uuid description: The id of the entity (user, workspace or organization) to share with share_with_type: $ref: '#/components/schemas/EntityType' title: SharingIn required: - share_with_uuid - share_with_type - level SharingOut: type: object properties: library_id: type: string title: Library Id format: uuid user_id: anyOf: - type: string format: uuid - type: 'null' title: User Id org_id: type: string title: Org Id format: uuid role: type: string share_with_type: type: string share_with_uuid: anyOf: - type: string format: uuid - type: 'null' title: Share With Uuid title: SharingOut required: - library_id - org_id - role - share_with_type - share_with_uuid EntityType: type: string title: EntityType enum: - User - Workspace - Org description: The type of entity, used to share a library. x-speakeasy-unknown-values: allow BaseFieldDefinition: type: object properties: name: type: string title: Name label: type: string title: Label type: type: string title: Type enum: - ENUM - TEXT - INT - FLOAT - BOOL - TIMESTAMP - ARRAY group: anyOf: - type: string - type: 'null' title: Group supported_operators: type: array items: type: string enum: - lt - lte - gt - gte - startswith - istartswith - endswith - iendswith - contains - icontains - matches - notcontains - inotcontains - eq - neq - isnull - includes - excludes - len_eq title: Supported Operators readOnly: true title: BaseFieldDefinition required: - name - label - type - supported_operators BaseTaskStatus: type: string title: BaseTaskStatus enum: - RUNNING - COMPLETED - FAILED - CANCELED - TERMINATED - CONTINUED_AS_NEW - TIMED_OUT - UNKNOWN CampaignPreview: type: object properties: id: type: string title: Id format: uuid created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time deleted_at: anyOf: - type: string format: date-time - type: 'null' title: Deleted At name: type: string title: Name owner_id: type: string title: Owner Id format: uuid workspace_id: type: string title: Workspace Id format: uuid description: type: string title: Description max_nb_events: type: integer title: Max Nb Events search_params: $ref: '#/components/schemas/FilterPayload' judge: $ref: '#/components/schemas/JudgePreview' title: CampaignPreview required: - id - created_at - updated_at - deleted_at - name - owner_id - workspace_id - description - max_nb_events - search_params - judge CampaignPreviews: type: object properties: campaigns: $ref: '#/components/schemas/PaginatedResult_CampaignPreview_' title: CampaignPreviews required: - campaigns CampaignSelectedEvents: type: object properties: completion_events: $ref: '#/components/schemas/PaginatedResult_ChatCompletionEventPreview_' title: CampaignSelectedEvents required: - completion_events CampaignStatus: type: object properties: status: $ref: '#/components/schemas/BaseTaskStatus' title: CampaignStatus required: - status ChatCompletionEventIds: type: object properties: completion_event_ids: type: array items: type: string title: Completion Event Ids title: ChatCompletionEventIds required: - completion_event_ids ChatCompletionEvent: type: object properties: event_id: type: string title: Event Id correlation_id: type: string title: Correlation Id created_at: type: string title: Created At format: date-time extra_fields: type: object title: Extra Fields additionalProperties: anyOf: - type: boolean - type: integer - type: number - type: string - type: string format: date-time - type: array items: type: string - type: 'null' nb_input_tokens: type: integer title: Nb Input Tokens nb_output_tokens: type: integer title: Nb Output Tokens enabled_tools: type: array items: type: object additionalProperties: true title: Enabled Tools request_messages: type: array items: type: object additionalProperties: true title: Request Messages response_messages: type: array items: type: object additionalProperties: true title: Response Messages nb_messages: type: integer title: Nb Messages chat_transcription_events: type: array items: $ref: '#/components/schemas/ChatTranscriptionEvent' title: Chat Transcription Events title: ChatCompletionEvent required: - event_id - correlation_id - created_at - extra_fields - nb_input_tokens - nb_output_tokens - enabled_tools - request_messages - response_messages - nb_messages - chat_transcription_events ChatCompletionEventPreview: type: object properties: event_id: type: string title: Event Id correlation_id: type: string title: Correlation Id created_at: type: string title: Created At format: date-time extra_fields: type: object title: Extra Fields additionalProperties: anyOf: - type: boolean - type: integer - type: number - type: string - type: string format: date-time - type: array items: type: string - type: 'null' nb_input_tokens: type: integer title: Nb Input Tokens nb_output_tokens: type: integer title: Nb Output Tokens title: ChatCompletionEventPreview required: - event_id - correlation_id - created_at - extra_fields - nb_input_tokens - nb_output_tokens ChatCompletionEvents: type: object properties: completion_events: $ref: '#/components/schemas/FeedResult_ChatCompletionEventPreview_' title: ChatCompletionEvents required: - completion_events ChatCompletionFieldOptions: type: object properties: options: anyOf: - type: array items: anyOf: - type: string - type: boolean - type: 'null' - type: 'null' title: Options title: ChatCompletionFieldOptions ChatCompletionFields: type: object properties: field_definitions: type: array items: $ref: '#/components/schemas/BaseFieldDefinition' title: Field Definitions field_groups: type: array items: $ref: '#/components/schemas/FieldGroup' title: Field Groups title: ChatCompletionFields required: - field_definitions - field_groups ChatTranscriptionEvent: type: object properties: audio_url: type: string title: Audio Url model: type: string title: Model response_message: type: object title: Response Message additionalProperties: true title: ChatTranscriptionEvent required: - audio_url - model - response_message ConversationPayload: type: object properties: messages: type: array items: type: object additionalProperties: true title: Messages title: ConversationPayload required: - messages additionalProperties: true description: '' ConversationSource: type: string title: ConversationSource enum: - EXPLORER - UPLOADED_FILE - DIRECT_INPUT - PLAYGROUND DatasetExport: type: object properties: file_url: type: string title: File Url title: DatasetExport required: - file_url DatasetImportTask: type: object properties: id: type: string title: Id format: uuid created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time deleted_at: anyOf: - type: string format: date-time - type: 'null' title: Deleted At creator_id: type: string title: Creator Id format: uuid dataset_id: type: string title: Dataset Id format: uuid workspace_id: type: string title: Workspace Id format: uuid status: $ref: '#/components/schemas/BaseTaskStatus' progress: anyOf: - type: integer maximum: 100 minimum: 0 - type: 'null' title: Progress message: anyOf: - type: string - type: 'null' title: Message title: DatasetImportTask required: - id - created_at - updated_at - deleted_at - creator_id - dataset_id - workspace_id - status DatasetImportTasks: type: object properties: tasks: $ref: '#/components/schemas/PaginatedResult_DatasetImportTask_' title: DatasetImportTasks required: - tasks Dataset: type: object properties: id: type: string title: Id format: uuid created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time deleted_at: anyOf: - type: string format: date-time - type: 'null' title: Deleted At name: type: string title: Name description: type: string title: Description owner_id: type: string title: Owner Id format: uuid workspace_id: type: string title: Workspace Id format: uuid title: Dataset required: - id - created_at - updated_at - deleted_at - name - description - owner_id - workspace_id DatasetPreview: type: object properties: id: type: string title: Id format: uuid created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time deleted_at: anyOf: - type: string format: date-time - type: 'null' title: Deleted At name: type: string title: Name description: type: string title: Description owner_id: type: string title: Owner Id format: uuid workspace_id: type: string title: Workspace Id format: uuid title: DatasetPreview required: - id - created_at - updated_at - deleted_at - name - description - owner_id - workspace_id DatasetPreviews: type: object properties: datasets: $ref: '#/components/schemas/PaginatedResult_DatasetPreview_' title: DatasetPreviews required: - datasets DatasetRecord: type: object properties: id: type: string title: Id format: uuid created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time deleted_at: anyOf: - type: string format: date-time - type: 'null' title: Deleted At dataset_id: type: string title: Dataset Id format: uuid payload: $ref: '#/components/schemas/ConversationPayload' properties: type: object title: Properties additionalProperties: true source: $ref: '#/components/schemas/ConversationSource' title: DatasetRecord required: - id - created_at - updated_at - deleted_at - dataset_id - payload - properties - source DatasetRecords: type: object properties: records: $ref: '#/components/schemas/PaginatedResult_DatasetRecord_' title: DatasetRecords required: - records DeleteDatasetRecordsInSchema: type: object properties: dataset_record_ids: type: array items: type: string format: uuid title: Dataset Record Ids maxItems: 500 minItems: 1 title: DeleteDatasetRecordsInSchema required: - dataset_record_ids FeedResult_ChatCompletionEventPreview_: type: object properties: results: type: array items: $ref: '#/components/schemas/ChatCompletionEventPreview' title: Results next: anyOf: - type: string - type: 'null' title: Next cursor: anyOf: - type: string - type: 'null' title: Cursor title: FeedResult[ChatCompletionEventPreview] FieldGroup: type: object properties: name: type: string title: Name label: type: string title: Label title: FieldGroup required: - name - label FieldOptionCountItem: type: object properties: value: type: string title: Value count: type: integer title: Count title: FieldOptionCountItem required: - value - count FieldOptionCountsInSchema: type: object properties: filter_params: anyOf: - $ref: '#/components/schemas/FilterPayload' - type: 'null' title: FieldOptionCountsInSchema FieldOptionCounts: type: object properties: counts: type: array items: $ref: '#/components/schemas/FieldOptionCountItem' title: Counts title: FieldOptionCounts required: - counts FilterPayload: type: object properties: filters: anyOf: - $ref: '#/components/schemas/FilterGroup' - $ref: '#/components/schemas/FilterCondition' - type: 'null' title: Filters title: FilterPayload required: - filters GetChatCompletionEventIdsInSchema: type: object properties: search_params: $ref: '#/components/schemas/FilterPayload' extra_fields: anyOf: - type: array items: type: string - type: 'null' title: Extra Fields title: GetChatCompletionEventIdsInSchema required: - search_params GetChatCompletionEventsInSchema: type: object properties: search_params: $ref: '#/components/schemas/FilterPayload' extra_fields: anyOf: - type: array items: type: string - type: 'null' title: Extra Fields title: GetChatCompletionEventsInSchema required: - search_params JudgeClassificationOutput: type: object properties: type: type: string title: Type default: CLASSIFICATION const: CLASSIFICATION options: type: array items: $ref: '#/components/schemas/JudgeClassificationOutputOption' title: Options title: JudgeClassificationOutput required: - options JudgeClassificationOutputOption: type: object properties: value: type: string title: Value description: type: string title: Description title: JudgeClassificationOutputOption required: - value - description JudgeOutput: type: object properties: analysis: type: string title: Analysis answer: anyOf: - type: string - type: number title: Answer title: JudgeOutput required: - analysis - answer JudgeOutputType: type: string title: JudgeOutputType enum: - REGRESSION - CLASSIFICATION JudgePreview: type: object properties: id: type: string title: Id format: uuid created_at: type: string title: Created At format: date-time updated_at: type: string title: Updated At format: date-time deleted_at: anyOf: - type: string format: date-time - type: 'null' title: Deleted At owner_id: type: string title: Owner Id format: uuid workspace_id: type: string title: Workspace Id format: uuid name: type: string title: Name description: type: string title: Description model_name: type: string title: Model Name output: oneOf: - $ref: '#/components/schemas/JudgeClassificationOutput' - $ref: '#/components/schemas/JudgeRegressionOutput' discriminator: propertyName: type mapping: CLASSIFICATION: '#/components/schemas/JudgeClassificationOutput' REGRESSION: '#/components/schemas/JudgeRegressionOutput' title: Output instructions: type: string title: Instructions tools: type: array items: type: string title: Tools up_revision: anyOf: - type: string format: uuid - type: 'null' title: Up Revision down_revision: anyOf: - type: string format: uuid - type: 'null' title: Down Revision base_revision: anyOf: - type: string format: uuid - type: 'null' title: Base Revision title: JudgePreview required: - id - created_at - updated_at - deleted_at - owner_id - workspace_id - name - description - model_name - output - instructions - tools JudgePreviews: type: object properties: judges: $ref: '#/components/schemas/PaginatedResult_JudgePreview_' title: JudgePreviews required: - judges JudgeRegressionOutput: type: object properties: type: type: string title: Type default: REGRESSION const: REGRESSION min: type: number title: Min minimum: 0 default: 0 min_description: type: string title: Min Description max: exclusiveMaximum: 1e+09 type: number title: Max default: 1 max_description: type: string title: Max Description title: JudgeRegressionOutput required: - min_description - max_description PaginatedResult_CampaignPreview_: type: object properties: results: type: array items: $ref: '#/components/schemas/CampaignPreview' title: Results count: type: integer title: Count next: anyOf: - type: string - type: 'null' title: Next previous: anyOf: - type: string - type: 'null' title: Previous title: PaginatedResult[CampaignPreview] required: - count PaginatedResult_ChatCompletionEventPreview_: type: object properties: results: type: array items: $ref: '#/components/schemas/ChatCompletionEventPreview' title: Results count: type: integer title: Count next: anyOf: - type: string - type: 'null' title: Next previous: anyOf: - type: string - type: 'null' title: Previous title: PaginatedResult[ChatCompletionEventPreview] required: - count PaginatedResult_DatasetImportTask_: type: object properties: results: type: array items: $ref: '#/components/schemas/DatasetImportTask' title: Results count: type: integer title: Count next: anyOf: - type: string - type: 'null' title: Next previous: anyOf: - type: string - type: 'null' title: Previous title: PaginatedResult[DatasetImportTask] required: - count PaginatedResult_DatasetPreview_: type: object properties: results: type: array items: $ref: '#/components/schemas/DatasetPreview' title: Results count: type: integer title: Count next: anyOf: - type: string - type: 'null' title: Next previous: anyOf: - type: string - type: 'null' title: Previous title: PaginatedResult[DatasetPreview] required: - count PaginatedResult_DatasetRecord_: type: object properties: results: type: array items: $ref: '#/components/schemas/DatasetRecord' title: Results count: type: integer title: Count next: anyOf: - type: string - type: 'null' title: Next previous: anyOf: - type: string - type: 'null' title: Previous title: PaginatedResult[DatasetRecord] required: - count PaginatedResult_JudgePreview_: type: object properties: results: type: array items: $ref: '#/components/schemas/JudgePreview' title: Results count: type: integer title: Count next: anyOf: - type: string - type: 'null' title: Next previous: anyOf: - type: string - type: 'null' title: Previous title: PaginatedResult[JudgePreview] required: - count PatchDatasetInSchema: type: object properties: name: anyOf: - type: string - type: 'null' title: Name description: anyOf: - type: string - type: 'null' title: Description title: PatchDatasetInSchema PostCampaignInSchema: type: object properties: search_params: $ref: '#/components/schemas/FilterPayload' judge_id: type: string title: Judge Id format: uuid name: type: string title: Name maxLength: 50 minLength: 5 description: type: string title: Description max_nb_events: exclusiveMinimum: 0 type: integer title: Max Nb Events maximum: 10000 title: PostCampaignInSchema required: - search_params - judge_id - name - description - max_nb_events PostChatCompletionEventJudgingInSchema: type: object properties: judge_definition: $ref: '#/components/schemas/PostJudgeInSchema' title: PostChatCompletionEventJudgingInSchema required: - judge_definition PostDatasetImportFromCampaignInSchema: type: object properties: campaign_id: type: string title: Campaign Id format: uuid title: PostDatasetImportFromCampaignInSchema required: - campaign_id PostDatasetImportFromDatasetInSchema: type: object properties: dataset_record_ids: type: array items: type: string format: uuid title: Dataset Record Ids maxItems: 10000 minItems: 1 title: PostDatasetImportFromDatasetInSchema required: - dataset_record_ids PostDatasetImportFromExplorerInSchema: type: object properties: completion_event_ids: type: array items: type: string title: Completion Event Ids maxItems: 500 title: PostDatasetImportFromExplorerInSchema required: - completion_event_ids PostDatasetImportFromFileInSchema: type: object properties: file_id: type: string title: File Id title: PostDatasetImportFromFileInSchema required: - file_id PostDatasetImportFromPlaygroundInSchema: type: object properties: conversation_ids: type: array items: type: string title: Conversation Ids title: PostDatasetImportFromPlaygroundInSchema required: - conversation_ids PostDatasetInSchema: type: object properties: name: type: string title: Name maxLength: 50 minLength: 5 description: type: string title: Description maxLength: 200 title: PostDatasetInSchema required: - name - description PostDatasetRecordInSchema: type: object properties: payload: $ref: '#/components/schemas/ConversationPayload' properties: type: object title: Properties additionalProperties: true title: PostDatasetRecordInSchema required: - payload - properties PostDatasetRecordJudgingInSchema: type: object properties: judge_definition: $ref: '#/components/schemas/PostJudgeInSchema' title: PostDatasetRecordJudgingInSchema required: - judge_definition PostJudgeInSchema: type: object properties: name: type: string title: Name maxLength: 50 minLength: 5 description: type: string title: Description maxLength: 500 model_name: type: string title: Model Name maxLength: 500 output: oneOf: - $ref: '#/components/schemas/JudgeClassificationOutput' - $ref: '#/components/schemas/JudgeRegressionOutput' discriminator: propertyName: type mapping: CLASSIFICATION: '#/components/schemas/JudgeClassificationOutput' REGRESSION: '#/components/schemas/JudgeRegressionOutput' title: Output instructions: type: string title: Instructions maxLength: 10000 tools: type: array items: type: string title: Tools title: PostJudgeInSchema required: - name - description - model_name - output - instructions - tools PutDatasetRecordPayloadInSchema: type: object properties: payload: $ref: '#/components/schemas/ConversationPayload' title: PutDatasetRecordPayloadInSchema required: - payload PutDatasetRecordPropertiesInSchema: type: object properties: properties: type: object title: Properties additionalProperties: true title: PutDatasetRecordPropertiesInSchema required: - properties PutJudgeInSchema: type: object properties: name: type: string title: Name maxLength: 50 minLength: 5 description: type: string title: Description maxLength: 500 model_name: type: string title: Model Name maxLength: 500 output: oneOf: - $ref: '#/components/schemas/JudgeClassificationOutput' - $ref: '#/components/schemas/JudgeRegressionOutput' discriminator: propertyName: type mapping: CLASSIFICATION: '#/components/schemas/JudgeClassificationOutput' REGRESSION: '#/components/schemas/JudgeRegressionOutput' title: Output instructions: type: string title: Instructions maxLength: 10000 tools: type: array items: type: string title: Tools title: PutJudgeInSchema required: - name - description - model_name - output - instructions - tools Annotations: type: object properties: audience: anyOf: - type: array items: type: string enum: - user - assistant - type: 'null' title: Audience priority: anyOf: - type: number maximum: 1 minimum: 0 - type: 'null' title: Priority title: Annotations additionalProperties: true AudioContent: type: object properties: type: type: string title: Type const: audio data: type: string title: Data mimeType: type: string title: Mimetype annotations: anyOf: - $ref: '#/components/schemas/Annotations' - type: 'null' _meta: anyOf: - type: object additionalProperties: true - type: 'null' title: Meta title: AudioContent required: - type - data - mimeType additionalProperties: true description: Audio content for a message. AuthData: type: object properties: client_id: type: string title: Client Id client_secret: type: string title: Client Secret title: AuthData required: - client_id - client_secret BlobResourceContents: type: object properties: uri: type: string title: Uri minLength: 1 format: uri mimeType: anyOf: - type: string - type: 'null' title: Mimetype _meta: anyOf: - type: object additionalProperties: true - type: 'null' title: Meta blob: type: string title: Blob title: BlobResourceContents required: - uri - blob additionalProperties: true description: Binary contents of a resource. Connector: type: object properties: id: type: string title: Id format: uuid name: type: string title: Name description: type: string title: Description created_at: type: string title: Created At format: date-time modified_at: type: string title: Modified At format: date-time server: anyOf: - type: string - type: 'null' title: Server auth_type: anyOf: - type: string - type: 'null' title: Auth Type tools: anyOf: - type: array items: $ref: '#/components/schemas/integrations__schemas__api__tool__Tool' - type: 'null' title: Tools title: Connector required: - id - name - description - created_at - modified_at ConnectorMCPCreate: type: object properties: name: type: string title: Name description: The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. description: type: string title: Description description: The description of the connector. icon_url: anyOf: - type: string - type: 'null' title: Icon Url description: The optional url of the icon you want to associate to the connector. visibility: $ref: '#/components/schemas/ResourceVisibility' description: Visibility of the connector. Use 'shared_workspace' for workspace scoped connectors, or 'private' for private connectors. default: shared_org server: type: string title: Server maxLength: 2083 minLength: 1 format: uri description: The url of the MCP server. headers: anyOf: - type: object additionalProperties: true - type: 'null' title: Headers description: Optional organization-level headers to be sent with the request to the mcp server. auth_data: anyOf: - $ref: '#/components/schemas/AuthData' - type: 'null' description: Optional additional authentication data for the connector. system_prompt: anyOf: - type: string - type: 'null' title: System Prompt description: Optional system prompt for the connector. title: ConnectorMCPCreate required: - name - description - server ConnectorMCPUpdate: type: object properties: name: anyOf: - type: string - type: 'null' title: Name description: The name of the connector. description: anyOf: - type: string - type: 'null' title: Description description: The description of the connector. icon_url: anyOf: - type: string - type: 'null' title: Icon Url description: The optional url of the icon you want to associate to the connector. system_prompt: anyOf: - type: string - type: 'null' title: System Prompt description: Optional system prompt for the connector. connection_config: anyOf: - type: object additionalProperties: true - type: 'null' title: Connection Config description: Optional new connection config. connection_secrets: anyOf: - type: object additionalProperties: true - type: 'null' title: Connection Secrets description: Optional new connection secrets server: anyOf: - type: string maxLength: 2083 minLength: 1 format: uri - type: 'null' title: Server description: New server url for your mcp connector. headers: anyOf: - type: object additionalProperties: true - type: 'null' title: Headers description: New headers for your mcp connector. auth_data: anyOf: - $ref: '#/components/schemas/AuthData' - type: 'null' description: New authentication data for your mcp connector. title: ConnectorMCPUpdate ConnectorSupportedLanguage: type: string title: ConnectorSupportedLanguage enum: - en - fr - ar - es - de - pl - pt-BR - it - nl ConnectorsQueryFilters: type: object properties: active: anyOf: - type: boolean - type: 'null' title: Active description: Filter for active connectors for a given user, workspace and organization. fetch_connection_secrets: type: boolean title: Fetch Connection Secrets description: Fetch connection secrets. default: false title: ConnectorsQueryFilters EmbeddedResource: type: object properties: type: type: string title: Type const: resource resource: anyOf: - $ref: '#/components/schemas/TextResourceContents' - $ref: '#/components/schemas/BlobResourceContents' title: Resource annotations: anyOf: - $ref: '#/components/schemas/Annotations' - type: 'null' _meta: anyOf: - type: object additionalProperties: true - type: 'null' title: Meta title: EmbeddedResource required: - type - resource additionalProperties: true description: 'The contents of a resource, embedded into a prompt or tool call result. It is up to the client how best to render embedded resources for the benefit of the LLM and/or the user.' ExecutionConfig: type: object properties: type: type: string title: Type title: ExecutionConfig required: - type additionalProperties: true description: 'Not typed since mcp config can changed / not stable we allow all extra fields and this is a dict TODO: once mcp is stable, we need to type this' ImageContent: type: object properties: type: type: string title: Type const: image data: type: string title: Data mimeType: type: string title: Mimetype annotations: anyOf: - $ref: '#/components/schemas/Annotations' - type: 'null' _meta: anyOf: - type: object additionalProperties: true - type: 'null' title: Meta title: ImageContent required: - type - data - mimeType additionalProperties: true description: Image content for a message. MCPResultMetadata: type: object properties: isError: type: boolean title: Iserror default: false structuredContent: anyOf: - type: object additionalProperties: true - type: 'null' title: Structuredcontent _meta: anyOf: - type: object additionalProperties: true - type: 'null' title: Meta title: MCPResultMetadata additionalProperties: true description: MCP-specific result metadata (isError, structuredContent, _meta). MCPToolCallMetadata: type: object properties: mcp_meta: anyOf: - $ref: '#/components/schemas/MCPResultMetadata' - type: 'null' title: MCPToolCallMetadata additionalProperties: true description: 'Metadata wrapper for MCP tool call responses. Nests MCP-specific fields under `mcp_meta` to avoid collisions with other metadata keys (e.g. `tool_call_result`) in Harmattan''s streaming deltas.' MCPToolCallRequest: type: object properties: arguments: type: object title: Arguments additionalProperties: true title: MCPToolCallRequest description: Request body for calling an MCP tool. MCPToolCallResponse: type: object properties: content: type: array items: anyOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/ImageContent' - $ref: '#/components/schemas/AudioContent' - $ref: '#/components/schemas/ResourceLink' - $ref: '#/components/schemas/EmbeddedResource' title: Content metadata: anyOf: - $ref: '#/components/schemas/MCPToolCallMetadata' - type: 'null' title: MCPToolCallResponse required: - content additionalProperties: true description: 'Response from calling an MCP tool. We override mcp_types.CallToolResult because: - Models only support `content`, not `structuredContent` at top level - Downstream consumers (le-chat, etc.) need structuredContent/isError/_meta via metadata SYNC: Keep in sync with Harmattan (orchestrator) for harmonized tool result processing.' MessageResponse: type: object properties: message: type: string title: Message title: MessageResponse required: - message PaginationResponse: type: object properties: next_cursor: anyOf: - type: string - type: 'null' title: Next Cursor page_size: type: integer title: Page Size title: PaginationResponse required: - page_size ResourceLink: type: object properties: name: type: string title: Name title: anyOf: - type: string - type: 'null' title: Title uri: type: string title: Uri minLength: 1 format: uri description: anyOf: - type: string - type: 'null' title: Description mimeType: anyOf: - type: string - type: 'null' title: Mimetype size: anyOf: - type: integer - type: 'null' title: Size icons: anyOf: - type: array items: $ref: '#/components/schemas/MCPServerIcon' - type: 'null' title: Icons annotations: anyOf: - $ref: '#/components/schemas/Annotations' - type: 'null' _meta: anyOf: - type: object additionalProperties: true - type: 'null' title: Meta type: type: string title: Type const: resource_link title: ResourceLink required: - name - uri - type additionalProperties: true description: 'A resource that the server is capable of reading, included in a prompt or tool call result. Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.' ResourceVisibility: type: string title: ResourceVisibility enum: - shared_global - shared_org - shared_workspace - private TextContent: type: object properties: type: type: string title: Type const: text text: type: string title: Text annotations: anyOf: - $ref: '#/components/schemas/Annotations' - type: 'null' _meta: anyOf: - type: object additionalProperties: true - type: 'null' title: Meta title: TextContent required: - type - text additionalProperties: true description: Text content for a message. TextResourceContents: type: object properties: uri: type: string title: Uri minLength: 1 format: uri mimeType: anyOf: - type: string - type: 'null' title: Mimetype _meta: anyOf: - type: object additionalProperties: true - type: 'null' title: Meta text: type: string title: Text title: TextResourceContents required: - uri - text additionalProperties: true description: Text contents of a resource. integrations__schemas__api__tool__Tool: type: object properties: id: type: string title: Id name: type: string title: Name description: type: string title: Description system_prompt: anyOf: - type: string - type: 'null' title: System Prompt locale: anyOf: - $ref: '#/components/schemas/integrations__schemas__turbine__ToolLocale' - type: 'null' jsonschema: anyOf: - type: object additionalProperties: true - type: 'null' title: Jsonschema execution_config: anyOf: - $ref: '#/components/schemas/ExecutionConfig' - type: 'null' visibility: $ref: '#/components/schemas/ResourceVisibility' created_at: type: string title: Created At format: date-time modified_at: type: string title: Modified At format: date-time active: anyOf: - type: boolean - type: 'null' title: Active title: Tool required: - id - name - description - execution_config - visibility - created_at - modified_at integrations__schemas__turbine__ToolLocale: type: object properties: name: type: object propertyNames: $ref: '#/components/schemas/ConnectorSupportedLanguage' title: Name additionalProperties: type: string description: type: object propertyNames: $ref: '#/components/schemas/ConnectorSupportedLanguage' title: Description additionalProperties: type: string usage_sentence: type: object propertyNames: $ref: '#/components/schemas/ConnectorSupportedLanguage' title: Usage Sentence additionalProperties: type: string title: ToolLocale required: - name - description - usage_sentence PaginatedConnectors: type: object properties: items: type: array items: $ref: '#/components/schemas/Connector' title: Items pagination: $ref: '#/components/schemas/PaginationResponse' title: PaginatedConnectors required: - items - pagination MCPServerIcon: type: object properties: src: type: string title: Src mimeType: anyOf: - type: string - type: 'null' title: Mimetype sizes: anyOf: - type: array items: type: string - type: 'null' title: Sizes title: MCPServerIcon required: - src additionalProperties: true description: An icon for display in user interfaces. CompletionEvent: title: CompletionEvent type: object required: - data properties: data: $ref: '#/components/schemas/CompletionChunk' CompletionChunk: title: CompletionChunk type: object required: - id - model - choices properties: id: type: string object: type: string created: type: integer model: type: string usage: $ref: '#/components/schemas/UsageInfo' choices: type: array items: $ref: '#/components/schemas/CompletionResponseStreamChoice' CompletionResponseStreamChoice: title: CompletionResponseStreamChoice type: object required: - index - delta - finish_reason properties: index: type: integer delta: $ref: '#/components/schemas/DeltaMessage' finish_reason: type: - string - 'null' enum: - stop - length - error - tool_calls - null ResponseBase: type: object title: ResponseBase properties: id: type: string example: cmpl-e5cc70bb28c444948073e77776eb30ef object: type: string example: chat.completion model: type: string example: mistral-small-latest usage: $ref: '#/components/schemas/UsageInfo' ChatCompletionChoice: title: ChatCompletionChoice type: object required: - index - finish_reason - message properties: index: type: integer example: 0 message: $ref: '#/components/schemas/AssistantMessage' finish_reason: type: string enum: - stop - length - model_length - error - tool_calls example: stop DeltaMessage: title: DeltaMessage type: object properties: role: anyOf: - type: string - type: 'null' content: anyOf: - type: string - type: 'null' - items: $ref: '#/components/schemas/ContentChunk' type: array tool_calls: anyOf: - type: 'null' - type: array items: $ref: '#/components/schemas/ToolCall' ChatCompletionResponseBase: allOf: - $ref: '#/components/schemas/ResponseBase' - type: object title: ChatCompletionResponseBase properties: created: type: integer example: 1702256327 ChatCompletionResponse: allOf: - $ref: '#/components/schemas/ChatCompletionResponseBase' - type: object title: ChatCompletionResponse properties: choices: type: array items: $ref: '#/components/schemas/ChatCompletionChoice' required: - id - object - data - model - usage - created - choices FIMCompletionResponse: allOf: - $ref: '#/components/schemas/ChatCompletionResponse' - type: object properties: model: type: string example: codestral-latest EmbeddingResponseData: title: EmbeddingResponseData type: object properties: object: type: string example: embedding embedding: type: array items: type: number example: - 0.1 - 0.2 - 0.3 index: type: integer example: 0 examples: - object: embedding embedding: - 0.1 - 0.2 - 0.3 index: 0 - object: embedding embedding: - 0.4 - 0.5 - 0.6 index: 1 EmbeddingResponse: allOf: - $ref: '#/components/schemas/ResponseBase' - type: object properties: data: type: array items: $ref: '#/components/schemas/EmbeddingResponseData' required: - id - object - data - model - usage securitySchemes: ApiKey: type: http scheme: bearer tags: - name: chat x-displayName: Chat description: Chat Completion API. - name: fim x-displayName: FIM description: Fill-in-the-middle API. - name: agents x-displayName: Agents description: Agents API. - name: embeddings x-displayName: Embeddings description: Embeddings API. - name: classifiers x-displayName: Classifiers description: Classifiers API. - name: files x-displayName: Files description: Files API - name: deprecated.agents x-displayName: (deprecated) Agents description: (deprecated) Agents completion API - name: deprecated.fine-tuning x-displayName: (deprecated) Fine Tuning description: (deprecated) Fine-tuning API - name: models x-displayName: Models description: Model Management API - name: batch x-displayName: Batch description: Batch API - name: ocr x-displayName: OCR API description: OCR API - name: audio.transcriptions x-displayName: Transcriptions API description: API for audio transcription. - name: audio.speech x-displayName: Speech API description: API for text-to-speech generation. - name: audio.voices x-displayName: Voices API description: API for managing custom voice profiles. - name: beta.agents x-displayName: (beta) Agents API description: (beta) Agents API - name: beta.conversations x-displayName: (beta) Conversations API description: (beta) Conversations API - name: beta.libraries x-displayName: (beta) Libraries API - Main description: (beta) Libraries API to create and manage libraries - index your documents to enhance agent capabilities. - name: beta.libraries.documents x-displayName: (beta) Libraries API - Documents description: (beta) Libraries API - manage documents in a library. - name: beta.libraries.accesses x-displayName: (beta) Libraries API - Access description: (beta) Libraries API - manage access to a library. security: - ApiKey: [] servers: - url: https://api.mistral.ai description: Production server