> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# चैट completion बनाएँ

> OpenAI-संगत chat endpoint से chat completions जनरेट करें।

## सर्वर टूल

`/v1/chat/completions` सामान्य function tools और Gateway द्वारा प्रबंधित इन server tools को सपोर्ट करता है:

* `gateway:datetime`
* `phaseo:web_search`
* `phaseo:web_fetch`
* `phaseo:advisor`
* `phaseo:image_generation`

### दिनांक और समय का उदाहरण

```bash theme={null}
curl https://api.phaseo.app/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5-nano",
    "stream": false,
    "messages": [
      { "role": "user", "content": "What is the current datetime in Europe/London?" }
    ],
    "tools": [
      {
        "type": "gateway:datetime",
        "parameters": { "timezone": "Europe/London" }
      }
    ],
    "tool_choice": "auto"
  }'
```

सर्वर टूल उपयोग होने पर usage में ये शामिल होते हैं:

```json theme={null}
{
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 34,
    "total_tokens": 46,
    "server_tool_use": {
      "datetime_requests": 1
    }
  }
}
```

`phaseo:web_search` से `server_tool_use.web_search_requests`, `server_tool_use.web_search_results` और `server_tool_use.web_search_extra_results` जुड़ते हैं। `phaseo:web_fetch` से `server_tool_use.web_fetch_requests` जुड़ता है।

## स्ट्रीमिंग नोट

`stream: true` भी समर्थित है। Gateway-प्रबंधित server tools के लिए Phaseo upstream tool-call turn को materialize करके loop जारी रख सकता है और फिर synthetic stream दोबारा भेज सकता है।


## OpenAPI

````yaml hi/openapi/v1/openapi.localized.yaml POST /chat/completions
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    OpenAI-संगत एंडपॉइंट के माध्यम से विभिन्न AI मॉडल तक पहुँचने के लिए एक गेटवे
    API।
  version: 1.0.0
  contact:
    name: Phaseo
    url: https://phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
    description: वैश्विक रूटिंग
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core Phaseo Gateway operations.
paths:
  /chat/completions:
    post:
      tags:
        - Gateway
      summary: चैट completion बनाएँ
      description: चैट संदेश के लिए completion बनाता है।
      operationId: createChatCompletion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionsRequest'
            examples:
              datetimeServerTool:
                summary: Built-in datetime server tool
                value:
                  model: openai/gpt-5-nano
                  stream: false
                  messages:
                    - role: user
                      content: What is the current datetime in Europe/London?
                  tools:
                    - type: gateway:datetime
                      parameters:
                        timezone: Europe/London
                  tool_choice: auto
      responses:
        '200':
          description: चैट completion का प्रतिसाद
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionsResponse'
        '429':
          $ref: '#/components/responses/UpstreamRateLimited'
      servers:
        - url: https://api.phaseo.app/v1
          description: वैश्विक रूटिंग
        - url: https://eu.api.phaseo.app/v1
          description: यूरोपीय संघ क्षेत्रीय प्रदाता रूटिंग (केवल टेक्स्ट)
        - url: https://us.api.phaseo.app/v1
          description: अमेरिकी क्षेत्रीय प्रदाता रूटिंग (केवल टेक्स्ट)
components:
  schemas:
    ChatCompletionsRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
        messages:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ChatMessage'
        reasoning:
          $ref: '#/components/schemas/OpenAIReasoningConfig'
        reasoning_effort:
          type: string
          description: '`reasoning.effort` के लिए OpenAI-संगत alias।'
          enum:
            - none
            - instant
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
        frequency_penalty:
          type: number
          minimum: -2
          maximum: 2
        logit_bias:
          type: object
          additionalProperties:
            type: number
        max_completion_tokens:
          type: integer
          minimum: 1
        max_tokens:
          type: integer
          minimum: 1
        metadata:
          type: object
          additionalProperties:
            type: string
        session_id:
          type: string
          maxLength: 256
          description: >-
            ऑब्ज़र्वेबिलिटी के लिए संबंधित अनुरोधों (जैसे बातचीत या एजेंट
            वर्कफ़्लो) को समूहित करने वाला विशिष्ट पहचानकर्ता।
        presence_penalty:
          type: number
          minimum: -2
          maximum: 2
        seed:
          type: integer
          minimum: -9223372036854776000
          maximum: 9223372036854776000
        store:
          type: boolean
        stream:
          type: boolean
          default: false
        stream_options:
          type: object
        temperature:
          type: number
          minimum: 0
          maximum: 2
          default: 1
        tools:
          type: array
          description: >-
            मॉडल फ़ंक्शन कॉल और गेटवे सर्वर टूल के लिए टूल परिभाषाएँ। अंतर्निहित
            सर्वर टूल में दिनांक-समय, वेब खोज, वेब फ़ेच, Advisor, Subagent,
            Fusion, मॉडल खोज, इमेज जनरेशन और पैच निर्माण शामिल हैं।
          items:
            $ref: '#/components/schemas/TextGenerateTool'
        max_tool_calls:
          type: integer
          minimum: 1
        parallel_tool_calls:
          type: boolean
          default: true
        tool_choice:
          $ref: '#/components/schemas/TextToolChoice'
        logprobs:
          type: boolean
          default: false
        top_logprobs:
          type: integer
          minimum: 0
          maximum: 20
        top_p:
          type: number
          minimum: 0
          maximum: 1
        stop:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        response_format:
          oneOf:
            - type: string
            - type: object
              properties:
                type:
                  type: string
                schema:
                  type: object
        modalities:
          type: array
          items:
            type: string
            enum:
              - text
              - image
              - audio
        image_config:
          $ref: '#/components/schemas/ImageConfig'
        usage:
          type: boolean
        provider:
          oneOf:
            - type: string
              enum:
                - openai
                - anthropic
                - google-ai-studio
                - gemini
                - mistral
                - x-ai
                - xai
                - groq
                - together
            - $ref: '#/components/schemas/ProviderRoutingOptions'
          description: >-
            प्रदाता चयनकर्ता। एकल प्रदाता के लिए string या `{ "only": ["groq"]
            }` जैसे रूटिंग विकल्पों का उपयोग करें।
        provider_options:
          $ref: '#/components/schemas/ProviderOptions'
        user_id:
          type: string
        user:
          type: string
        service_tier:
          type: string
          enum:
            - standard
            - default
            - fast
            - ultrafast
            - priority
            - flex
            - batch
        prompt_cache_key:
          type: string
          nullable: true
        safety_identifier:
          type: string
          nullable: true
        meta:
          type: boolean
          default: false
        echo_upstream_request:
          type: boolean
        debug:
          $ref: '#/components/schemas/DebugOptions'
    ChatCompletionsResponse:
      type: object
      properties:
        id:
          type: string
        nativeResponseId:
          type: string
          nullable: true
        object:
          type: string
        created:
          type: integer
        model:
          type: string
        provider:
          type: string
        choices:
          type: array
          items:
            $ref: '#/components/schemas/ChatChoice'
        usage:
          $ref: '#/components/schemas/Usage'
    ChatMessage:
      type: object
      required:
        - role
      properties:
        role:
          type: string
          enum:
            - system
            - developer
            - user
            - assistant
            - tool
        content:
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/MessageContentPart'
        name:
          type: string
        tool_calls:
          type: array
          items:
            $ref: '#/components/schemas/ToolCall'
        images:
          type: array
          items:
            $ref: '#/components/schemas/ChatImageOutputPart'
        audios:
          type: array
          items:
            $ref: '#/components/schemas/ChatAudioOutputPart'
        tool_call_id:
          type: string
      discriminator:
        propertyName: role
    OpenAIReasoningConfig:
      type: object
      properties:
        effort:
          type: string
          enum:
            - none
            - instant
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
          default: medium
        mode:
          type: string
          enum:
            - standard
            - pro
        summary:
          type: string
          enum:
            - auto
            - concise
            - detailed
          default: auto
        enabled:
          type: boolean
        max_tokens:
          type: integer
          minimum: 0
    TextGenerateTool:
      oneOf:
        - $ref: '#/components/schemas/FunctionToolDefinition'
        - $ref: '#/components/schemas/GatewayDatetimeToolDefinition'
        - $ref: '#/components/schemas/GatewayWebSearchToolDefinition'
        - $ref: '#/components/schemas/GatewayWebFetchToolDefinition'
        - $ref: '#/components/schemas/SubagentToolDefinition'
        - $ref: '#/components/schemas/FusionToolDefinition'
        - $ref: '#/components/schemas/SearchModelsToolDefinition'
    TextToolChoice:
      description: >-
        टूल चयन रणनीति। Phaseo सर्वर-टूल प्रकार स्वीकार किए जाते हैं और upstream
        फ़ंक्शन/टूल लक्ष्यों में बदले जाते हैं।
      oneOf:
        - type: string
          enum:
            - auto
            - none
            - required
            - phaseo:datetime
            - phaseo:web_search
            - phaseo:web_fetch
            - phaseo:subagent
            - phaseo:fusion
            - phaseo:search_models
            - gateway:datetime
            - gateway:web_search
            - gateway:web_fetch
        - type: object
    ImageConfig:
      type: object
      properties:
        aspect_ratio:
          type: string
        image_size:
          type: string
          enum:
            - 0.5K
            - 1K
            - 2K
            - 4K
        include_rai_reason:
          type: boolean
        font_inputs:
          type: array
          items:
            type: object
            properties:
              font_url:
                type: string
                format: uri
              text:
                type: string
        super_resolution_references:
          type: array
          items:
            type: string
        reference_images:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
    ProviderRoutingOptions:
      type: object
      description: गेटवे चयन के लिए प्रदाता रूटिंग प्राथमिकताएँ।
      properties:
        order:
          type: array
          items:
            type: string
        only:
          type: array
          items:
            type: string
        ignore:
          type: array
          items:
            type: string
        include_alpha:
          type: boolean
          description: रूटिंग में alpha प्रदाताओं को शामिल करें (डिफ़ॉल्ट रूप से बंद)।
        allow_fallbacks:
          type: boolean
          nullable: true
          description: विफलता के बाद किसी अन्य योग्य प्रदाता पर fallback की अनुमति दें।
        require_parameters:
          type: boolean
          nullable: true
          description: >-
            रूटिंग से पहले अनुरोधित पैरामीटरों के लिए प्रदाता का समर्थन आवश्यक
            करें।
        required_execution_region:
          type: string
          nullable: true
          description: रूटिंग को अनुरोधित execution region वाले प्रदाताओं तक सीमित करें।
        required_data_region:
          type: string
          nullable: true
          description: रूटिंग को अनुरोधित data region वाले प्रदाताओं तक सीमित करें।
        require_zero_data_retention:
          type: boolean
          nullable: true
          description: >-
            रूटिंग को उन प्रदाताओं तक सीमित करें जो शून्य डेटा प्रतिधारण का
            समर्थन करते हैं।
        data_collection:
          type: string
          nullable: true
          enum:
            - allow
            - deny
        zdr:
          type: boolean
          nullable: true
        enforce_distillable_text:
          type: boolean
          nullable: true
        quantizations:
          type: array
          nullable: true
          items:
            type: string
        sort:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          description: >-
            इस अनुरोध के लिए प्रदाताओं को क्रम दें, जैसे कीमत, विलंबता या
            थ्रूपुट के आधार पर।
        max_price:
          type: object
          properties:
            prompt:
              oneOf:
                - type: number
                - type: string
            completion:
              oneOf:
                - type: number
                - type: string
            image:
              oneOf:
                - type: number
                - type: string
            audio:
              oneOf:
                - type: number
                - type: string
            request:
              oneOf:
                - type: number
                - type: string
        preferred_min_throughput:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
        preferred_max_latency:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
    ProviderOptions:
      type: object
      description: वैकल्पिक प्रदाता-विशिष्ट विकल्प।
      properties:
        openai:
          type: object
          properties:
            context_management:
              type: object
              description: वैकल्पिक OpenAI संदर्भ प्रबंधन कॉन्फ़िगरेशन।
              properties:
                type:
                  type: string
                  enum:
                    - compaction
                compact_threshold:
                  type: number
              required:
                - type
            prompt_cache_retention:
              type: string
        anthropic:
          type: object
          properties:
            cache_control:
              $ref: '#/components/schemas/CacheControl'
        google:
          type: object
          properties:
            cache_control:
              $ref: '#/components/schemas/CacheControl'
            cached_content:
              type: string
            cache_ttl:
              type: string
    DebugOptions:
      type: object
      description: गेटवे डिबग नियंत्रण। ये फ़्लैग कभी भी प्रदाता को फ़ॉरवर्ड नहीं किए जाते।
      properties:
        enabled:
          type: boolean
        return_upstream_request:
          type: boolean
        return_upstream_response:
          type: boolean
        trace:
          type: boolean
        trace_level:
          type: string
          enum:
            - summary
            - full
    ChatChoice:
      type: object
      properties:
        index:
          type: integer
        message:
          $ref: '#/components/schemas/ChatMessage'
        finish_reason:
          type: string
          enum:
            - stop
            - length
            - tool_calls
            - content_filter
    Usage:
      type: object
      properties:
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        total_tokens:
          type: integer
        server_tool_use:
          $ref: '#/components/schemas/ServerToolUsage'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        ok:
          type: boolean
          example: false
        error:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          example: error_type
        message:
          type: string
          example: Human-readable error message
        description:
          type: string
          example: Additional error details.
        generation_id:
          type: string
          example: G-abc123
        status_code:
          type: integer
          example: 502
        error_type:
          type: string
          enum:
            - user
            - system
          example: system
        error_origin:
          type: string
          enum:
            - user
            - gateway
            - upstream
          example: upstream
        reason:
          type: string
          example: all_candidates_failed
        attempt_count:
          type: integer
          example: 2
        failed_providers:
          type: array
          items:
            type: string
          example:
            - google-ai-studio
            - openai
        failed_statuses:
          type: array
          items:
            type: integer
          example:
            - 403
            - 429
        upstream_error:
          $ref: '#/components/schemas/ErrorUpstreamError'
        failure_sample:
          type: array
          items:
            $ref: '#/components/schemas/ErrorFailureSampleItem'
        provider_failure_diagnostics:
          $ref: '#/components/schemas/ErrorProviderFailureDiagnostics'
        routing_diagnostics:
          $ref: '#/components/schemas/ErrorRoutingDiagnostics'
        provider_candidate_diagnostics:
          $ref: '#/components/schemas/ErrorProviderCandidateDiagnostics'
        provider_enablement:
          $ref: '#/components/schemas/ErrorProviderEnablementDiagnostics'
        missing_pricing_providers:
          type: array
          items:
            type: string
        provider_payment_required_provider:
          type: string
          example: openai
        provider_payment_required_support_notice:
          type: string
          example: >-
            Our upstream provider billing appears to be unavailable. If this
            persists, contact support.
        details:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
    MessageContentPart:
      oneOf:
        - $ref: '#/components/schemas/TextContentPart'
        - $ref: '#/components/schemas/ImageContentPart'
        - $ref: '#/components/schemas/AudioContentPart'
        - $ref: '#/components/schemas/VideoContentPart'
        - $ref: '#/components/schemas/ToolCallContentPart'
    ToolCall:
      type: object
      required:
        - id
        - type
        - function
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - function
        function:
          type: object
          properties:
            name:
              type: string
            arguments:
              type: string
            description:
              type: string
            parameters:
              type: object
    ChatImageOutputPart:
      type: object
      required:
        - type
        - image_url
      properties:
        type:
          type: string
          enum:
            - image_url
        image_url:
          type: object
          required:
            - url
          properties:
            url:
              type: string
              description: HTTP(S) URL या डेटा URI।
        mime_type:
          type: string
    ChatAudioOutputPart:
      type: object
      required:
        - type
        - audio_url
      properties:
        type:
          type: string
          enum:
            - audio_url
        audio_url:
          type: object
          required:
            - url
          properties:
            url:
              type: string
              description: HTTP(S) URL या डेटा URI।
        mime_type:
          type: string
        format:
          type: string
          enum:
            - wav
            - mp3
            - flac
            - m4a
            - ogg
            - pcm16
            - pcm24
    FunctionToolDefinition:
      type: object
      required:
        - type
        - function
      properties:
        type:
          type: string
          enum:
            - function
        async:
          type: boolean
          description: >-
            कॉलर के इस टूल को चलाने के दौरान समर्थित OpenAI मॉडल को जारी रहने
            देता है। सभी टेक्स्ट API पर स्वीकार किया जाता है और अन्य प्रदाता इसे
            अनदेखा करते हैं।
        function:
          type: object
          required:
            - name
            - parameters
          properties:
            name:
              type: string
            description:
              type: string
            parameters:
              type: object
      additionalProperties: true
    GatewayDatetimeToolDefinition:
      type: object
      description: >-
        गेटवे द्वारा प्रबंधित सर्वर टूल। गेटवे दिनांक-समय की जानकारी प्राप्त
        करता है और परिणाम को मॉडल टूल लूप में वापस जोड़ता है।
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - phaseo:datetime
            - gateway:datetime
        parameters:
          type: object
          properties:
            timezone:
              type: string
              description: 'IANA समय क्षेत्र का नाम (उदाहरण: Europe/London)।'
          additionalProperties: false
        timezone:
          type: string
          description: डिफ़ॉल्ट समय क्षेत्र (IANA) के लिए पुराना शॉर्टकट।
      additionalProperties: false
    GatewayWebSearchToolDefinition:
      type: object
      description: >-
        गेटवे द्वारा प्रबंधित सर्वर टूल। गेटवे वेब खोज करता है और सामान्यीकृत
        खोज परिणामों को मॉडल टूल लूप में वापस जोड़ता है।
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - phaseo:web_search
            - gateway:web_search
        parameters:
          type: object
          properties:
            engine:
              type: string
              enum:
                - auto
                - native
                - exa
                - firecrawl
                - parallel
                - perplexity
                - tinyfish
            max_results:
              type: integer
              minimum: 1
              maximum: 25
            language:
              type: string
            page:
              type: integer
              minimum: 0
              maximum: 10
            include_text:
              type: boolean
            include_highlights:
              type: boolean
          additionalProperties: false
        max_results:
          type: integer
          minimum: 1
          maximum: 25
        engine:
          type: string
          enum:
            - auto
            - native
            - exa
            - firecrawl
            - parallel
            - perplexity
            - tinyfish
        language:
          type: string
        page:
          type: integer
          minimum: 0
          maximum: 10
        include_text:
          type: boolean
        include_highlights:
          type: boolean
      additionalProperties: false
    GatewayWebFetchToolDefinition:
      type: object
      description: >-
        गेटवे द्वारा प्रबंधित सर्वर टूल। गेटवे एक HTTP(S) पेज प्राप्त करता है,
        उसे सीमित आकार के टेक्स्ट में बदलता है और परिणाम को मॉडल टूल लूप में
        वापस जोड़ता है।
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - phaseo:web_fetch
            - gateway:web_fetch
        parameters:
          type: object
          properties:
            max_chars:
              type: integer
              minimum: 1
              maximum: 100000
          additionalProperties: false
        max_chars:
          type: integer
          minimum: 1
          maximum: 100000
      additionalProperties: false
    SubagentToolDefinition:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - phaseo:subagent
        parameters:
          type: object
          additionalProperties: true
    FusionToolDefinition:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - phaseo:fusion
        parameters:
          type: object
          required:
            - analysis_models
          properties:
            analysis_models:
              type: array
              minItems: 2
              maxItems: 8
              items:
                type: string
            model:
              type: string
          additionalProperties: true
    SearchModelsToolDefinition:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - phaseo:search_models
        parameters:
          type: object
          properties:
            max_results:
              type: integer
              minimum: 1
              maximum: 20
    CacheControl:
      type: object
      properties:
        type:
          type: string
        ttl:
          type: string
        scope:
          type: string
      additionalProperties: true
    ServerToolUsage:
      type: object
      properties:
        datetime_requests:
          type: integer
          minimum: 0
        web_search_requests:
          type: integer
          minimum: 0
        subagent_requests:
          type: integer
          minimum: 0
        fusion_requests:
          type: integer
          minimum: 0
        search_models_requests:
          type: integer
          minimum: 0
        web_fetch_requests:
          type: integer
          minimum: 0
        advisor_requests:
          type: integer
          minimum: 0
        image_generation_requests:
          type: integer
          minimum: 0
        apply_patch_requests:
          type: integer
          minimum: 0
      additionalProperties: false
    ErrorUpstreamError:
      type: object
      properties:
        code:
          type: string
          nullable: true
          example: PERMISSION_DENIED
        message:
          type: string
          nullable: true
          example: The caller does not have permission.
        description:
          type: string
          nullable: true
        param:
          type: string
          nullable: true
    ErrorFailureSampleItem:
      type: object
      properties:
        provider:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        status:
          type: integer
          nullable: true
        upstream_error_code:
          type: string
          nullable: true
        upstream_error_message:
          type: string
          nullable: true
        upstream_error_description:
          type: string
          nullable: true
        upstream_error_param:
          type: string
          nullable: true
        upstream_payload_preview:
          type: string
          nullable: true
        retryable:
          type: boolean
          nullable: true
      additionalProperties: true
    ErrorProviderFailureDiagnostics:
      type: object
      properties:
        category:
          type: string
          enum:
            - credentials_not_configured
            - credentials_invalid_or_forbidden
            - provider_access_missing
            - region_or_project_restriction
            - model_unavailable_for_endpoint
            - rate_limited
            - server_error
        hint:
          type: string
        provider:
          type: string
          nullable: true
    ErrorRoutingDiagnostics:
      type: object
      properties:
        filterStages:
          type: array
          items:
            type: object
            properties:
              stage:
                type: string
              beforeCount:
                type: integer
              afterCount:
                type: integer
              droppedProviders:
                type: array
                items:
                  type: object
                  properties:
                    providerId:
                      type: string
                      nullable: true
                    reason:
                      type: string
                      nullable: true
                  additionalProperties: true
            additionalProperties: true
      additionalProperties: true
    ErrorProviderCandidateDiagnostics:
      type: object
      properties:
        totalProviders:
          type: integer
        supportsEndpointCount:
          type: integer
        candidateCount:
          type: integer
        droppedUnsupportedEndpoint:
          type: array
          items:
            type: string
        droppedMissingAdapter:
          type: array
          items:
            type: object
            properties:
              providerId:
                type: string
                nullable: true
              endpoint:
                type: string
                nullable: true
            additionalProperties: true
      additionalProperties: true
    ErrorProviderEnablementDiagnostics:
      type: object
      properties:
        capability:
          type: string
        providersBefore:
          type: array
          items:
            type: string
        providersAfter:
          type: array
          items:
            type: string
        dropped:
          type: array
          items:
            type: object
            properties:
              providerId:
                type: string
                nullable: true
              reason:
                type: string
                nullable: true
            additionalProperties: true
      additionalProperties: true
    TextContentPart:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
    ImageContentPart:
      type: object
      required:
        - type
        - image_url
      properties:
        type:
          type: string
          enum:
            - image_url
        image_url:
          type: object
          properties:
            url:
              type: string
              description: HTTP(S) URL या डेटा URI।
    AudioContentPart:
      type: object
      required:
        - type
        - input_audio
      properties:
        type:
          type: string
          enum:
            - input_audio
        input_audio:
          type: object
          properties:
            data:
              type: string
            format:
              type: string
              enum:
                - wav
                - mp3
                - flac
                - m4a
                - ogg
                - pcm16
                - pcm24
    VideoContentPart:
      type: object
      required:
        - type
        - video_url
      properties:
        type:
          type: string
          enum:
            - input_video
        video_url:
          type: string
          format: uri
    ToolCallContentPart:
      type: object
      required:
        - type
        - id
        - function
      properties:
        type:
          type: string
          enum:
            - tool_call
        id:
          type: string
        function:
          type: object
          properties:
            name:
              type: string
            arguments:
              type: string
  responses:
    UpstreamRateLimited:
      description: चयनित upstream प्रदाता ने अनुरोध की दर सीमित कर दी।
      headers:
        Retry-After:
          description: >-
            पुनः प्रयास करने से पहले प्रतीक्षा के लिए प्रदाता द्वारा सत्यापित
            समय, सेकंड में।
          schema:
            type: integer
            minimum: 0
            maximum: 86400
        X-Phaseo-Upstream-RateLimit-Limit:
          $ref: '#/components/headers/UpstreamRateLimitValue'
        X-Phaseo-Upstream-RateLimit-Remaining:
          $ref: '#/components/headers/UpstreamRateLimitValue'
        X-Phaseo-Upstream-RateLimit-Reset:
          $ref: '#/components/headers/UpstreamRateLimitValue'
        X-Phaseo-Upstream-RateLimit-Limit-Requests:
          $ref: '#/components/headers/UpstreamRateLimitValue'
        X-Phaseo-Upstream-RateLimit-Remaining-Requests:
          $ref: '#/components/headers/UpstreamRateLimitValue'
        X-Phaseo-Upstream-RateLimit-Reset-Requests:
          $ref: '#/components/headers/UpstreamRateLimitValue'
        X-Phaseo-Upstream-RateLimit-Limit-Tokens:
          $ref: '#/components/headers/UpstreamRateLimitValue'
        X-Phaseo-Upstream-RateLimit-Remaining-Tokens:
          $ref: '#/components/headers/UpstreamRateLimitValue'
        X-Phaseo-Upstream-RateLimit-Reset-Tokens:
          $ref: '#/components/headers/UpstreamRateLimitValue'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  headers:
    UpstreamRateLimitValue:
      description: >-
        केवल BYOK के लिए प्रदाता कोटा मेटाडेटा। प्रबंधित-प्रदाता अनुरोधों में
        शामिल नहीं होता।
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer टोकन से प्रमाणीकरण

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.