EricLBuehler / mistral.rs
Fast, flexible LLM inference
Mistral.rs Specification
Located in docs/openapi.json on branch HEAD
3.1.0
JSON
36 Endpoints
224.3 KB
Operations & Route Endpoints (43)
Raw JSON Specification
{
"openapi": "3.1.0",
"info": {
"title": "Mistral.rs",
"description": "Fast, flexible LLM inference.",
"contact": {
"name": "Eric Buehler"
},
"license": {
"name": "MIT"
},
"version": "0.9.1"
},
"paths": {
"/calibration/apply": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "calibration_apply",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CalibrationApplyRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Requantize with collected statistics and hot-swap the layers.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CalibrationStatus"
}
}
}
}
}
}
},
"/calibration/start": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "calibration_start",
"responses": {
"200": {
"description": "Begin collecting activation statistics from live traffic.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CalibrationStatus"
}
}
}
}
}
}
},
"/calibration/status": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "calibration_status",
"responses": {
"200": {
"description": "Per-layer calibration collection progress.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CalibrationStatus"
}
}
}
}
}
}
},
"/health": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "health",
"responses": {
"200": {
"description": "Server is healthy"
}
}
}
},
"/metrics": {
"get": {
"tags": [
"Mistral.rs"
],
"summary": "Axum handler for `GET /metrics`. Renders the Prometheus exposition format.",
"operationId": "metrics",
"responses": {
"200": {
"description": "Prometheus text exposition format",
"content": {
"text/plain": {}
}
},
"503": {
"description": "Metrics recorder not initialized or metrics disabled"
}
}
}
},
"/re_isq": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "re_isq",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReIsqRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Reapply ISQ to a model that was loaded with ISQ."
}
}
}
},
"/v1/agent/approvals/{approval_id}": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "resolve_agent_approval",
"parameters": [
{
"name": "approval_id",
"in": "path",
"description": "Approval ID from the approval-required SSE event",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApprovalDecisionRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Decision applied or queued",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApprovalDecisionResponse"
}
}
}
},
"404": {
"description": "Unknown approval ID",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApprovalDecisionResponse"
}
}
}
}
}
}
},
"/v1/audio/speech": {
"post": {
"tags": [
"Mistral.rs"
],
"summary": "Speech generation endpoint handler.",
"operationId": "speech_generation",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SpeechGenerationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Speech generation"
}
}
}
},
"/v1/chat/completions": {
"post": {
"tags": [
"Mistral.rs"
],
"summary": "OpenAI-compatible chat completions endpoint handler.",
"operationId": "chatcompletions",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatCompletionRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Chat completion JSON or server-sent event chunks",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatCompletionResponse"
}
},
"text/event-stream": {
"schema": {
"$ref": "#/components/schemas/ChatCompletionChunkResponse"
}
}
}
}
}
}
},
"/v1/completions": {
"post": {
"tags": [
"Mistral.rs"
],
"summary": "OpenAI-compatible completions endpoint handler.",
"operationId": "completions",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompletionRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Completion JSON or server-sent event chunks",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompletionResponse"
}
},
"text/event-stream": {
"schema": {
"$ref": "#/components/schemas/CompletionChunkResponse"
}
}
}
}
}
}
},
"/v1/containers/{container_id}/files": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "list_container_files",
"parameters": [
{
"name": "container_id",
"in": "path",
"description": "Container ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "List of container file metadata",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ContainerFileMetadata"
}
}
}
}
}
}
}
},
"/v1/containers/{container_id}/files/{file_id}": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "get_container_file",
"parameters": [
{
"name": "container_id",
"in": "path",
"description": "Container ID",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "file_id",
"in": "path",
"description": "File ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Container file metadata",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContainerFileMetadata"
}
}
}
},
"404": {
"description": "File not found or expired"
}
}
}
},
"/v1/containers/{container_id}/files/{file_id}/content": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "get_container_file_content",
"parameters": [
{
"name": "container_id",
"in": "path",
"description": "Container ID",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "file_id",
"in": "path",
"description": "File ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Raw file bytes with the file's MIME type"
},
"404": {
"description": "File not found or expired"
},
"410": {
"description": "File body was elided and is no longer fetchable"
}
}
}
},
"/v1/embeddings": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "embeddings",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbeddingRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Embeddings",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbeddingResponse"
}
}
}
}
}
}
},
"/v1/files": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "list_files",
"responses": {
"200": {
"description": "List of file metadata",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FileMetadata"
}
}
}
}
}
}
},
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "upload_file",
"requestBody": {
"content": {
"multipart/form-data": {}
}
},
"responses": {
"200": {
"description": "Uploaded file metadata",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FileMetadata"
}
}
}
},
"400": {
"description": "Invalid upload"
}
}
}
},
"/v1/files/{id}": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "get_file",
"parameters": [
{
"name": "id",
"in": "path",
"description": "File ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "File metadata",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FileMetadata"
}
}
}
},
"404": {
"description": "File not found or expired"
}
}
},
"delete": {
"tags": [
"Mistral.rs"
],
"operationId": "delete_file",
"parameters": [
{
"name": "id",
"in": "path",
"description": "File ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "File deleted"
},
"404": {
"description": "File not found or expired"
}
}
}
},
"/v1/files/{id}/content": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "get_file_content",
"parameters": [
{
"name": "id",
"in": "path",
"description": "File ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Raw file bytes with the file's MIME type"
},
"404": {
"description": "File not found or expired"
},
"410": {
"description": "File body was elided and is no longer fetchable"
}
}
}
},
"/v1/images/generations": {
"post": {
"tags": [
"Mistral.rs"
],
"summary": "Image generation endpoint handler.",
"operationId": "image_generation",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ImageGenerationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Image generation"
}
}
}
},
"/v1/load_lora_adapter": {
"post": {
"tags": [
"LoRA adapters"
],
"description": "Registered only when runtime LoRA mutation is enabled. CLI servers enable it with MISTRALRS_ALLOW_RUNTIME_LORA_UPDATING.",
"operationId": "load_lora_adapter",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoadLoraAdapterRequest"
},
"example": {
"lora_name": "production",
"lora_path": "/srv/adapters/production"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "LoRA adapter loaded",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterObject"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"403": {
"description": "Adapter path is not allowed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"404": {
"description": "Model or adapter path was not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"409": {
"description": "LoRA runtime is unavailable or at capacity",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"413": {
"description": "Adapter input files exceed the configured safety limit",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"415": {
"description": "Request content type is not JSON",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"422": {
"description": "Adapter files are invalid or unsupported",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"429": {
"description": "Another adapter load is already in progress",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"500": {
"description": "Adapter loading task failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"503": {
"description": "Adapter storage or model device is unavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
}
}
}
},
"/v1/lora_adapters": {
"get": {
"tags": [
"LoRA adapters"
],
"description": "Always registered for adapter discovery and status, even when runtime LoRA mutation is disabled.",
"operationId": "list_lora_adapters",
"parameters": [
{
"name": "model",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Loaded LoRA adapters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterListResponse"
}
}
}
},
"400": {
"description": "Invalid query",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"404": {
"description": "Model was not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"409": {
"description": "LoRA runtime is unavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
}
}
}
},
"/v1/messages": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "anthropic_messages",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnthropicMessagesRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Anthropic messages",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnthropicMessageResponse"
}
}
}
}
}
}
},
"/v1/messages/count_tokens": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "anthropic_count_tokens",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnthropicMessagesRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Anthropic message token count",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnthropicCountTokensResponse"
}
}
}
}
}
}
},
"/v1/models": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "models",
"responses": {
"200": {
"description": "Served model info",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelObjects"
}
}
}
}
}
}
},
"/v1/models/reload": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "reload_model",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelOperationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Model reloaded successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelStatusResponse"
}
}
}
},
"400": {
"description": "Failed to reload model",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelStatusResponse"
}
}
}
}
}
}
},
"/v1/models/status": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "get_model_status",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelOperationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Model status",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelStatusResponse"
}
}
}
},
"404": {
"description": "Model not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelStatusResponse"
}
}
}
}
}
}
},
"/v1/models/tune": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "tune_model",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TuneModelRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Auto-tune result with recommended settings"
},
"500": {
"description": "Tuning failed"
}
}
}
},
"/v1/models/unload": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "unload_model",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelOperationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Model unloaded successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelStatusResponse"
}
}
}
},
"400": {
"description": "Failed to unload model",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelStatusResponse"
}
}
}
}
}
}
},
"/v1/responses": {
"post": {
"tags": [
"Mistral.rs"
],
"summary": "Create response endpoint - OpenResponses API",
"operationId": "create_response",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OpenResponsesCreateRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Response resource or server-sent response events",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseResource"
}
},
"text/event-stream": {
"schema": {
"$ref": "#/components/schemas/OpenResponsesStreamEvent"
}
}
}
}
}
}
},
"/v1/responses/{response_id}": {
"get": {
"tags": [
"Mistral.rs"
],
"summary": "Get response by ID endpoint",
"operationId": "get_response",
"parameters": [
{
"name": "response_id",
"in": "path",
"description": "The ID of the response to retrieve",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Response object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseResource"
}
}
}
}
}
},
"delete": {
"tags": [
"Mistral.rs"
],
"summary": "Delete response by ID endpoint",
"operationId": "delete_response",
"parameters": [
{
"name": "response_id",
"in": "path",
"description": "The ID of the response to delete",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Response deleted"
}
}
}
},
"/v1/responses/{response_id}/cancel": {
"post": {
"tags": [
"Mistral.rs"
],
"summary": "Cancel response endpoint",
"operationId": "cancel_response",
"parameters": [
{
"name": "response_id",
"in": "path",
"description": "The ID of the response to cancel",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Response cancelled",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseResource"
}
}
}
}
}
}
},
"/v1/sessions/{session_id}": {
"get": {
"tags": [
"Mistral.rs"
],
"summary": "GET `/v1/sessions/{session_id}`. 404 if the session doesn't exist.",
"operationId": "get_session",
"parameters": [
{
"name": "session_id",
"in": "path",
"description": "Session ID to export",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Serialized agentic session",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SerializedSession"
}
}
}
},
"404": {
"description": "Session not found"
}
}
},
"put": {
"tags": [
"Mistral.rs"
],
"summary": "PUT `/v1/sessions/{session_id}`. Replaces any existing session.",
"operationId": "put_session",
"parameters": [
{
"name": "session_id",
"in": "path",
"description": "Session ID to import as",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SerializedSession"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Session imported"
},
"400": {
"description": "Invalid session payload"
}
}
},
"delete": {
"tags": [
"Mistral.rs"
],
"summary": "DELETE `/v1/sessions/{session_id}`. Idempotent: returns 200 either way.",
"operationId": "delete_session",
"parameters": [
{
"name": "session_id",
"in": "path",
"description": "Session ID to delete",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Session deleted (or did not exist)"
}
}
}
},
"/v1/skills": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "list_skills",
"responses": {
"200": {
"description": "Uploaded skills",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SkillListObject"
}
}
}
}
}
},
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "upload_skill",
"responses": {
"200": {
"description": "Skill uploaded",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SkillObject"
}
}
}
}
}
}
},
"/v1/skills/{skill_id}/versions": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "list_skill_versions",
"responses": {
"200": {
"description": "Skill versions",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnthropicSkillVersionListObject"
}
}
}
}
}
},
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "upload_skill_version",
"responses": {
"200": {
"description": "Skill version uploaded",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SkillVersionObject"
}
}
}
}
}
}
},
"/v1/system/doctor": {
"post": {
"tags": [
"Mistral.rs"
],
"operationId": "system_doctor",
"responses": {
"200": {
"description": "Environment diagnostics report"
}
}
}
},
"/v1/system/info": {
"get": {
"tags": [
"Mistral.rs"
],
"operationId": "system_info",
"responses": {
"200": {
"description": "Host, device, and build information"
}
}
}
},
"/v1/unload_lora_adapter": {
"post": {
"tags": [
"LoRA adapters"
],
"description": "Registered only when runtime LoRA mutation is enabled. CLI servers enable it with MISTRALRS_ALLOW_RUNTIME_LORA_UPDATING.",
"operationId": "unload_lora_adapter",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnloadLoraAdapterRequest"
},
"example": {
"lora_name": "production"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "LoRA adapter unloaded",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterObject"
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"404": {
"description": "Model or adapter was not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"409": {
"description": "LoRA runtime is unavailable",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"413": {
"description": "Request body exceeds the configured limit",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"415": {
"description": "Request content type is not JSON",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"422": {
"description": "Request body is invalid",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoraAdapterErrorResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"AdapterGenerationSelection": {
"type": "object",
"description": "An exact immutable LoRA adapter generation.",
"required": [
"generation"
],
"properties": {
"generation": {
"type": "string",
"description": "The 64-character hexadecimal generation ID returned by the adapter management API.",
"example": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a"
}
}
},
"AdapterSelection": {
"oneOf": [
{
"type": "string",
"description": "Resolve this alias when the request is admitted."
},
{
"$ref": "#/components/schemas/AdapterGenerationSelection",
"description": "Pin this exact resident generation."
}
],
"description": "A request-scoped LoRA adapter alias or exact immutable generation."
},
"AllowedToolChoice": {
"oneOf": [
{
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"function"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"web_search_preview"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"code_interpreter"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"shell"
]
}
}
}
]
},
"AllowedToolsMode": {
"type": "string",
"enum": [
"auto",
"required"
]
},
"AllowedToolsToolChoice": {
"type": "object",
"required": [
"type",
"mode",
"tools"
],
"properties": {
"mode": {
"$ref": "#/components/schemas/AllowedToolsMode"
},
"tools": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AllowedToolChoice"
}
},
"type": {
"$ref": "#/components/schemas/AllowedToolsToolChoiceType"
}
}
},
"AllowedToolsToolChoiceType": {
"type": "string",
"enum": [
"allowed_tools"
]
},
"AnthropicContainer": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AnthropicSkillReference"
}
}
}
},
"AnthropicContentBlock": {
"type": "object",
"required": [
"type"
],
"properties": {
"cache_control": {
"type": [
"object",
"null"
]
},
"citations": {
"type": [
"object",
"null"
]
},
"content": {
"type": [
"object",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"input": {
"type": [
"object",
"null"
]
},
"is_error": {
"type": [
"boolean",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"signature": {
"type": [
"string",
"null"
]
},
"source": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AnthropicImageSource"
}
]
},
"text": {
"type": [
"string",
"null"
]
},
"thinking": {
"type": [
"string",
"null"
]
},
"tool_use_id": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
}
},
"AnthropicCountTokensResponse": {
"type": "object",
"required": [
"input_tokens"
],
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0
}
}
},
"AnthropicError": {
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"$ref": "#/components/schemas/AnthropicErrorBody"
},
"type": {
"type": "string"
}
}
},
"AnthropicErrorBody": {
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"AnthropicImageSource": {
"type": "object",
"required": [
"type"
],
"properties": {
"data": {
"type": [
"string",
"null"
]
},
"media_type": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
},
"url": {
"type": [
"string",
"null"
]
}
}
},
"AnthropicMessage": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"content": {
"$ref": "#/components/schemas/AnthropicMessageContent"
},
"role": {
"type": "string"
}
}
},
"AnthropicMessageContent": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/AnthropicContentBlock"
}
}
]
},
"AnthropicMessageResponse": {
"type": "object",
"required": [
"id",
"content",
"model",
"stop_reason",
"usage"
],
"properties": {
"content": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AnthropicResponseContentBlock"
}
},
"files": {
"type": [
"array",
"null"
],
"items": {}
},
"id": {
"type": "string"
},
"model": {
"type": "string"
},
"role": {
"type": "string"
},
"session_id": {
"type": [
"string",
"null"
]
},
"stop_reason": {
"type": "string"
},
"stop_sequence": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
},
"usage": {
"$ref": "#/components/schemas/AnthropicUsage"
}
}
},
"AnthropicMessagesRequest": {
"type": "object",
"required": [
"messages"
],
"properties": {
"agent_permission": {
"type": [
"string",
"null"
],
"example": null
},
"code_execution_permission": {
"type": [
"string",
"null"
],
"example": null
},
"container": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AnthropicContainer"
}
]
},
"dry_allowed_length": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"dry_base": {
"type": [
"number",
"null"
],
"format": "float"
},
"dry_multiplier": {
"type": [
"number",
"null"
],
"format": "float"
},
"dry_sequence_breakers": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"enable_code_execution": {
"type": "boolean"
},
"enable_thinking": {
"type": [
"boolean",
"null"
],
"description": "mistral.rs extension for toggling reasoning."
},
"files": {
"type": [
"array",
"null"
],
"items": {}
},
"frequency_penalty": {
"type": [
"number",
"null"
],
"format": "float"
},
"grammar": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/Grammar"
}
]
},
"logit_bias": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "number",
"format": "float"
},
"propertyNames": {
"type": "integer",
"format": "int32",
"minimum": 0
}
},
"logprobs": {
"type": "boolean"
},
"max_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"max_tool_rounds": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AnthropicMessage"
}
},
"metadata": {
"type": [
"object",
"null"
]
},
"min_p": {
"type": [
"number",
"null"
],
"format": "double"
},
"model": {
"type": "string"
},
"presence_penalty": {
"type": [
"number",
"null"
],
"format": "float"
},
"reasoning_effort": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ReasoningEffort",
"description": "mistral.rs extension accepting off, low, medium, high, or xhigh. \"none\" aliases \"off\"."
}
]
},
"repetition_penalty": {
"type": [
"number",
"null"
],
"format": "float"
},
"response_format": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponseFormat"
}
]
},
"session_id": {
"type": [
"string",
"null"
]
},
"stop_sequences": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"stream": {
"type": [
"boolean",
"null"
]
},
"system": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AnthropicSystem"
}
]
},
"temperature": {
"type": [
"number",
"null"
],
"format": "double"
},
"thinking": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AnthropicThinking"
}
]
},
"tool_choice": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AnthropicToolChoice"
}
]
},
"tools": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/AnthropicTool"
}
},
"top_k": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"top_logprobs": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"top_p": {
"type": [
"number",
"null"
],
"format": "double"
},
"truncate_sequence": {
"type": [
"boolean",
"null"
]
},
"web_search_options": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/WebSearchOptions"
}
]
}
}
},
"AnthropicResponseContentBlock": {
"type": "object",
"required": [
"type"
],
"properties": {
"id": {
"type": [
"string",
"null"
]
},
"input": {
"type": [
"object",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"text": {
"type": [
"string",
"null"
]
},
"thinking": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
}
},
"AnthropicSkillListObject": {
"type": "object",
"required": [
"data",
"has_more"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AnthropicSkillObject"
}
},
"has_more": {
"type": "boolean"
},
"next_page": {
"type": [
"string",
"null"
]
}
}
},
"AnthropicSkillObject": {
"type": "object",
"required": [
"id",
"type",
"created_at",
"updated_at",
"display_title",
"latest_version",
"source"
],
"properties": {
"created_at": {
"type": "string"
},
"display_title": {
"type": "string"
},
"id": {
"type": "string"
},
"latest_version": {
"type": "string"
},
"source": {
"type": "string"
},
"type": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"AnthropicSkillReference": {
"type": "object",
"required": [
"type",
"skill_id"
],
"properties": {
"skill_id": {
"type": "string"
},
"type": {
"type": "string"
},
"version": {}
}
},
"AnthropicSkillVersionListObject": {
"type": "object",
"required": [
"data",
"has_more"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AnthropicSkillVersionObject"
}
},
"has_more": {
"type": "boolean"
},
"next_page": {
"type": [
"string",
"null"
]
}
}
},
"AnthropicSkillVersionObject": {
"type": "object",
"required": [
"id",
"type",
"skill_id",
"created_at",
"version",
"name",
"description",
"directory"
],
"properties": {
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"directory": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"skill_id": {
"type": "string"
},
"type": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"AnthropicSystem": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/AnthropicContentBlock"
}
}
]
},
"AnthropicThinking": {
"type": "object",
"required": [
"type"
],
"properties": {
"budget_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"type": {
"type": "string"
}
}
},
"AnthropicTool": {
"type": "object",
"properties": {
"allowed_domains": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"blocked_domains": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"description": {
"type": [
"string",
"null"
]
},
"input_schema": {
"type": [
"object",
"null"
]
},
"max_uses": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"name": {
"type": [
"string",
"null"
]
},
"type": {
"type": [
"string",
"null"
]
},
"user_location": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AnthropicWebSearchUserLocation"
}
]
}
}
},
"AnthropicToolChoice": {
"type": "object",
"required": [
"type"
],
"properties": {
"name": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
}
},
"AnthropicUsage": {
"type": "object",
"required": [
"input_tokens",
"output_tokens"
],
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0
},
"output_tokens": {
"type": "integer",
"minimum": 0
}
}
},
"AnthropicWebSearchUserLocation": {
"type": "object",
"required": [
"type"
],
"properties": {
"city": {
"type": [
"string",
"null"
]
},
"country": {
"type": [
"string",
"null"
]
},
"region": {
"type": [
"string",
"null"
]
},
"timezone": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
}
},
"ApprovalDecision": {
"type": "string",
"enum": [
"approve",
"deny"
]
},
"ApprovalDecisionRequest": {
"type": "object",
"description": "Decision payload for a pending agentic tool approval.",
"required": [
"decision"
],
"properties": {
"decision": {
"$ref": "#/components/schemas/ApprovalDecision"
},
"message": {
"type": [
"string",
"null"
],
"description": "Optional note passed back to the model on denial."
},
"remember_for_session": {
"type": "boolean",
"description": "Auto-approve all later tool calls in the same session."
}
}
},
"ApprovalDecisionResponse": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"description": "\"resolved\", \"queued\", or \"not_found\"."
}
}
},
"ApproximateUserLocation": {
"type": "object",
"properties": {
"city": {
"type": [
"string",
"null"
]
},
"country": {
"type": [
"string",
"null"
]
},
"region": {
"type": [
"string",
"null"
]
},
"timezone": {
"type": [
"string",
"null"
]
}
}
},
"AudioResponseFormat": {
"type": "string",
"description": "Audio format options for speech generation responses.",
"enum": [
"mp3",
"opus",
"aac",
"flac",
"wav",
"pcm"
]
},
"BuiltinToolChoice": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"$ref": "#/components/schemas/BuiltinToolChoiceType"
}
}
},
"BuiltinToolChoiceType": {
"type": "string",
"enum": [
"web_search_preview",
"code_interpreter",
"shell"
]
},
"CalibrationApplyRequest": {
"type": "object",
"description": "Request body for applying online calibration.",
"properties": {
"save_cimatrix": {
"type": [
"string",
"null"
],
"description": "Optionally save the collected imatrix to this `.cimatrix` path before requantizing."
}
}
},
"CalibrationStatus": {
"type": "object",
"required": [
"collecting",
"layers",
"layers_tracking",
"total_rows",
"min_rows",
"max_rows"
],
"properties": {
"collecting": {
"type": "boolean"
},
"layers": {
"type": "integer",
"minimum": 0
},
"layers_tracking": {
"type": "integer",
"minimum": 0
},
"max_rows": {
"type": "integer",
"minimum": 0
},
"min_rows": {
"type": "integer",
"minimum": 0
},
"total_rows": {
"type": "integer",
"minimum": 0
}
}
},
"ChatCompletionChunkChoice": {
"type": "object",
"required": [
"index",
"delta"
],
"properties": {
"delta": {
"$ref": "#/components/schemas/ChatCompletionChunkDelta"
},
"finish_reason": {
"type": [
"string",
"null"
]
},
"index": {
"type": "integer",
"minimum": 0
},
"logprobs": {}
}
},
"ChatCompletionChunkDelta": {
"type": "object",
"required": [
"role"
],
"properties": {
"content": {
"type": [
"string",
"null"
]
},
"reasoning_content": {
"type": [
"string",
"null"
]
},
"role": {
"type": "string"
},
"tool_calls": {
"type": [
"array",
"null"
],
"items": {}
}
}
},
"ChatCompletionChunkResponse": {
"type": "object",
"required": [
"id",
"choices",
"created",
"model",
"system_fingerprint",
"object"
],
"properties": {
"adapter_generation": {
"type": [
"string",
"null"
]
},
"choices": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ChatCompletionChunkChoice"
}
},
"created": {
"type": "integer",
"minimum": 0
},
"id": {
"type": "string"
},
"model": {
"type": "string"
},
"object": {
"type": "string"
},
"session_id": {
"type": [
"string",
"null"
]
},
"system_fingerprint": {
"type": "string"
},
"usage": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/CompletionUsageResponse"
}
]
}
}
},
"ChatCompletionRequest": {
"type": "object",
"description": "Chat completion request following OpenAI's specification",
"required": [
"messages"
],
"properties": {
"adapter": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AdapterSelection",
"description": "Adapter alias or exact generation to activate for this request."
}
]
},
"agent_permission": {
"type": [
"string",
"null"
],
"description": "Permission policy for agentic tools.",
"example": null
},
"code_execution_permission": {
"type": [
"string",
"null"
],
"description": "Permission policy for code execution.",
"example": null
},
"dry_allowed_length": {
"type": [
"integer",
"null"
],
"description": "Longest repeated sequence DRY leaves unpenalized.",
"example": null,
"minimum": 0
},
"dry_base": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Base for DRY's exponential penalty growth.",
"example": null
},
"dry_multiplier": {
"type": [
"number",
"null"
],
"format": "float",
"description": "DRY repetition penalty multiplier; 0 disables DRY.",
"example": null
},
"dry_sequence_breakers": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"description": "Sequences that reset DRY repetition matching.",
"example": null
},
"enable_shell": {
"type": "boolean",
"description": "Enable the built-in shell execution tool.",
"example": false
},
"enable_thinking": {
"type": [
"boolean",
"null"
],
"description": "Toggle thinking output for models that support it.",
"example": null
},
"files": {
"type": [
"array",
"null"
],
"items": {},
"description": "Required output files. The runtime asks the model to produce them and surfaces a `File` (or error placeholder) for each."
},
"frequency_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Penalize tokens by how often they have appeared so far; positive values reduce repetition.",
"example": null
},
"grammar": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/Grammar",
"description": "Constrain output with a regex, JSON schema, Lark, or LLGuidance grammar."
}
]
},
"ignore_eos": {
"type": "boolean",
"description": "Ignore model EOS tokens while still honoring explicit stops and the token limit.",
"example": false
},
"logit_bias": {
"type": [
"object",
"null"
],
"description": "Bias added to the logits of these token IDs before sampling.",
"additionalProperties": {
"type": "number",
"format": "float"
},
"propertyNames": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"example": null
},
"logprobs": {
"type": "boolean",
"description": "Return log probabilities of the output tokens.",
"example": false
},
"max_tokens": {
"type": [
"integer",
"null"
],
"description": "Maximum number of tokens to generate.",
"example": 256,
"minimum": 0
},
"max_tool_rounds": {
"type": [
"integer",
"null"
],
"description": "Maximum number of tool-call rounds the server will auto-execute.",
"example": null,
"minimum": 0
},
"messages": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
},
{
"type": "string"
}
]
},
"min_p": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Drop tokens below this fraction of the top token's probability.",
"example": null
},
"model": {
"type": "string",
"description": "Model ID; \"default\" targets the only loaded model.",
"example": "mistral"
},
"n": {
"type": "integer",
"description": "How many choices to generate.",
"example": 1,
"minimum": 0
},
"presence_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Penalize tokens that have already appeared; positive values push toward new topics.",
"example": null
},
"reasoning_effort": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ReasoningEffort",
"description": "Reasoning effort level for models and templates that support it.\nValid values are \"off\", \"low\", \"medium\", \"high\", and \"xhigh\".\n\"none\" is accepted as an alias for \"off\"."
}
]
},
"repetition_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Multiplicative repetition penalty; 1.0 disables it.",
"example": null
},
"response_format": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponseFormat",
"description": "Force plain text or JSON-schema constrained output."
}
]
},
"session_id": {
"type": [
"string",
"null"
],
"description": "Persistent agentic state. If `None`, a new session is created and the ID is returned in the response."
},
"stop": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/StopTokens",
"description": "Sequences where generation stops."
}
]
},
"stream": {
"type": [
"boolean",
"null"
],
"description": "Stream the response as server-sent events.",
"example": true
},
"temperature": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Sampling temperature; higher values increase randomness.",
"example": 0.7
},
"tool_choice": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ToolChoice",
"description": "Controls which (if any) tool the model must call."
}
]
},
"tools": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/OpenAiTool"
},
"description": "Tools the model may call.",
"example": null
},
"top_k": {
"type": [
"integer",
"null"
],
"description": "Sample only from the k most likely tokens.",
"example": null,
"minimum": 0
},
"top_logprobs": {
"type": [
"integer",
"null"
],
"description": "Number of most likely tokens to return per position; requires `logprobs`.",
"example": null,
"minimum": 0
},
"top_p": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Nucleus sampling: only tokens within the top cumulative probability mass are considered.",
"example": null
},
"truncate_sequence": {
"type": [
"boolean",
"null"
],
"description": "Truncate inputs that exceed the model's context length instead of erroring.",
"example": null
},
"web_search_options": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/WebSearchOptions",
"description": "Enable the built-in web search tool."
}
]
}
}
},
"ChatCompletionResponse": {
"type": "object",
"required": [
"id",
"choices",
"created",
"model",
"system_fingerprint",
"object",
"usage"
],
"properties": {
"adapter_generation": {
"type": [
"string",
"null"
]
},
"agentic_tool_calls": {
"type": [
"array",
"null"
],
"items": {}
},
"choices": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ChatCompletionResponseChoice"
}
},
"created": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"files": {
"type": [
"array",
"null"
],
"items": {}
},
"id": {
"type": "string"
},
"model": {
"type": "string"
},
"object": {
"type": "string"
},
"session_id": {
"type": [
"string",
"null"
]
},
"system_fingerprint": {
"type": "string"
},
"usage": {
"$ref": "#/components/schemas/CompletionUsageResponse"
}
}
},
"ChatCompletionResponseChoice": {
"type": "object",
"required": [
"finish_reason",
"index",
"message"
],
"properties": {
"finish_reason": {
"type": "string"
},
"index": {
"type": "integer",
"minimum": 0
},
"logprobs": {},
"message": {
"$ref": "#/components/schemas/ChatCompletionResponseMessage"
}
}
},
"ChatCompletionResponseMessage": {
"type": "object",
"required": [
"role"
],
"properties": {
"content": {
"type": [
"string",
"null"
]
},
"reasoning_content": {
"type": [
"string",
"null"
]
},
"role": {
"type": "string"
},
"tool_calls": {
"type": [
"array",
"null"
],
"items": {}
}
}
},
"CompletionChunkChoice": {
"type": "object",
"required": [
"text",
"index"
],
"properties": {
"finish_reason": {
"type": [
"string",
"null"
]
},
"index": {
"type": "integer",
"minimum": 0
},
"logprobs": {},
"text": {
"type": "string"
}
}
},
"CompletionChunkResponse": {
"type": "object",
"required": [
"id",
"choices",
"created",
"model",
"system_fingerprint",
"object"
],
"properties": {
"adapter_generation": {
"type": [
"string",
"null"
]
},
"choices": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CompletionChunkChoice"
}
},
"created": {
"type": "integer",
"minimum": 0
},
"id": {
"type": "string"
},
"model": {
"type": "string"
},
"object": {
"type": "string"
},
"system_fingerprint": {
"type": "string"
}
}
},
"CompletionRequest": {
"type": "object",
"description": "Legacy OpenAI compatible text completion request",
"required": [
"prompt"
],
"properties": {
"adapter": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AdapterSelection",
"description": "Adapter alias or exact generation to activate for this request."
}
]
},
"best_of": {
"type": [
"integer",
"null"
],
"example": 1,
"minimum": 0
},
"dry_allowed_length": {
"type": [
"integer",
"null"
],
"description": "Longest repeated sequence DRY leaves unpenalized.",
"example": null,
"minimum": 0
},
"dry_base": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Base for DRY's exponential penalty growth.",
"example": null
},
"dry_multiplier": {
"type": [
"number",
"null"
],
"format": "float",
"description": "DRY repetition penalty multiplier; 0 disables DRY.",
"example": null
},
"dry_sequence_breakers": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"description": "Sequences that reset DRY repetition matching.",
"example": null
},
"echo": {
"type": "boolean",
"description": "Echo the prompt back alongside the completion.",
"example": false
},
"frequency_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Penalize tokens by how often they have appeared so far; positive values reduce repetition.",
"example": null
},
"grammar": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/Grammar",
"description": "Constrain output with a regex, JSON schema, Lark, or LLGuidance grammar."
}
]
},
"ignore_eos": {
"type": "boolean",
"description": "Ignore model EOS tokens while still honoring explicit stops and the token limit.",
"example": false
},
"logit_bias": {
"type": [
"object",
"null"
],
"description": "Bias added to the logits of these token IDs before sampling.",
"additionalProperties": {
"type": "number",
"format": "float"
},
"propertyNames": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"example": null
},
"logprobs": {
"type": [
"integer",
"null"
],
"description": "Include log probabilities of this many most likely tokens.",
"example": null,
"minimum": 0
},
"max_tokens": {
"type": [
"integer",
"null"
],
"description": "Maximum number of tokens to generate.",
"example": 16,
"minimum": 0
},
"min_p": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Drop tokens below this fraction of the top token's probability.",
"example": null
},
"model": {
"type": "string",
"description": "Model ID; \"default\" targets the only loaded model.",
"example": "mistral"
},
"n": {
"type": "integer",
"description": "How many choices to generate.",
"example": 1,
"minimum": 0
},
"presence_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Penalize tokens that have already appeared; positive values push toward new topics.",
"example": null
},
"prompt": {
"type": "string",
"example": "Say this is a test."
},
"repetition_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Multiplicative repetition penalty; 1.0 disables it.",
"example": null
},
"stop": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/StopTokens",
"description": "Sequences where generation stops."
}
]
},
"stream": {
"type": [
"boolean",
"null"
],
"description": "Stream the response as server-sent events."
},
"suffix": {
"type": [
"string",
"null"
],
"description": "Text appended after the completion.",
"example": null
},
"temperature": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Sampling temperature; higher values increase randomness.",
"example": 0.7
},
"tool_choice": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ToolChoice",
"description": "Controls which (if any) tool the model must call."
}
]
},
"tools": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/Tool"
},
"description": "Tools the model may call.",
"example": null
},
"top_k": {
"type": [
"integer",
"null"
],
"description": "Sample only from the k most likely tokens.",
"example": null,
"minimum": 0
},
"top_p": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Nucleus sampling: only tokens within the top cumulative probability mass are considered.",
"example": null
},
"truncate_sequence": {
"type": [
"boolean",
"null"
],
"description": "Truncate inputs that exceed the model's context length instead of erroring.",
"example": null
},
"user": {
"type": [
"string",
"null"
]
}
}
},
"CompletionResponse": {
"type": "object",
"required": [
"id",
"choices",
"created",
"model",
"system_fingerprint",
"object",
"usage"
],
"properties": {
"adapter_generation": {
"type": [
"string",
"null"
]
},
"choices": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CompletionResponseChoice"
}
},
"created": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"id": {
"type": "string"
},
"model": {
"type": "string"
},
"object": {
"type": "string"
},
"system_fingerprint": {
"type": "string"
},
"usage": {
"$ref": "#/components/schemas/CompletionUsageResponse"
}
}
},
"CompletionResponseChoice": {
"type": "object",
"required": [
"finish_reason",
"index",
"text"
],
"properties": {
"finish_reason": {
"type": "string"
},
"index": {
"type": "integer",
"minimum": 0
},
"logprobs": {},
"text": {
"type": "string"
}
}
},
"CompletionUsageResponse": {
"type": "object",
"required": [
"completion_tokens",
"prompt_tokens",
"total_tokens",
"avg_tok_per_sec",
"avg_prompt_tok_per_sec",
"avg_compl_tok_per_sec",
"total_time_sec",
"total_prompt_time_sec",
"total_completion_time_sec"
],
"properties": {
"avg_compl_tok_per_sec": {
"type": "number",
"format": "float"
},
"avg_prompt_tok_per_sec": {
"type": "number",
"format": "float"
},
"avg_tok_per_sec": {
"type": "number",
"format": "float"
},
"completion_tokens": {
"type": "integer",
"minimum": 0
},
"prompt_tokens": {
"type": "integer",
"minimum": 0
},
"total_completion_time_sec": {
"type": "number",
"format": "float"
},
"total_prompt_time_sec": {
"type": "number",
"format": "float"
},
"total_time_sec": {
"type": "number",
"format": "float"
},
"total_tokens": {
"type": "integer",
"minimum": 0
}
}
},
"ContainerFileMetadata": {
"type": "object",
"description": "OpenAI-compatible container file metadata backed by the same in-process file store.",
"required": [
"id",
"object",
"bytes",
"created_at",
"filename",
"container_id",
"source",
"mime_type"
],
"properties": {
"bytes": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"container_id": {
"type": "string"
},
"created_at": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"filename": {
"type": "string"
},
"format": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"mime_type": {
"type": "string"
},
"object": {
"type": "string"
},
"source": {
"$ref": "#/components/schemas/SourceMeta"
}
}
},
"EmbeddingData": {
"type": "object",
"required": [
"object",
"embedding",
"index"
],
"properties": {
"embedding": {
"$ref": "#/components/schemas/EmbeddingVector"
},
"index": {
"type": "integer",
"minimum": 0
},
"object": {
"type": "string"
}
}
},
"EmbeddingEncodingFormat": {
"type": "string",
"enum": [
"float",
"base64"
]
},
"EmbeddingInput": {
"oneOf": [
{
"type": "string",
"description": "Single input string"
},
{
"type": "array",
"items": {
"type": "string"
},
"description": "Multiple input strings"
},
{
"type": "array",
"items": {
"type": "integer"
},
"description": "Single token array"
},
{
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer"
}
},
"description": "Multiple token arrays"
}
]
},
"EmbeddingRequest": {
"type": "object",
"required": [
"input"
],
"properties": {
"dimensions": {
"type": [
"integer",
"null"
],
"description": "Truncate embeddings to this dimensionality, if the model supports it.",
"example": null,
"minimum": 0
},
"encoding_format": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/EmbeddingEncodingFormat",
"description": "Return embeddings as float arrays or base64-encoded strings."
}
]
},
"input": {
"$ref": "#/components/schemas/EmbeddingInput",
"description": "Text or token inputs to embed."
},
"model": {
"type": "string",
"description": "Model ID; \"default\" targets the only loaded model.",
"example": "default"
},
"truncate_sequence": {
"type": [
"boolean",
"null"
],
"description": "Truncate inputs that exceed the model's context length instead of erroring.",
"example": null
},
"user": {
"type": [
"string",
"null"
],
"example": null
}
}
},
"EmbeddingResponse": {
"type": "object",
"required": [
"object",
"data",
"model",
"usage"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EmbeddingData"
}
},
"model": {
"type": "string"
},
"object": {
"type": "string"
},
"usage": {
"$ref": "#/components/schemas/EmbeddingUsage"
}
}
},
"EmbeddingUsage": {
"type": "object",
"required": [
"prompt_tokens",
"total_tokens"
],
"properties": {
"prompt_tokens": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"total_tokens": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
},
"EmbeddingVector": {
"oneOf": [
{
"type": "array",
"items": {
"type": "number"
},
"description": "Embedding returned as an array of floats"
},
{
"type": "string",
"description": "Embedding returned as a base64-encoded string"
}
]
},
"FileCitation": {
"type": "object",
"description": "File citation details",
"required": [
"file_id"
],
"properties": {
"file_id": {
"type": "string",
"description": "File ID"
},
"quote": {
"type": [
"string",
"null"
],
"description": "Quote from the file"
}
}
},
"FileMetadata": {
"type": "object",
"description": "OpenAI file metadata + mistral.rs extensions (`format`, `mime_type`, `source`, `truncated`).",
"required": [
"id",
"object",
"bytes",
"created_at",
"filename",
"purpose",
"mime_type",
"source"
],
"properties": {
"bytes": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"created_at": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"filename": {
"type": "string"
},
"format": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"mime_type": {
"type": "string"
},
"object": {
"type": "string"
},
"purpose": {
"type": "string"
},
"source": {
"$ref": "#/components/schemas/SourceMeta"
},
"truncated": {
"type": "boolean"
}
}
},
"FilePathInfo": {
"type": "object",
"description": "File path information",
"required": [
"file_id"
],
"properties": {
"file_id": {
"type": "string",
"description": "File ID"
}
}
},
"Function": {
"type": "object",
"description": "Function definition for a tool",
"required": [
"name"
],
"properties": {
"description": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"parameters": {
"type": [
"object",
"null"
],
"additionalProperties": {},
"propertyNames": {
"type": "string"
}
},
"strict": {
"type": [
"boolean",
"null"
],
"description": "When `true`, the tool's `parameters` JSON schema is enforced on the\ngenerated arguments via constrained decoding (llguidance)."
}
}
},
"FunctionCalled": {
"type": "object",
"description": "Represents a function call made by the assistant\n\nWhen using tool calling, this structure contains the details of a function\nthat the model has decided to call, including the function name and its parameters.",
"required": [
"name",
"arguments"
],
"properties": {
"arguments": {
"type": "string",
"description": "The function arguments (JSON string)"
},
"name": {
"type": "string",
"description": "The name of the function to call"
}
}
},
"Grammar": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"regex"
]
},
"value": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"json_schema"
]
},
"value": {
"type": "object"
}
}
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"llguidance"
]
},
"value": {
"type": "object",
"description": "Top-level grammar configuration for LLGuidance",
"required": [
"grammars"
],
"properties": {
"grammars": {
"type": "array",
"items": {
"type": "object",
"description": "Grammar configuration with lexer settings",
"properties": {
"json_schema": {
"type": [
"object",
"null"
],
"description": "The JSON schema that the grammar should generate"
},
"lark_grammar": {
"type": [
"string",
"null"
],
"description": "The Lark grammar that the grammar should generate"
},
"name": {
"type": [
"string",
"null"
],
"description": "The name of this grammar, can be used in GenGrammar nodes"
}
}
},
"description": "List of grammar configurations"
},
"max_tokens": {
"type": [
"integer",
"null"
],
"description": "Maximum number of tokens to generate"
}
}
}
}
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"lark"
]
},
"value": {
"type": "string"
}
}
}
]
},
"ImageGenerationRequest": {
"type": "object",
"description": "Image generation request",
"required": [
"prompt"
],
"properties": {
"height": {
"type": "integer",
"description": "Image height in pixels",
"example": 720,
"minimum": 0
},
"model": {
"type": "string",
"description": "Model ID; \"default\" targets the only loaded model.",
"example": "mistral"
},
"n": {
"type": "integer",
"description": "How many choices to generate.",
"example": 1,
"minimum": 0
},
"prompt": {
"type": "string",
"example": "Draw a picture of a majestic, snow-covered mountain."
},
"response_format": {
"$ref": "#/components/schemas/ImageGenerationResponseFormat",
"description": "Return generated images as URLs or base64 data."
},
"width": {
"type": "integer",
"description": "Image width in pixels",
"example": 1280,
"minimum": 0
}
}
},
"ImageGenerationResponseFormat": {
"type": "string",
"description": "Image generation response format",
"enum": [
"Url",
"B64Json"
]
},
"IncludeOption": {
"type": "string",
"description": "Include options for response content.\n\nThis enum specifies additional content to include in the response.\nBy default, certain content may be omitted for efficiency.",
"enum": [
"file_search_call.results",
"message.input_image.image_url",
"computer_call_output.output.image_url",
"reasoning.encrypted_content"
]
},
"IncompleteDetails": {
"type": "object",
"description": "Details about incomplete responses",
"required": [
"reason"
],
"properties": {
"reason": {
"$ref": "#/components/schemas/IncompleteReason",
"description": "Reason for incompleteness"
}
}
},
"IncompleteReason": {
"type": "string",
"description": "Reason for incomplete response",
"enum": [
"max_output_tokens",
"content_filter",
"interrupted"
]
},
"InputTokensDetails": {
"type": "object",
"description": "Detailed input token breakdown",
"properties": {
"audio_tokens": {
"type": [
"integer",
"null"
],
"description": "Audio tokens",
"minimum": 0
},
"cached_tokens": {
"type": [
"integer",
"null"
],
"description": "Cached tokens",
"minimum": 0
},
"image_tokens": {
"type": [
"integer",
"null"
],
"description": "Image tokens",
"minimum": 0
},
"text_tokens": {
"type": [
"integer",
"null"
],
"description": "Text tokens",
"minimum": 0
}
}
},
"JsonSchemaResponseFormat": {
"type": "object",
"description": "JSON Schema for structured responses",
"required": [
"name",
"schema"
],
"properties": {
"name": {
"type": "string"
},
"schema": {}
}
},
"LoadLoraAdapterRequest": {
"type": "object",
"required": [
"lora_name",
"lora_path"
],
"properties": {
"expected_generation": {
"type": [
"string",
"null"
],
"description": "Replace only if the alias still points at this generation.",
"example": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a"
},
"load_inplace": {
"type": "boolean",
"description": "Atomically replace an existing alias. Defaults to false, matching vLLM.",
"default": false,
"example": false
},
"lora_name": {
"type": "string",
"description": "Request-facing adapter alias.",
"example": "production"
},
"lora_path": {
"type": "string",
"description": "Local server filesystem directory containing PEFT safetensors files.",
"example": "/srv/adapters/production-v2"
},
"model": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"LoraAdapterErrorBody": {
"type": "object",
"required": [
"message",
"type",
"code"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"LoraAdapterErrorResponse": {
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"$ref": "#/components/schemas/LoraAdapterErrorBody"
}
}
},
"LoraAdapterListResponse": {
"type": "object",
"required": [
"object",
"data",
"generations",
"resident_generations",
"retired_generations",
"resident_bytes",
"max_adapters",
"max_rank",
"max_bytes"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LoraAdapterObject"
}
},
"generations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LoraResidentGenerationObject"
}
},
"max_adapters": {
"type": "integer",
"minimum": 0
},
"max_bytes": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"max_rank": {
"type": "integer",
"minimum": 0
},
"object": {
"type": "string"
},
"resident_bytes": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"resident_generations": {
"type": "integer",
"minimum": 0
},
"retired_generations": {
"type": "integer",
"minimum": 0
}
}
},
"LoraAdapterObject": {
"type": "object",
"required": [
"id",
"object",
"generation",
"rank",
"bytes"
],
"properties": {
"bytes": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"generation": {
"type": "string"
},
"id": {
"type": "string"
},
"object": {
"type": "string"
},
"rank": {
"type": "integer",
"minimum": 0
},
"revision": {
"type": [
"string",
"null"
]
},
"source": {
"type": [
"string",
"null"
]
}
}
},
"LoraResidentGenerationObject": {
"type": "object",
"required": [
"generation",
"aliases",
"rank",
"bytes",
"retired",
"active_leases"
],
"properties": {
"active_leases": {
"type": "integer",
"minimum": 0
},
"aliases": {
"type": "array",
"items": {
"type": "string"
}
},
"bytes": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"generation": {
"type": "string"
},
"rank": {
"type": "integer",
"minimum": 0
},
"retired": {
"type": "boolean"
}
}
},
"Message": {
"type": "object",
"description": "Represents a single message in a conversation\n\n### Examples\n\n```ignore\nuse either::Either;\nuse mistralrs_server_core::openai::{Message, MessageContent};\n\n// User message\nlet user_msg = Message {\n content: Some(MessageContent(Either::Left(\"What's 2+2?\".to_string()))),\n role: \"user\".to_string(),\n name: None,\n tool_calls: None,\n tool_call_id: None,\n reasoning_content: None,\n};\n\n// System message\nlet system_msg = Message {\n content: Some(MessageContent(Either::Left(\"You are a helpful assistant.\".to_string()))),\n role: \"system\".to_string(),\n name: None,\n tool_calls: None,\n tool_call_id: None,\n reasoning_content: None,\n};\n```",
"required": [
"role"
],
"properties": {
"content": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/MessageContent",
"description": "The message content"
}
]
},
"name": {
"type": [
"string",
"null"
],
"description": "Optional participant name for this message"
},
"reasoning_content": {
"type": [
"string",
"null"
],
"description": "Reasoning emitted with an assistant message."
},
"role": {
"type": "string",
"description": "The role of the message sender (\"user\", \"assistant\", \"system\", \"tool\", etc.)"
},
"tool_call_id": {
"type": [
"string",
"null"
],
"description": "Tool call ID this message is responding to (for tool messages)"
},
"tool_calls": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/ToolCall"
},
"description": "Optional list of tool calls (for assistant messages)"
}
}
},
"MessageContent": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/MessageInnerContent"
}
}
}
]
},
"MessageInnerContent": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": {
"type": "string"
}
}
]
},
"ModelObject": {
"type": "object",
"description": "Model information metadata about an available mode",
"required": [
"id",
"object",
"created",
"owned_by"
],
"properties": {
"adapter_generation": {
"type": [
"string",
"null"
],
"description": "Current immutable LoRA generation for adapter model cards."
},
"created": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"id": {
"type": "string"
},
"mcp_servers_connected": {
"type": [
"integer",
"null"
],
"description": "Number of connected MCP servers",
"minimum": 0
},
"mcp_tools_count": {
"type": [
"integer",
"null"
],
"description": "Number of tools available from MCP servers",
"minimum": 0
},
"object": {
"type": "string"
},
"owned_by": {
"type": "string"
},
"parent": {
"type": [
"string",
"null"
],
"description": "Base model that owns this adapter, when the card represents a LoRA adapter."
},
"root": {
"type": [
"string",
"null"
],
"description": "Public source identifier for this model card."
},
"status": {
"type": [
"string",
"null"
],
"description": "Model status: \"loaded\", \"unloaded\", or \"reloading\""
},
"tools_available": {
"type": [
"boolean",
"null"
],
"description": "Whether tools are available through MCP or tool callbacks"
}
}
},
"ModelObjects": {
"type": "object",
"description": "Collection of available models",
"required": [
"object",
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ModelObject"
}
},
"object": {
"type": "string"
}
}
},
"ModelOperationRequest": {
"type": "object",
"description": "Request for model operations (unload, reload, status)",
"required": [
"model_id"
],
"properties": {
"model_id": {
"type": "string",
"example": "my-model"
}
}
},
"ModelStatus": {
"type": "string",
"description": "Model status enum",
"enum": [
"loaded",
"unloaded",
"reloading",
"not_found",
"no_loader_config",
"internal_error"
]
},
"ModelStatusResponse": {
"type": "object",
"description": "Response for model status operations",
"required": [
"model_id",
"status"
],
"properties": {
"error": {
"type": [
"string",
"null"
],
"description": "Error message when status indicates an error condition"
},
"model_id": {
"type": "string",
"example": "my-model"
},
"status": {
"$ref": "#/components/schemas/ModelStatus"
}
}
},
"NamedFunctionToolChoice": {
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"name": {
"type": "string"
},
"type": {
"$ref": "#/components/schemas/ToolType"
}
}
},
"OpenAiCodeInterpreterAutoContainer": {
"type": "object",
"required": [
"type"
],
"properties": {
"file_ids": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"memory_limit": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/components/schemas/OpenAiCodeInterpreterContainerType"
}
}
},
"OpenAiCodeInterpreterContainer": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/OpenAiCodeInterpreterAutoContainer"
}
]
},
"OpenAiCodeInterpreterContainerType": {
"type": "string",
"enum": [
"auto"
]
},
"OpenAiCodeInterpreterTool": {
"type": "object",
"required": [
"type",
"container"
],
"properties": {
"container": {
"$ref": "#/components/schemas/OpenAiCodeInterpreterContainer"
},
"type": {
"$ref": "#/components/schemas/OpenAiCodeInterpreterToolType"
}
}
},
"OpenAiCodeInterpreterToolType": {
"type": "string",
"enum": [
"code_interpreter"
]
},
"OpenAiFunctionToolType": {
"type": "string",
"enum": [
"function"
]
},
"OpenAiNamespaceEntry": {
"oneOf": [
{
"$ref": "#/components/schemas/OpenAiResponsesFunctionTool"
},
{}
]
},
"OpenAiNamespaceTool": {
"type": "object",
"description": "A grouping of client-executed tools; the model sees each inner tool as `<namespace>.<name>`.",
"required": [
"type",
"name"
],
"properties": {
"description": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"tools": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OpenAiNamespaceEntry"
}
},
"type": {
"$ref": "#/components/schemas/OpenAiNamespaceToolType"
}
}
},
"OpenAiNamespaceToolType": {
"type": "string",
"enum": [
"namespace"
]
},
"OpenAiResponsesFunctionTool": {
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"description": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"parameters": {
"type": [
"object",
"null"
],
"additionalProperties": {},
"propertyNames": {
"type": "string"
}
},
"strict": {
"type": [
"boolean",
"null"
]
},
"type": {
"$ref": "#/components/schemas/OpenAiFunctionToolType"
}
}
},
"OpenAiShellEnvironment": {
"oneOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"skills": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OpenAiShellSkill"
}
},
"type": {
"type": "string",
"enum": [
"container_auto"
]
}
}
},
{
"type": "object",
"required": [
"path",
"type"
],
"properties": {
"path": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"local"
]
}
}
},
{
"type": "object",
"required": [
"container_id",
"type"
],
"properties": {
"container_id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"container_reference"
]
}
}
}
]
},
"OpenAiShellSkill": {
"oneOf": [
{
"type": "object",
"required": [
"skill_id",
"type"
],
"properties": {
"skill_id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"skill_reference"
]
},
"version": {}
}
},
{
"type": "object",
"required": [
"path",
"type"
],
"properties": {
"path": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"local"
]
}
}
}
]
},
"OpenAiShellTool": {
"type": "object",
"required": [
"type",
"environment"
],
"properties": {
"environment": {
"$ref": "#/components/schemas/OpenAiShellEnvironment"
},
"type": {
"$ref": "#/components/schemas/OpenAiShellToolType"
}
}
},
"OpenAiShellToolType": {
"type": "string",
"enum": [
"shell"
]
},
"OpenAiTool": {
"oneOf": [
{
"$ref": "#/components/schemas/Tool"
},
{
"$ref": "#/components/schemas/OpenAiResponsesFunctionTool"
},
{
"$ref": "#/components/schemas/OpenAiWebSearchTool"
},
{
"$ref": "#/components/schemas/OpenAiCodeInterpreterTool"
},
{
"$ref": "#/components/schemas/OpenAiShellTool"
},
{
"$ref": "#/components/schemas/OpenAiNamespaceTool"
}
]
},
"OpenAiWebSearchTool": {
"type": "object",
"required": [
"type"
],
"properties": {
"external_web_access": {
"type": [
"boolean",
"null"
]
},
"filters": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/WebSearchFilters"
}
]
},
"image_settings": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/WebSearchImageSettings"
}
]
},
"return_token_budget": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/WebSearchReturnTokenBudget"
}
]
},
"search_content_types": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/WebSearchContentType"
}
},
"search_context_size": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/SearchContextSize"
}
]
},
"type": {
"$ref": "#/components/schemas/OpenAiWebSearchToolType"
},
"user_location": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/OpenAiWebSearchUserLocation"
}
]
}
}
},
"OpenAiWebSearchToolType": {
"type": "string",
"enum": [
"web_search",
"web_search_preview"
]
},
"OpenAiWebSearchUserLocation": {
"oneOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"city": {
"type": [
"string",
"null"
]
},
"country": {
"type": [
"string",
"null"
]
},
"region": {
"type": [
"string",
"null"
]
},
"timezone": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"approximate"
]
}
}
}
]
},
"OpenResponsesCreateRequest": {
"type": "object",
"description": "OpenResponses API create request",
"required": [
"input"
],
"properties": {
"adapter": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AdapterSelection",
"description": "Adapter alias or exact generation to activate for this request."
}
]
},
"background": {
"type": [
"boolean",
"null"
],
"description": "Whether to run the request in background (async)"
},
"dry_allowed_length": {
"type": [
"integer",
"null"
],
"description": "DRY allowed length (mistral.rs extension)",
"minimum": 0
},
"dry_base": {
"type": [
"number",
"null"
],
"format": "float",
"description": "DRY base (mistral.rs extension)"
},
"dry_multiplier": {
"type": [
"number",
"null"
],
"format": "float",
"description": "DRY multiplier (mistral.rs extension)"
},
"dry_sequence_breakers": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"description": "DRY sequence breakers (mistral.rs extension)"
},
"files": {
"type": [
"array",
"null"
],
"items": {},
"description": "Required output files to surface from tool calls (mistral.rs extension)"
},
"frequency_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Frequency penalty (-2.0 to 2.0)"
},
"grammar": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/Grammar",
"description": "Grammar for constrained generation (mistral.rs extension)"
}
]
},
"ignore_eos": {
"type": "boolean",
"description": "Continue generation past EOS until another stop condition is met"
},
"include": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/IncludeOption"
},
"description": "Specifies additional content to include in the response"
},
"input": {
"$ref": "#/components/schemas/OpenResponsesInput",
"description": "The input for the response - can be a string or array of input items"
},
"instructions": {
"type": [
"string",
"null"
],
"description": "Additional instructions that guide the model's behavior"
},
"logit_bias": {
"type": [
"object",
"null"
],
"description": "Logit bias for token manipulation",
"additionalProperties": {
"type": "number",
"format": "float"
},
"propertyNames": {
"type": "integer",
"format": "int32",
"minimum": 0
}
},
"logprobs": {
"type": "boolean",
"description": "Whether to return log probabilities"
},
"max_output_tokens": {
"type": [
"integer",
"null"
],
"description": "Maximum number of output tokens to generate",
"minimum": 0
},
"max_tool_calls": {
"type": [
"integer",
"null"
],
"description": "Maximum number of tool calls allowed.\n\nNOTE: This parameter is not supported. Setting any value will return an error\nas mistral.rs does not support limiting the number of tool calls.",
"minimum": 0
},
"max_tool_rounds": {
"type": [
"integer",
"null"
],
"description": "Maximum number of agentic tool rounds (mistral.rs extension)",
"minimum": 0
},
"metadata": {
"description": "User-provided metadata (up to 16 key-value pairs)"
},
"min_p": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Min-p sampling (mistral.rs extension)"
},
"model": {
"type": "string",
"description": "The model to use for this request"
},
"n": {
"type": "integer",
"description": "Number of completions to generate",
"minimum": 0
},
"parallel_tool_calls": {
"type": [
"boolean",
"null"
],
"description": "Whether to allow parallel tool calls.\n\nNOTE: Only `true` (default) or `None` is supported. Setting this to `false`\nwill return an error as mistral.rs does not support disabling parallel tool calls."
},
"presence_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Presence penalty (-2.0 to 2.0)"
},
"previous_response_id": {
"type": [
"string",
"null"
],
"description": "ID of a previous response for multi-turn conversations"
},
"reasoning": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ReasoningConfig",
"description": "Configuration for reasoning/thinking behavior"
}
]
},
"repetition_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Repetition penalty (mistral.rs extension)"
},
"response_format": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponseFormat",
"description": "Response format (legacy, prefer `text` field)"
}
]
},
"stop": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/StopTokens",
"description": "Stop sequences to end generation"
}
]
},
"store": {
"type": [
"boolean",
"null"
],
"description": "Whether to store the response for later retrieval"
},
"stream": {
"type": [
"boolean",
"null"
],
"description": "Whether to stream the response using server-sent events"
},
"stream_options": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/StreamOptions",
"description": "Stream options for controlling streaming behavior"
}
]
},
"temperature": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Temperature for sampling (0-2)"
},
"text": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/TextConfig",
"description": "Text output configuration"
}
]
},
"tool_choice": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ToolChoice",
"description": "Controls how the model uses tools"
}
]
},
"tools": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/OpenAiTool"
},
"description": "Tool definitions available for the model to call"
},
"top_k": {
"type": [
"integer",
"null"
],
"description": "Top-k sampling (mistral.rs extension)",
"minimum": 0
},
"top_logprobs": {
"type": [
"integer",
"null"
],
"description": "Number of top log probabilities to return",
"minimum": 0
},
"top_p": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Top-p (nucleus) sampling parameter (0-1)"
},
"truncation": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/TruncationStrategy",
"description": "Truncation strategy when input exceeds context window"
}
]
}
}
},
"OpenResponsesInput": {
"oneOf": [
{
"type": "string",
"description": "Simple text input"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"role",
"content"
],
"properties": {
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"annotations": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"description": "File citation annotation",
"required": [
"text",
"start_index",
"end_index",
"file_citation",
"type"
],
"properties": {
"end_index": {
"type": "integer",
"description": "End index in the text",
"minimum": 0
},
"file_citation": {
"$ref": "#/components/schemas/FileCitation",
"description": "File citation details"
},
"start_index": {
"type": "integer",
"description": "Start index in the text",
"minimum": 0
},
"text": {
"type": "string",
"description": "The text that is annotated"
},
"type": {
"type": "string",
"enum": [
"file_citation"
]
}
}
},
{
"type": "object",
"description": "URL citation annotation",
"required": [
"text",
"start_index",
"end_index",
"url_citation",
"type"
],
"properties": {
"end_index": {
"type": "integer",
"description": "End index in the text",
"minimum": 0
},
"start_index": {
"type": "integer",
"description": "Start index in the text",
"minimum": 0
},
"text": {
"type": "string",
"description": "The text that is annotated"
},
"type": {
"type": "string",
"enum": [
"url_citation"
]
},
"url_citation": {
"$ref": "#/components/schemas/UrlCitation",
"description": "URL citation details"
}
}
},
{
"type": "object",
"description": "File path annotation",
"required": [
"text",
"start_index",
"end_index",
"file_path",
"type"
],
"properties": {
"end_index": {
"type": "integer",
"description": "End index in the text",
"minimum": 0
},
"file_path": {
"$ref": "#/components/schemas/FilePathInfo",
"description": "File path details"
},
"start_index": {
"type": "integer",
"description": "Start index in the text",
"minimum": 0
},
"text": {
"type": "string",
"description": "The text that is annotated"
},
"type": {
"type": "string",
"enum": [
"file_path"
]
}
}
},
{
"type": "object",
"description": "Container file citation annotation",
"required": [
"file_id",
"container_id",
"end_index",
"filename",
"start_index",
"type"
],
"properties": {
"container_id": {
"type": "string",
"description": "Container ID"
},
"end_index": {
"type": "integer",
"description": "End index in the text",
"minimum": 0
},
"file_id": {
"type": "string",
"description": "File ID"
},
"filename": {
"type": "string",
"description": "Filename"
},
"index": {
"type": [
"integer",
"null"
],
"description": "Optional annotation index",
"minimum": 0
},
"start_index": {
"type": "integer",
"description": "Start index in the text",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"container_file_citation"
]
}
}
}
],
"description": "Annotation for output text content"
}
},
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"input_text"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"image_url": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"input_image"
]
}
}
},
{
"type": "object",
"required": [
"type",
"data",
"format"
],
"properties": {
"data": {
"type": "string"
},
"format": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"input_audio"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"file_data": {
"type": "string"
},
"file_id": {
"type": "string"
},
"file_url": {
"type": "string"
},
"filename": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"input_file"
]
}
}
}
]
}
}
]
},
"role": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"message"
]
}
}
},
{
"type": "object",
"required": [
"type",
"id"
],
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"item_reference"
]
}
}
},
{
"type": "object",
"required": [
"type",
"call_id",
"name",
"arguments"
],
"properties": {
"arguments": {
"type": "string"
},
"call_id": {
"type": "string"
},
"name": {
"type": "string"
},
"namespace": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"function_call"
]
}
}
},
{
"type": "object",
"required": [
"type",
"call_id",
"output"
],
"properties": {
"call_id": {
"type": "string"
},
"output": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"function_call_output"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"content": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"reasoning_text"
]
}
}
}
]
}
},
"id": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"summary_text"
]
}
}
}
]
}
},
"type": {
"type": "string",
"enum": [
"reasoning"
]
}
}
}
]
},
"description": "Array of input items (OpenResponses format)"
}
]
},
"OpenResponsesStreamEvent": {
"oneOf": [
{
"type": "object",
"description": "Response created event",
"required": [
"sequence_number",
"response",
"type"
],
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseResource"
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.created"
]
}
}
},
{
"type": "object",
"description": "Response in progress event",
"required": [
"sequence_number",
"response",
"type"
],
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseResource"
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.in_progress"
]
}
}
},
{
"type": "object",
"description": "Output item added event",
"required": [
"sequence_number",
"output_index",
"item",
"type"
],
"properties": {
"item": {
"$ref": "#/components/schemas/OutputItem"
},
"output_index": {
"type": "integer",
"minimum": 0
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.output_item.added"
]
}
}
},
{
"type": "object",
"description": "Content part added event",
"required": [
"sequence_number",
"output_index",
"content_index",
"part",
"type"
],
"properties": {
"content_index": {
"type": "integer",
"minimum": 0
},
"output_index": {
"type": "integer",
"minimum": 0
},
"part": {
"$ref": "#/components/schemas/OutputContent"
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.content_part.added"
]
}
}
},
{
"type": "object",
"description": "Text delta event",
"required": [
"sequence_number",
"output_index",
"content_index",
"delta",
"type"
],
"properties": {
"content_index": {
"type": "integer",
"minimum": 0
},
"delta": {
"type": "string"
},
"output_index": {
"type": "integer",
"minimum": 0
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.output_text.delta"
]
}
}
},
{
"type": "object",
"description": "Content part done event",
"required": [
"sequence_number",
"output_index",
"content_index",
"part",
"type"
],
"properties": {
"content_index": {
"type": "integer",
"minimum": 0
},
"output_index": {
"type": "integer",
"minimum": 0
},
"part": {
"$ref": "#/components/schemas/OutputContent"
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.content_part.done"
]
}
}
},
{
"type": "object",
"description": "Output item done event",
"required": [
"sequence_number",
"output_index",
"item",
"type"
],
"properties": {
"item": {
"$ref": "#/components/schemas/OutputItem"
},
"output_index": {
"type": "integer",
"minimum": 0
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.output_item.done"
]
}
}
},
{
"type": "object",
"description": "Function call arguments delta",
"required": [
"sequence_number",
"output_index",
"call_id",
"delta",
"type"
],
"properties": {
"call_id": {
"type": "string"
},
"delta": {
"type": "string"
},
"output_index": {
"type": "integer",
"minimum": 0
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.function_call_arguments.delta"
]
}
}
},
{
"type": "object",
"description": "Function call arguments done",
"required": [
"sequence_number",
"output_index",
"call_id",
"arguments",
"type"
],
"properties": {
"arguments": {
"type": "string"
},
"call_id": {
"type": "string"
},
"output_index": {
"type": "integer",
"minimum": 0
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.function_call_arguments.done"
]
}
}
},
{
"type": "object",
"description": "Reasoning text delta",
"required": [
"sequence_number",
"item_id",
"output_index",
"content_index",
"delta",
"type"
],
"properties": {
"content_index": {
"type": "integer",
"minimum": 0
},
"delta": {
"type": "string"
},
"item_id": {
"type": "string"
},
"output_index": {
"type": "integer",
"minimum": 0
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.reasoning_text.delta"
]
}
}
},
{
"type": "object",
"description": "Reasoning text done",
"required": [
"sequence_number",
"item_id",
"output_index",
"content_index",
"text",
"type"
],
"properties": {
"content_index": {
"type": "integer",
"minimum": 0
},
"item_id": {
"type": "string"
},
"output_index": {
"type": "integer",
"minimum": 0
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"response.reasoning_text.done"
]
}
}
},
{
"type": "object",
"description": "Response completed event",
"required": [
"sequence_number",
"response",
"type"
],
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseResource"
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.completed"
]
}
}
},
{
"type": "object",
"description": "Response failed event",
"required": [
"sequence_number",
"response",
"type"
],
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseResource"
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.failed"
]
}
}
},
{
"type": "object",
"description": "Response incomplete event",
"required": [
"sequence_number",
"response",
"type"
],
"properties": {
"response": {
"$ref": "#/components/schemas/ResponseResource"
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"response.incomplete"
]
}
}
},
{
"type": "object",
"description": "Error event",
"required": [
"sequence_number",
"error",
"type"
],
"properties": {
"error": {
"$ref": "#/components/schemas/ResponseError"
},
"sequence_number": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"type": {
"type": "string",
"enum": [
"error"
]
}
}
}
],
"description": "OpenResponses streaming event format"
},
"OutputContent": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"output_text"
]
}
}
},
{
"type": "object",
"required": [
"type",
"refusal"
],
"properties": {
"refusal": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"refusal"
]
}
}
}
]
},
"OutputItem": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"id",
"role",
"content",
"status"
],
"properties": {
"content": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"output_text"
]
}
}
},
{
"type": "object",
"required": [
"type",
"refusal"
],
"properties": {
"refusal": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"refusal"
]
}
}
}
]
}
},
"id": {
"type": "string"
},
"role": {
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"message"
]
}
}
},
{
"type": "object",
"required": [
"type",
"id",
"call_id",
"name",
"arguments",
"status"
],
"properties": {
"arguments": {
"type": "string"
},
"call_id": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"namespace": {
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"function_call"
]
}
}
},
{
"type": "object",
"required": [
"type",
"id",
"call_id",
"action",
"status"
],
"properties": {
"action": {
"type": "object"
},
"call_id": {
"type": "string"
},
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"shell_call"
]
}
}
},
{
"type": "object",
"required": [
"type",
"id",
"call_id",
"output",
"status"
],
"properties": {
"call_id": {
"type": "string"
},
"id": {
"type": "string"
},
"output": {
"type": "array",
"items": {
"type": "object"
}
},
"status": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"shell_call_output"
]
}
}
},
{
"type": "object",
"required": [
"type",
"id",
"summary",
"content",
"status"
],
"properties": {
"content": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"reasoning_text"
]
}
}
}
]
}
},
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"summary": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"summary_text"
]
}
}
}
]
}
},
"type": {
"type": "string",
"enum": [
"reasoning"
]
}
}
}
]
},
"OutputTokensDetails": {
"type": "object",
"description": "Detailed output token breakdown",
"properties": {
"audio_tokens": {
"type": [
"integer",
"null"
],
"description": "Audio tokens",
"minimum": 0
},
"reasoning_tokens": {
"type": [
"integer",
"null"
],
"description": "Reasoning tokens",
"minimum": 0
},
"text_tokens": {
"type": [
"integer",
"null"
],
"description": "Text tokens",
"minimum": 0
}
}
},
"ReIsqRequest": {
"type": "object",
"required": [
"ggml_type"
],
"properties": {
"ggml_type": {
"type": "string",
"example": "Q4K"
}
}
},
"ReasoningConfig": {
"type": "object",
"description": "Reasoning configuration for models that support extended thinking",
"properties": {
"effort": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ReasoningEffort",
"description": "Effort level for reasoning (off, low, medium, high, xhigh). \"none\" aliases \"off\"."
}
]
},
"summary": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ReasoningSummary",
"description": "Accepted for compatibility; currently does not change the response."
}
]
}
}
},
"ReasoningEffort": {
"type": "string",
"description": "Reasoning effort. `none` aliases `off`; `max` aliases `xhigh`.",
"enum": [
"off",
"none",
"low",
"medium",
"high",
"xhigh",
"max"
]
},
"ReasoningSummary": {
"type": "string",
"description": "Reasoning summary configuration",
"enum": [
"concise",
"detailed",
"auto"
]
},
"ResponseError": {
"type": "object",
"description": "Error information for a response",
"required": [
"type",
"message"
],
"properties": {
"code": {
"type": [
"string",
"null"
],
"description": "Error code"
},
"message": {
"type": "string",
"description": "Error message"
},
"type": {
"type": "string",
"description": "Error type"
}
}
},
"ResponseFormat": {
"oneOf": [
{
"type": "object",
"description": "Free-form text response",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
}
},
{
"type": "object",
"description": "Structured response as any JSON object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"json_object"
]
}
}
},
{
"type": "object",
"description": "Structured response following a JSON schema",
"required": [
"json_schema",
"type"
],
"properties": {
"json_schema": {
"$ref": "#/components/schemas/JsonSchemaResponseFormat"
},
"type": {
"type": "string",
"enum": [
"json_schema"
]
}
}
}
],
"description": "Response format for model output"
},
"ResponseResource": {
"type": "object",
"description": "The main response resource returned by the OpenResponses API",
"required": [
"id",
"object",
"created_at",
"model",
"status",
"output"
],
"properties": {
"adapter_generation": {
"type": [
"string",
"null"
],
"description": "Exact LoRA generation used for this response."
},
"background": {
"type": [
"boolean",
"null"
],
"description": "Whether request runs in background"
},
"completed_at": {
"type": [
"integer",
"null"
],
"format": "int64",
"description": "Unix timestamp when the response was completed (if completed)",
"minimum": 0
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "Unix timestamp when the response was created",
"minimum": 0
},
"error": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponseError",
"description": "Error information (if status is failed)"
}
]
},
"frequency_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Frequency penalty from the request"
},
"id": {
"type": "string",
"description": "Unique identifier for this response"
},
"incomplete_details": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/IncompleteDetails",
"description": "Details about why response is incomplete"
}
]
},
"instructions": {
"type": [
"string",
"null"
],
"description": "System instructions (if provided)"
},
"max_output_tokens": {
"type": [
"integer",
"null"
],
"description": "Max output tokens from the request",
"minimum": 0
},
"max_tool_calls": {
"type": [
"integer",
"null"
],
"description": "Max tool calls from the request (even if unsupported)",
"minimum": 0
},
"metadata": {
"description": "User-provided metadata"
},
"model": {
"type": "string",
"description": "The model used for this response"
},
"object": {
"type": "string",
"description": "Object type (always \"response\")"
},
"output": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OutputItem"
},
"description": "Output items generated by the model"
},
"output_text": {
"type": [
"string",
"null"
],
"description": "Concatenated text from all text output content"
},
"parallel_tool_calls": {
"type": [
"boolean",
"null"
],
"description": "Whether parallel tool calls are enabled"
},
"presence_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Presence penalty from the request"
},
"previous_response_id": {
"type": [
"string",
"null"
],
"description": "Previous response ID (for multi-turn conversations)"
},
"reasoning": {
"type": [
"string",
"null"
],
"description": "Reasoning/chain-of-thought content from the model"
},
"status": {
"$ref": "#/components/schemas/ResponseStatus",
"description": "Current status of the response"
},
"store": {
"type": [
"boolean",
"null"
],
"description": "Whether to store the response"
},
"temperature": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Temperature from the request"
},
"text": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/TextConfig",
"description": "Text configuration from the request"
}
]
},
"tool_choice": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ToolChoice",
"description": "Tool choice configuration from the request"
}
]
},
"tools": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/OpenAiTool"
},
"description": "Tool definitions from the request"
},
"top_logprobs": {
"type": [
"integer",
"null"
],
"description": "Top logprobs from the request",
"minimum": 0
},
"top_p": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Top-p from the request"
},
"truncation": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/TruncationStrategy",
"description": "Truncation strategy used"
}
]
},
"usage": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponseUsage",
"description": "Token usage information"
}
]
}
}
},
"ResponseStatus": {
"type": "string",
"description": "Status of a response in the OpenResponses API",
"enum": [
"queued",
"in_progress",
"completed",
"failed",
"incomplete",
"cancelled"
]
},
"ResponseUsage": {
"type": "object",
"description": "Usage information for a response",
"required": [
"input_tokens",
"output_tokens",
"total_tokens"
],
"properties": {
"input_tokens": {
"type": "integer",
"description": "Number of input tokens",
"minimum": 0
},
"input_tokens_details": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/InputTokensDetails",
"description": "Detailed input token breakdown"
}
]
},
"output_tokens": {
"type": "integer",
"description": "Number of output tokens",
"minimum": 0
},
"output_tokens_details": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/OutputTokensDetails",
"description": "Detailed output token breakdown"
}
]
},
"total_tokens": {
"type": "integer",
"description": "Total number of tokens",
"minimum": 0
}
}
},
"ResponsesAnnotation": {
"type": "object",
"description": "Response annotation",
"required": [
"type",
"text",
"start_index",
"end_index"
],
"properties": {
"end_index": {
"type": "integer",
"minimum": 0
},
"start_index": {
"type": "integer",
"minimum": 0
},
"text": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"ResponsesChunk": {
"type": "object",
"description": "Response streaming chunk",
"required": [
"id",
"object",
"created_at",
"model",
"chunk_type"
],
"properties": {
"chunk_type": {
"type": "string"
},
"created_at": {
"type": "number",
"format": "double"
},
"delta": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponsesDelta"
}
]
},
"id": {
"type": "string"
},
"metadata": {},
"model": {
"type": "string"
},
"object": {
"type": "string"
},
"usage": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponsesUsage"
}
]
}
}
},
"ResponsesContent": {
"type": "object",
"description": "Response content item",
"required": [
"type"
],
"properties": {
"annotations": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/ResponsesAnnotation"
}
},
"text": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
}
},
"ResponsesCreateRequest": {
"type": "object",
"description": "Response creation request",
"required": [
"input"
],
"properties": {
"adapter": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/AdapterSelection",
"description": "Adapter alias or exact generation to activate for this request."
}
]
},
"dry_allowed_length": {
"type": [
"integer",
"null"
],
"description": "Longest repeated sequence DRY leaves unpenalized.",
"example": null,
"minimum": 0
},
"dry_base": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Base for DRY's exponential penalty growth.",
"example": null
},
"dry_multiplier": {
"type": [
"number",
"null"
],
"format": "float",
"description": "DRY repetition penalty multiplier; 0 disables DRY.",
"example": null
},
"dry_sequence_breakers": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"description": "Sequences that reset DRY repetition matching.",
"example": null
},
"enable_thinking": {
"type": [
"boolean",
"null"
],
"description": "Legacy schema field. The active Responses endpoint ignores this top-level control.",
"example": null
},
"frequency_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Penalize tokens by how often they have appeared so far; positive values reduce repetition.",
"example": null
},
"grammar": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/Grammar",
"description": "Constrain output with a regex, JSON schema, Lark, or LLGuidance grammar."
}
]
},
"ignore_eos": {
"type": "boolean",
"description": "Continue generation past EOS until another stop condition is met.",
"example": false
},
"input": {
"$ref": "#/components/schemas/ResponsesMessages",
"description": "Input messages or a single raw prompt string."
},
"instructions": {
"type": [
"string",
"null"
],
"description": "System instructions prepended to the conversation.",
"example": null
},
"logit_bias": {
"type": [
"object",
"null"
],
"description": "Bias added to the logits of these token IDs before sampling.",
"additionalProperties": {
"type": "number",
"format": "float"
},
"propertyNames": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"example": null
},
"logprobs": {
"type": "boolean",
"description": "Return log probabilities of the output tokens.",
"example": false
},
"max_tokens": {
"type": [
"integer",
"null"
],
"description": "Maximum number of tokens to generate.",
"example": 256,
"minimum": 0
},
"max_tool_calls": {
"type": [
"integer",
"null"
],
"description": "Maximum number of tool calls the model may make.",
"example": null,
"minimum": 0
},
"metadata": {
"description": "Arbitrary metadata stored with the response."
},
"min_p": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Drop tokens below this fraction of the top token's probability.",
"example": null
},
"modalities": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"description": "Requested output modalities.",
"example": null
},
"model": {
"type": "string",
"description": "Model ID; \"default\" targets the only loaded model.",
"example": "mistral"
},
"n": {
"type": "integer",
"description": "How many choices to generate.",
"example": 1,
"minimum": 0
},
"output_token_details": {
"type": [
"boolean",
"null"
],
"description": "Include a detailed token breakdown in usage.",
"example": null
},
"parallel_tool_calls": {
"type": [
"boolean",
"null"
],
"description": "Whether tool calls may run in parallel.",
"example": null
},
"presence_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Penalize tokens that have already appeared; positive values push toward new topics.",
"example": null
},
"previous_response_id": {
"type": [
"string",
"null"
],
"description": "Continue the conversation from a stored previous response.",
"example": null
},
"reasoning_effort": {
"type": [
"string",
"null"
],
"description": "Legacy schema field. Use `reasoning.effort` with the active Responses endpoint.",
"example": null
},
"reasoning_enabled": {
"type": [
"boolean",
"null"
],
"description": "Toggle reasoning output for models that support it.",
"example": null
},
"reasoning_max_tokens": {
"type": [
"integer",
"null"
],
"description": "Token budget for reasoning.",
"example": null,
"minimum": 0
},
"reasoning_top_logprobs": {
"type": [
"integer",
"null"
],
"description": "Number of top logprobs to return for reasoning tokens.",
"example": null,
"minimum": 0
},
"repetition_penalty": {
"type": [
"number",
"null"
],
"format": "float",
"description": "Multiplicative repetition penalty; 1.0 disables it.",
"example": null
},
"response_format": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponseFormat",
"description": "Force plain text or JSON-schema constrained output."
}
]
},
"stop": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/StopTokens",
"description": "Sequences where generation stops."
}
]
},
"store": {
"type": [
"boolean",
"null"
],
"description": "Persist the response so it can be fetched later by ID.",
"example": null
},
"stream": {
"type": [
"boolean",
"null"
],
"description": "Stream the response as server-sent events.",
"example": false
},
"temperature": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Sampling temperature; higher values increase randomness.",
"example": 0.7
},
"tool_choice": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ToolChoice",
"description": "Controls which (if any) tool the model must call."
}
]
},
"tools": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/OpenAiTool"
},
"description": "Tools the model may call.",
"example": null
},
"top_k": {
"type": [
"integer",
"null"
],
"description": "Sample only from the k most likely tokens.",
"example": null,
"minimum": 0
},
"top_logprobs": {
"type": [
"integer",
"null"
],
"description": "Number of most likely tokens to return per position; requires `logprobs`.",
"example": null,
"minimum": 0
},
"top_p": {
"type": [
"number",
"null"
],
"format": "double",
"description": "Nucleus sampling: only tokens within the top cumulative probability mass are considered.",
"example": null
},
"truncate_sequence": {
"type": [
"boolean",
"null"
],
"description": "Truncate inputs that exceed the model's context length instead of erroring.",
"example": null
},
"truncation": {
"type": [
"object",
"null"
],
"description": "OpenAI-style truncation strategy object.",
"additionalProperties": {},
"propertyNames": {
"type": "string"
},
"example": null
}
}
},
"ResponsesDelta": {
"type": "object",
"description": "Response delta for streaming",
"properties": {
"output": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/ResponsesDeltaOutput"
}
},
"status": {
"type": [
"string",
"null"
]
}
}
},
"ResponsesDeltaContent": {
"type": "object",
"description": "Response delta content item",
"required": [
"type"
],
"properties": {
"text": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
}
},
"ResponsesDeltaOutput": {
"type": "object",
"description": "Response delta output item",
"required": [
"id",
"type"
],
"properties": {
"content": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/ResponsesDeltaContent"
}
},
"id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"ResponsesError": {
"type": "object",
"description": "Response error",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"ResponsesIncompleteDetails": {
"type": "object",
"description": "Incomplete details for incomplete responses",
"required": [
"reason"
],
"properties": {
"reason": {
"type": "string"
}
}
},
"ResponsesInputTokensDetails": {
"type": "object",
"description": "Input tokens details",
"properties": {
"audio_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"cached_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"image_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"text_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
}
}
},
"ResponsesMessages": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
},
{
"type": "string"
}
]
},
"ResponsesObject": {
"type": "object",
"description": "Response object",
"required": [
"id",
"object",
"created_at",
"model",
"status",
"output"
],
"properties": {
"created_at": {
"type": "number",
"format": "double"
},
"error": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponsesError"
}
]
},
"id": {
"type": "string"
},
"incomplete_details": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponsesIncompleteDetails"
}
]
},
"instructions": {
"type": [
"string",
"null"
]
},
"metadata": {},
"model": {
"type": "string"
},
"object": {
"type": "string"
},
"output": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResponsesOutput"
}
},
"output_text": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string"
},
"usage": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponsesUsage"
}
]
}
}
},
"ResponsesOutput": {
"type": "object",
"description": "Response output item",
"required": [
"id",
"type",
"role",
"content"
],
"properties": {
"content": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResponsesContent"
}
},
"id": {
"type": "string"
},
"role": {
"type": "string"
},
"status": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
}
},
"ResponsesOutputTokensDetails": {
"type": "object",
"description": "Output tokens details",
"properties": {
"audio_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"reasoning_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"text_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
}
}
},
"ResponsesUsage": {
"type": "object",
"description": "Response usage information",
"required": [
"input_tokens",
"output_tokens",
"total_tokens"
],
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0
},
"input_tokens_details": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponsesInputTokensDetails"
}
]
},
"output_tokens": {
"type": "integer",
"minimum": 0
},
"output_tokens_details": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/ResponsesOutputTokensDetails"
}
]
},
"total_tokens": {
"type": "integer",
"minimum": 0
}
}
},
"SearchContextSize": {
"type": "string",
"enum": [
"low",
"medium",
"high"
]
},
"SerializedSession": {
"type": "object",
"description": "Wire format. Images and video frames are base64 PNGs.",
"required": [
"messages"
],
"properties": {
"files": {
"type": "array",
"items": {}
},
"images": {
"type": "array",
"items": {
"type": "string"
}
},
"messages": {
"type": "array",
"items": {}
},
"videos": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SerializedVideo"
}
}
}
},
"SerializedVideo": {
"type": "object",
"required": [
"fps",
"frames",
"total_num_frames",
"sampled_indices"
],
"properties": {
"fps": {
"type": "number",
"format": "double"
},
"frames": {
"type": "array",
"items": {
"type": "string"
}
},
"sampled_indices": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"total_num_frames": {
"type": "integer",
"minimum": 0
}
}
},
"SkillListObject": {
"type": "object",
"required": [
"object",
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SkillObject"
}
},
"object": {
"type": "string"
}
}
},
"SkillListQuery": {
"type": "object",
"properties": {
"limit": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"page": {
"type": [
"string",
"null"
]
},
"source": {
"type": [
"string",
"null"
]
}
}
},
"SkillObject": {
"type": "object",
"required": [
"id",
"object",
"created_at",
"name",
"description",
"latest_version"
],
"properties": {
"created_at": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"latest_version": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"name": {
"type": "string"
},
"object": {
"type": "string"
}
}
},
"SkillVersionObject": {
"type": "object",
"required": [
"id",
"object",
"skill_id",
"created_at",
"version",
"name",
"description"
],
"properties": {
"created_at": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"object": {
"type": "string"
},
"skill_id": {
"type": "string"
},
"version": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
},
"SourceMeta": {
"type": "object",
"description": "Which agentic tool produced the file, and when in the session.",
"required": [
"tool",
"round",
"turn"
],
"properties": {
"round": {
"type": "integer",
"minimum": 0
},
"tool": {
"type": "string"
},
"turn": {
"type": "integer",
"minimum": 0
}
}
},
"SpeechGenerationRequest": {
"type": "object",
"description": "Speech generation request",
"required": [
"input",
"response_format"
],
"properties": {
"input": {
"type": "string",
"description": "The text content to convert to speech.",
"example": "[S1] Dia is an open weights text to dialogue model. [S2] You get full control over scripts and voices. [S1] Wow. Amazing. (laughs) [S2] Try it now on Git hub or Hugging Face."
},
"model": {
"type": "string",
"description": "The TTS model to use for audio generation.",
"example": "nari-labs/Dia-1.6B"
},
"response_format": {
"$ref": "#/components/schemas/AudioResponseFormat",
"description": "The desired audio format for the generated speech."
}
}
},
"StopTokens": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
},
"description": "Multiple possible stop sequences"
},
{
"type": "string",
"description": "Single stop sequence"
}
],
"description": "Stop token configuration for generation\n\nDefines when the model should stop generating text, either with a single\nstop token or multiple possible stop sequences."
},
"StreamOptions": {
"type": "object",
"description": "Stream options configuration",
"properties": {
"include_usage": {
"type": [
"boolean",
"null"
],
"description": "Include usage statistics in stream"
}
}
},
"TextConfig": {
"type": "object",
"description": "Text output configuration",
"properties": {
"format": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/TextFormat",
"description": "Format for text output"
}
]
}
}
},
"TextFormat": {
"oneOf": [
{
"type": "object",
"description": "Plain text output",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
}
}
},
{
"type": "object",
"description": "JSON output with optional schema",
"required": [
"name",
"type"
],
"properties": {
"name": {
"type": "string",
"description": "Name for the schema"
},
"schema": {
"description": "JSON Schema definition"
},
"strict": {
"type": [
"boolean",
"null"
],
"description": "Whether to use strict schema validation"
},
"type": {
"type": "string",
"enum": [
"json_schema"
]
}
}
},
{
"type": "object",
"description": "JSON object output",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"json_object"
]
}
}
}
],
"description": "Text format configuration"
},
"Tool": {
"type": "object",
"description": "Tool definition",
"required": [
"type",
"function"
],
"properties": {
"function": {
"$ref": "#/components/schemas/Function"
},
"type": {
"$ref": "#/components/schemas/ToolType"
}
}
},
"ToolCall": {
"type": "object",
"description": "Represents a tool call made by the assistant\n\nThis structure wraps a function call with its type information.",
"required": [
"type",
"function"
],
"properties": {
"function": {
"$ref": "#/components/schemas/FunctionCalled",
"description": "The function call details"
},
"id": {
"type": [
"string",
"null"
],
"description": "Unique identifier for this tool call"
},
"type": {
"$ref": "#/components/schemas/ToolType",
"description": "The type of tool being called"
}
}
},
"ToolChoice": {
"oneOf": [
{
"type": "string",
"description": "Disallow selection of tools.",
"enum": [
"none"
]
},
{
"type": "string",
"description": "Allow automatic selection of any given tool, or none.",
"enum": [
"auto"
]
},
{
"type": "string",
"description": "Require at least one tool call.",
"enum": [
"required"
]
},
{
"$ref": "#/components/schemas/AllowedToolsToolChoice"
},
{
"$ref": "#/components/schemas/BuiltinToolChoice"
},
{
"$ref": "#/components/schemas/Tool"
},
{
"$ref": "#/components/schemas/NamedFunctionToolChoice"
}
]
},
"ToolType": {
"type": "string",
"description": "Type of tool",
"enum": [
"function"
]
},
"TruncationStrategy": {
"type": "string",
"description": "Truncation strategy for input",
"enum": [
"auto",
"disabled"
]
},
"TuneModelRequest": {
"type": "object",
"required": [
"model_id"
],
"properties": {
"cpu": {
"type": [
"boolean",
"null"
],
"description": "Force CPU-only tuning"
},
"dtype": {
"type": [
"string",
"null"
],
"description": "Optional model dtype (auto, f16, bf16, etc)"
},
"hf_revision": {
"type": [
"string",
"null"
],
"description": "Optional HF revision"
},
"max_batch_size": {
"type": [
"integer",
"null"
],
"description": "Optional max batch size for tuning",
"minimum": 0
},
"max_image_length": {
"type": [
"integer",
"null"
],
"description": "Optional max image length (multimodal)",
"minimum": 0
},
"max_num_images": {
"type": [
"integer",
"null"
],
"description": "Optional max num images (multimodal)",
"minimum": 0
},
"max_seq_len": {
"type": [
"integer",
"null"
],
"description": "Optional max sequence length for tuning",
"minimum": 0
},
"model_id": {
"type": "string",
"example": "meta-llama/Llama-3.2-3B-Instruct"
},
"profile": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/TuneProfileRequest",
"description": "Optional tuning profile"
}
]
},
"requested_isq": {
"type": [
"string",
"null"
],
"description": "Optional fixed ISQ level to test (e.g., Q4K)"
},
"token_source": {
"type": [
"string",
"null"
],
"description": "Optional HF token source"
}
}
},
"TuneProfileRequest": {
"type": "string",
"enum": [
"quality",
"balanced",
"fast"
]
},
"UnloadLoraAdapterRequest": {
"type": "object",
"required": [
"lora_name"
],
"properties": {
"expected_generation": {
"type": [
"string",
"null"
],
"description": "Remove only if the alias still points at this generation.",
"example": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a"
},
"lora_int_id": {
"type": [
"integer",
"null"
],
"format": "int64",
"description": "Accepted for vLLM request compatibility; aliases are authoritative in mistral.rs.",
"minimum": 0
},
"lora_name": {
"type": "string"
},
"model": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"UrlCitation": {
"type": "object",
"description": "URL citation details",
"required": [
"url"
],
"properties": {
"title": {
"type": [
"string",
"null"
],
"description": "Title of the page"
},
"url": {
"type": "string",
"description": "The URL"
}
}
},
"WebSearchContentType": {
"type": "string",
"enum": [
"text",
"image"
]
},
"WebSearchFilters": {
"type": "object",
"properties": {
"allowed_domains": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"blocked_domains": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
}
},
"WebSearchImageSettings": {
"type": "object",
"properties": {
"caption": {
"type": [
"boolean",
"null"
]
},
"max_results": {
"type": [
"integer",
"null"
],
"minimum": 0
}
}
},
"WebSearchOptions": {
"type": "object",
"properties": {
"external_web_access": {
"type": [
"boolean",
"null"
]
},
"extract_description": {
"type": [
"string",
"null"
],
"description": "Override the description for the extraction tool."
},
"filters": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/WebSearchFilters"
}
]
},
"image_settings": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/WebSearchImageSettings"
}
]
},
"return_token_budget": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/WebSearchReturnTokenBudget"
}
]
},
"search_content_types": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/WebSearchContentType"
}
},
"search_context_size": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/SearchContextSize"
}
]
},
"search_description": {
"type": [
"string",
"null"
],
"description": "Override the description for the search tool."
},
"user_location": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/components/schemas/WebSearchUserLocation"
}
]
}
}
},
"WebSearchReturnTokenBudget": {
"type": "string",
"enum": [
"default",
"unlimited"
]
},
"WebSearchUserLocation": {
"oneOf": [
{
"type": "object",
"required": [
"approximate",
"type"
],
"properties": {
"approximate": {
"$ref": "#/components/schemas/ApproximateUserLocation"
},
"type": {
"type": "string",
"enum": [
"approximate"
]
}
}
}
]
}
}
},
"tags": [
{
"name": "Mistral.rs",
"description": "Mistral.rs API"
},
{
"name": "LoRA adapters",
"description": "Dynamic LoRA discovery and lifecycle operations"
}
]
}