The Delegation
    • Documentation
      • Getting started
      • TypeScript client
      • Python client
      • Go client
      • Operations and observability
    • AI Gateway
      • Chat
        • Create a chat completion
      • Embeddings
        • Create text embeddings
      • Audio
        • Transcribe audio with AWS Transcribe
        • Text-to-speech
      • Images
        • Generate images with Gemini
      • Models
        • List available models
        • Retrieve a model
      • Users
        • List all users
        • Create a user
        • Get a user
        • Delete a user
        • Get user usage and cost summary
      • Health
        • Liveness / readiness probe
        • Provider health check
        • Gateway info
      • Admin
        • Per-provider request metrics
        • List configured providers
      • Schemas
        • ContentPartText
        • ContentPartImageURL
        • ContentPartAudio
        • ContentPartVideo
        • ContentPartDocument
        • ContentPart
        • FunctionDef
        • Tool
        • ToolCall
        • ChatMessage
        • ChatRequest
        • Usage
        • Choice
        • ChatResponse
        • EmbeddingsRequest
        • EmbeddingObject
        • EmbeddingsResponse
        • TranscriptionResponse
        • TTSRequest
        • ImageGenerationRequest
        • ImageData
        • ImageGenerationResponse
        • ModelInfo
        • ModelList
        • UsageRecord
        • User
        • UserUsageSummary
        • ProviderHealth
        • HealthResponse
        • ProviderMetrics
        • MetricsResponse
        • ErrorDetail
        • ErrorResponse
    • Platform API
      • Projects
        • List projects
        • Create project
        • Get project
        • Update project
        • Delete project
      • Tasks
        • Create task
        • Get task
        • Update task
      • Conversations
        • Get conversation
        • Clear conversation
        • Send message
      • Keys
        • Gateway usage statistics
      • Account
        • Get account
        • Update account role
        • Delete account
      • Schemas
        • Error
        • ChatMessage
        • ToolDefinition
        • ToolCall
        • ChatCompletionRequest
        • ChatCompletionResponse
        • EmbeddingRequest
        • ImageGenRequest
        • Project
        • Task
        • Message
        • Conversation
        • UserFile
        • GatewayKey
        • User
        • UserBalance
        • AuthSession
        • Session
    • File Service
      • Files
        • List files
        • Upload file
        • Update file
        • Delete / trash file
        • Restore file from trash
      • Schemas
        • Error
        • ChatMessage
        • ToolDefinition
        • ToolCall
        • ChatCompletionRequest
        • ChatCompletionResponse
        • EmbeddingRequest
        • ImageGenRequest
        • Project
        • Task
        • Message
        • Conversation
        • UserFile
        • GatewayKey
        • User
        • UserBalance
        • AuthSession
        • Session

    ChatRequest

    {
        "provider": "claude",
        "model": "claude-sonnet-4-6",
        "messages": [
            {
                "role": "system",
                "content": "string",
                "name": "string",
                "tool_calls": [
                    {
                        "id": "call_abc123",
                        "type": "function",
                        "function": {
                            "name": "get_weather",
                            "arguments": "{\"location\":\"Paris, FR\"}"
                        },
                        "index": 0
                    }
                ],
                "tool_call_id": "call_abc123"
            }
        ],
        "system": "You are a helpful assistant.",
        "max_tokens": 4096,
        "temperature": 0.7,
        "top_p": 0,
        "stream": false,
        "stop": [
            "string"
        ],
        "tools": [
            {
                "type": "function",
                "function": {
                    "name": "get_weather",
                    "description": "Get the current weather for a location.",
                    "parameters": {
                        "type": "object",
                        "properties": {
                            "location": {
                                "type": "string",
                                "description": "City and country, e.g. 'Paris, FR'"
                            }
                        },
                        "required": [
                            "location"
                        ]
                    }
                }
            }
        ],
        "tool_choice": "auto",
        "response_format": {
            "type": "text",
            "json_schema": {}
        },
        "reasoning_effort": "low",
        "thinking_budget_tokens": 0,
        "user": "string",
        "max_completion_tokens": 0,
        "stream_options": {
            "include_usage": true
        }
    }
    Built with