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

# POST /v1/chat/completions

> Available at the instance root or under a provider/namespace prefix. Shared paths select the wire dialect from client headers; without dialect evidence, the first listed route wins.



## OpenAPI

````yaml /generated/openapi.json post /v1/chat/completions
openapi: 3.1.0
info:
  description: >-
    Forwarding, management, portal and OAuth APIs generated from Rust types.
    Input and output schemas preserve their respective Serde contracts.
    Streaming events and WebSocket messages are documented alongside HTTP
    payloads.
  title: GPROXY HTTP API
  version: 4.2.1
servers: []
security:
  - bearer: []
  - anthropicKey: []
  - googleKey: []
  - queryKey: []
paths:
  /v1/chat/completions:
    post:
      tags:
        - Forwarding
      summary: POST /v1/chat/completions
      description: >-
        Available at the instance root or under a provider/namespace prefix.
        Shared paths select the wire dialect from client headers; without
        dialect evidence, the first listed route wins.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Input_GenerateContentRequestBody4'
        required: true
      responses:
        2XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Output_GenerateContentResponseBody4'
            text/event-stream:
              schema:
                type: string
              x-event-schema:
                $ref: '#/components/schemas/Output_ChatCompletionChunk'
          description: Successful protocol response
        default:
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/Output_Envelope'
                  - properties:
                      error:
                        $ref: '#/components/schemas/Output_ErrorDetail'
                    required:
                      - error
                    type: object
                  - allOf:
                      - $ref: '#/components/schemas/Output_ErrorEvent'
                      - properties:
                          type:
                            const: error
                        required:
                          - type
                        type: object
                  - properties:
                      error:
                        $ref: '#/components/schemas/Output_GenerateContentError'
                    required:
                      - error
                    type: object
            text/plain:
              schema:
                type: string
          description: Gateway or upstream error
components:
  schemas:
    Input_GenerateContentRequestBody4:
      additionalProperties: true
      properties:
        audio:
          anyOf:
            - $ref: '#/components/schemas/Input_ChatAudioParam'
            - type: 'null'
        frequency_penalty:
          format: double
          type:
            - number
            - 'null'
        function_call:
          anyOf:
            - $ref: '#/components/schemas/Input_FunctionCallChoice'
            - type: 'null'
        functions:
          items:
            $ref: '#/components/schemas/Input_LegacyFunction'
          type:
            - array
            - 'null'
        logit_bias:
          additionalProperties:
            format: double
            type: number
          type:
            - object
            - 'null'
        logprobs:
          type:
            - boolean
            - 'null'
        max_completion_tokens:
          format: int64
          type:
            - integer
            - 'null'
        max_tokens:
          format: int64
          type:
            - integer
            - 'null'
        messages:
          items:
            $ref: '#/components/schemas/Input_ChatMessage'
          type: array
        metadata:
          additionalProperties:
            type: string
          type:
            - object
            - 'null'
        modalities:
          items:
            $ref: '#/components/schemas/Input_Modality2'
          type:
            - array
            - 'null'
        model:
          type: string
        moderation:
          anyOf:
            - $ref: '#/components/schemas/Input_Moderation2'
            - type: 'null'
        'n':
          format: int64
          type:
            - integer
            - 'null'
        parallel_tool_calls:
          type:
            - boolean
            - 'null'
        prediction:
          anyOf:
            - $ref: '#/components/schemas/Input_Prediction'
            - type: 'null'
        presence_penalty:
          format: double
          type:
            - number
            - 'null'
        prompt_cache_key:
          type:
            - string
            - 'null'
        prompt_cache_options:
          anyOf:
            - $ref: '#/components/schemas/Input_PromptCacheOptions2'
            - type: 'null'
        prompt_cache_retention:
          anyOf:
            - $ref: '#/components/schemas/Input_PromptCacheRetention2'
            - type: 'null'
        reasoning_effort:
          anyOf:
            - $ref: '#/components/schemas/Input_ReasoningEffort2'
            - type: 'null'
        response_format:
          anyOf:
            - $ref: '#/components/schemas/Input_ResponseFormat'
            - type: 'null'
        safety_identifier:
          type:
            - string
            - 'null'
        seed:
          format: int64
          type:
            - integer
            - 'null'
        service_tier:
          anyOf:
            - $ref: '#/components/schemas/Input_ServiceTier4'
            - type: 'null'
        stop:
          anyOf:
            - $ref: '#/components/schemas/Input_Stop'
            - type: 'null'
        store:
          type:
            - boolean
            - 'null'
        stream:
          type:
            - boolean
            - 'null'
        stream_options:
          anyOf:
            - $ref: '#/components/schemas/Input_StreamOptions2'
            - type: 'null'
        temperature:
          format: double
          type:
            - number
            - 'null'
        tool_choice:
          anyOf:
            - $ref: '#/components/schemas/Input_ToolChoice3'
            - type: 'null'
        tools:
          items:
            $ref: '#/components/schemas/Input_ChatTool'
          type:
            - array
            - 'null'
        top_logprobs:
          format: int64
          type:
            - integer
            - 'null'
        top_p:
          format: double
          type:
            - number
            - 'null'
        user:
          type:
            - string
            - 'null'
        verbosity:
          anyOf:
            - $ref: '#/components/schemas/Input_Verbosity'
            - type: 'null'
        web_search_options:
          anyOf:
            - $ref: '#/components/schemas/Input_WebSearchOptions'
            - type: 'null'
      required:
        - messages
        - model
      type: object
    Output_GenerateContentResponseBody4:
      additionalProperties: true
      properties:
        choices:
          items:
            $ref: '#/components/schemas/Output_Choice'
          type: array
        created:
          format: int64
          type: integer
        id:
          type: string
        model:
          type: string
        moderation:
          anyOf:
            - $ref: '#/components/schemas/Output_ModerationResponse'
            - type: 'null'
        object:
          $ref: '#/components/schemas/Output_CompletionObject'
        service_tier:
          anyOf:
            - $ref: '#/components/schemas/Output_ResponseServiceTier2'
            - type: 'null'
        system_fingerprint:
          type:
            - string
            - 'null'
        usage:
          anyOf:
            - $ref: '#/components/schemas/Output_Usage2'
            - type: 'null'
      required:
        - id
        - choices
        - created
        - model
        - object
      type: object
    Output_Envelope:
      properties:
        error:
          $ref: '#/components/schemas/Output_EnvelopeBody'
      required:
        - error
      type: object
    Output_ErrorDetail:
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
      required:
        - message
      type: object
    Output_ErrorEvent:
      additionalProperties: true
      properties:
        error:
          $ref: '#/components/schemas/Output_StreamError'
        request_id:
          type:
            - string
            - 'null'
      required:
        - error
      type: object
    Output_GenerateContentError:
      additionalProperties: true
      properties:
        code:
          format: int64
          type: integer
        details:
          items: true
          type:
            - array
            - 'null'
        message:
          type: string
        status:
          type:
            - string
            - 'null'
      required:
        - code
        - message
      type: object
    Input_ChatAudioParam:
      additionalProperties: true
      properties:
        format:
          $ref: '#/components/schemas/Input_ChatAudioFormat'
        voice:
          $ref: '#/components/schemas/Input_AudioVoice'
      required:
        - voice
        - format
      type: object
    Input_FunctionCallChoice:
      anyOf:
        - $ref: '#/components/schemas/Input_FunctionCallMode'
        - $ref: '#/components/schemas/Input_LegacyFunctionChoice'
    Input_LegacyFunction:
      additionalProperties: true
      properties:
        description:
          type:
            - string
            - 'null'
        name:
          type: string
        parameters:
          additionalProperties: true
          type:
            - object
            - 'null'
      required:
        - name
      type: object
    Input_ChatMessage:
      anyOf:
        - $ref: '#/components/schemas/Input_DeveloperMessage'
        - $ref: '#/components/schemas/Input_SystemMessage'
        - $ref: '#/components/schemas/Input_UserMessage'
        - $ref: '#/components/schemas/Input_AssistantMessage'
        - $ref: '#/components/schemas/Input_ToolMessage'
        - $ref: '#/components/schemas/Input_FunctionMessage'
    Input_Modality2:
      enum:
        - text
        - audio
      type: string
    Input_Moderation2:
      additionalProperties: true
      properties:
        model:
          type: string
        policy:
          anyOf:
            - $ref: '#/components/schemas/Input_ModerationPolicy2'
            - type: 'null'
      required:
        - model
      type: object
    Input_Prediction:
      additionalProperties: true
      properties:
        content:
          $ref: '#/components/schemas/Input_StringOrTextParts'
        type:
          $ref: '#/components/schemas/Input_PredictionType'
      required:
        - type
        - content
      type: object
    Input_PromptCacheOptions2:
      additionalProperties: true
      properties:
        mode:
          anyOf:
            - $ref: '#/components/schemas/Input_PromptCacheOptionMode'
            - type: 'null'
        ttl:
          anyOf:
            - $ref: '#/components/schemas/Input_PromptCacheTtl2'
            - type: 'null'
      type: object
    Input_PromptCacheRetention2:
      enum:
        - in_memory
        - 24h
      type: string
    Input_ReasoningEffort2:
      enum:
        - none
        - minimal
        - low
        - medium
        - high
        - xhigh
        - max
      type: string
    Input_ResponseFormat:
      anyOf:
        - $ref: '#/components/schemas/Input_TextResponseFormat2'
        - $ref: '#/components/schemas/Input_JsonSchemaResponseFormat'
        - $ref: '#/components/schemas/Input_JsonObjectResponseFormat'
    Input_ServiceTier4:
      enum:
        - auto
        - default
        - flex
        - scale
        - priority
        - fast
        - ultrafast
      type: string
    Input_Stop:
      anyOf:
        - type: string
        - items:
            type: string
          type: array
    Input_StreamOptions2:
      additionalProperties: true
      properties:
        include_obfuscation:
          type:
            - boolean
            - 'null'
        include_usage:
          type:
            - boolean
            - 'null'
      type: object
    Input_ToolChoice3:
      anyOf:
        - $ref: '#/components/schemas/Input_ToolChoiceMode2'
        - $ref: '#/components/schemas/Input_NamedFunctionChoice'
        - $ref: '#/components/schemas/Input_NamedCustomChoice'
        - $ref: '#/components/schemas/Input_AllowedToolChoice'
    Input_ChatTool:
      anyOf:
        - $ref: '#/components/schemas/Input_FunctionTool2'
        - $ref: '#/components/schemas/Input_CustomToolDefinition'
    Input_Verbosity:
      enum:
        - low
        - medium
        - high
      type: string
    Input_WebSearchOptions:
      additionalProperties: true
      properties:
        search_context_size:
          anyOf:
            - $ref: '#/components/schemas/Input_SearchContextSize2'
            - type: 'null'
        user_location:
          anyOf:
            - $ref: '#/components/schemas/Input_UserLocation3'
            - type: 'null'
      type: object
    Output_Choice:
      additionalProperties: true
      properties:
        finish_reason:
          $ref: '#/components/schemas/Output_FinishReason2'
        index:
          format: int64
          type: integer
        logprobs:
          anyOf:
            - $ref: '#/components/schemas/Output_Logprobs'
            - type: 'null'
          default: null
        message:
          $ref: '#/components/schemas/Output_ResponseMessage'
      required:
        - finish_reason
        - index
        - logprobs
        - message
      type: object
    Output_ModerationResponse:
      additionalProperties: true
      properties:
        input:
          $ref: '#/components/schemas/Output_ModerationResultOrError'
        output:
          $ref: '#/components/schemas/Output_ModerationResultOrError'
      required:
        - input
        - output
      type: object
    Output_CompletionObject:
      enum:
        - chat.completion
      type: string
    Output_ResponseServiceTier2:
      enum:
        - auto
        - default
        - flex
        - scale
        - priority
        - fast
        - ultrafast
      type: string
    Output_Usage2:
      additionalProperties: true
      properties:
        completion_tokens:
          format: int64
          type: integer
        completion_tokens_details:
          anyOf:
            - $ref: '#/components/schemas/Output_CompletionTokensDetails'
            - type: 'null'
        prompt_tokens:
          format: int64
          type: integer
        prompt_tokens_details:
          anyOf:
            - $ref: '#/components/schemas/Output_PromptTokensDetails'
            - type: 'null'
        total_tokens:
          format: int64
          type: integer
      required:
        - prompt_tokens
        - completion_tokens
        - total_tokens
      type: object
    Output_EnvelopeBody:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    Output_StreamError:
      additionalProperties: true
      properties:
        message:
          type: string
        type:
          $ref: '#/components/schemas/Output_StreamErrorType'
      required:
        - type
        - message
      type: object
    Input_ChatAudioFormat:
      enum:
        - wav
        - aac
        - mp3
        - flac
        - opus
        - pcm16
      type: string
    Input_AudioVoice:
      anyOf:
        - $ref: '#/components/schemas/Input_AudioVoiceName'
        - $ref: '#/components/schemas/Input_CustomVoice'
        - type: string
    Input_FunctionCallMode:
      enum:
        - none
        - auto
      type: string
    Input_LegacyFunctionChoice:
      additionalProperties: true
      properties:
        name:
          type: string
      required:
        - name
      type: object
    Input_DeveloperMessage:
      additionalProperties: true
      properties:
        content:
          $ref: '#/components/schemas/Input_StringOrTextParts'
        name:
          type:
            - string
            - 'null'
        role:
          $ref: '#/components/schemas/Input_DeveloperRole'
      required:
        - role
        - content
      type: object
    Input_SystemMessage:
      additionalProperties: true
      properties:
        content:
          $ref: '#/components/schemas/Input_StringOrTextParts'
        name:
          type:
            - string
            - 'null'
        role:
          $ref: '#/components/schemas/Input_SystemRole'
      required:
        - role
        - content
      type: object
    Input_UserMessage:
      additionalProperties: true
      properties:
        content:
          $ref: '#/components/schemas/Input_UserContentParts'
        name:
          type:
            - string
            - 'null'
        role:
          $ref: '#/components/schemas/Input_UserRole'
      required:
        - role
        - content
      type: object
    Input_AssistantMessage:
      additionalProperties: true
      properties:
        audio:
          anyOf:
            - $ref: '#/components/schemas/Input_AssistantAudio'
            - type: 'null'
        content:
          anyOf:
            - $ref: '#/components/schemas/Input_AssistantContentParts'
            - type: 'null'
        function_call:
          anyOf:
            - $ref: '#/components/schemas/Input_FunctionCall3'
            - type: 'null'
        name:
          type:
            - string
            - 'null'
        reasoning:
          description: >-
            Alternative compatible-provider spelling. Kept separately on the
            wire.
          type:
            - string
            - 'null'
        reasoning_content:
          description: >-
            Plain-text reasoning returned by compatible providers (for example
            DeepSeek).
          type:
            - string
            - 'null'
        reasoning_details:
          items:
            $ref: '#/components/schemas/Input_ReasoningDetail'
          type:
            - array
            - 'null'
        refusal:
          type:
            - string
            - 'null'
        role:
          $ref: '#/components/schemas/Input_AssistantRole'
        tool_calls:
          items:
            $ref: '#/components/schemas/Input_MessageToolCall'
          type:
            - array
            - 'null'
      required:
        - role
      type: object
    Input_ToolMessage:
      additionalProperties: true
      properties:
        content:
          $ref: '#/components/schemas/Input_StringOrTextParts'
        role:
          $ref: '#/components/schemas/Input_ToolRole'
        tool_call_id:
          type: string
      required:
        - role
        - content
        - tool_call_id
      type: object
    Input_FunctionMessage:
      additionalProperties: true
      properties:
        content:
          type:
            - string
            - 'null'
        name:
          type: string
        role:
          $ref: '#/components/schemas/Input_FunctionRole'
      required:
        - role
        - name
        - content
      type: object
    Input_ModerationPolicy2:
      additionalProperties: true
      properties:
        input:
          anyOf:
            - $ref: '#/components/schemas/Input_ModerationMode2'
            - type: 'null'
        output:
          anyOf:
            - $ref: '#/components/schemas/Input_ModerationMode2'
            - type: 'null'
      type: object
    Input_StringOrTextParts:
      anyOf:
        - type: string
        - items:
            $ref: '#/components/schemas/Input_TextPart'
          type: array
    Input_PredictionType:
      enum:
        - content
      type: string
    Input_PromptCacheOptionMode:
      enum:
        - implicit
        - explicit
      type: string
    Input_PromptCacheTtl2:
      enum:
        - 30m
      type: string
    Input_TextResponseFormat2:
      additionalProperties: true
      properties:
        type:
          $ref: '#/components/schemas/Input_TextResponseType'
      required:
        - type
      type: object
    Input_JsonSchemaResponseFormat:
      additionalProperties: true
      properties:
        json_schema:
          $ref: '#/components/schemas/Input_JsonSchemaFormat'
        type:
          $ref: '#/components/schemas/Input_JsonSchemaResponseType'
      required:
        - type
        - json_schema
      type: object
    Input_JsonObjectResponseFormat:
      additionalProperties: true
      properties:
        type:
          $ref: '#/components/schemas/Input_JsonObjectResponseType'
      required:
        - type
      type: object
    Input_ToolChoiceMode2:
      enum:
        - none
        - auto
        - required
      type: string
    Input_NamedFunctionChoice:
      additionalProperties: true
      properties:
        function:
          $ref: '#/components/schemas/Input_NamedFunction'
        type:
          $ref: '#/components/schemas/Input_NamedFunctionChoiceType'
      required:
        - type
        - function
      type: object
    Input_NamedCustomChoice:
      additionalProperties: true
      properties:
        custom:
          $ref: '#/components/schemas/Input_NamedCustom'
        type:
          $ref: '#/components/schemas/Input_NamedCustomChoiceType'
      required:
        - type
        - custom
      type: object
    Input_AllowedToolChoice:
      additionalProperties: true
      properties:
        allowed_tools:
          $ref: '#/components/schemas/Input_AllowedTools'
        type:
          $ref: '#/components/schemas/Input_AllowedToolChoiceType'
      required:
        - type
        - allowed_tools
      type: object
    Input_FunctionTool2:
      additionalProperties: true
      properties:
        function:
          $ref: '#/components/schemas/Input_FunctionDefinition'
        type:
          $ref: '#/components/schemas/Input_FunctionToolType'
      required:
        - type
        - function
      type: object
    Input_CustomToolDefinition:
      additionalProperties: true
      properties:
        custom:
          $ref: '#/components/schemas/Input_CustomTool2'
        type:
          $ref: '#/components/schemas/Input_CustomToolDefinitionType'
      required:
        - type
        - custom
      type: object
    Input_SearchContextSize2:
      enum:
        - low
        - medium
        - high
      type: string
    Input_UserLocation3:
      additionalProperties: true
      properties:
        approximate:
          $ref: '#/components/schemas/Input_ApproximateLocation'
        type:
          $ref: '#/components/schemas/Input_UserLocationType3'
      required:
        - type
        - approximate
      type: object
    Output_FinishReason2:
      enum:
        - stop
        - length
        - tool_calls
        - content_filter
        - function_call
      type: string
    Output_Logprobs:
      additionalProperties: true
      properties:
        content:
          items:
            $ref: '#/components/schemas/Output_TokenLogprob'
          type:
            - array
            - 'null'
        refusal:
          items:
            $ref: '#/components/schemas/Output_TokenLogprob'
          type:
            - array
            - 'null'
      required:
        - content
        - refusal
      type: object
    Output_ResponseMessage:
      additionalProperties: true
      properties:
        annotations:
          items:
            $ref: '#/components/schemas/Output_Annotation'
          type:
            - array
            - 'null'
        audio:
          anyOf:
            - $ref: '#/components/schemas/Output_ResponseAudio'
            - type: 'null'
        content:
          default: null
          type:
            - string
            - 'null'
        function_call:
          anyOf:
            - $ref: '#/components/schemas/Output_FunctionCall3'
            - type: 'null'
        reasoning:
          description: >-
            Alternative compatible-provider spelling. Kept separately on the
            wire.
          type:
            - string
            - 'null'
        reasoning_content:
          description: >-
            Plain-text reasoning returned by compatible providers (for example
            DeepSeek).
          type:
            - string
            - 'null'
        reasoning_details:
          items:
            $ref: '#/components/schemas/Output_ReasoningDetail'
          type:
            - array
            - 'null'
        refusal:
          default: null
          type:
            - string
            - 'null'
        role:
          $ref: '#/components/schemas/Output_ResponseRole2'
        tool_calls:
          items:
            $ref: '#/components/schemas/Output_MessageToolCall'
          type:
            - array
            - 'null'
      required:
        - content
        - refusal
        - role
      type: object
    Output_ModerationResultOrError:
      anyOf:
        - $ref: '#/components/schemas/Output_ModerationResult'
        - $ref: '#/components/schemas/Output_ModerationError'
    Output_CompletionTokensDetails:
      additionalProperties: true
      properties:
        accepted_prediction_tokens:
          format: int64
          type:
            - integer
            - 'null'
        audio_tokens:
          format: int64
          type:
            - integer
            - 'null'
        reasoning_tokens:
          format: int64
          type:
            - integer
            - 'null'
        rejected_prediction_tokens:
          format: int64
          type:
            - integer
            - 'null'
        text_tokens:
          format: int64
          type:
            - integer
            - 'null'
      type: object
    Output_PromptTokensDetails:
      additionalProperties: true
      properties:
        audio_tokens:
          format: int64
          type:
            - integer
            - 'null'
        cache_write_tokens:
          format: int64
          type:
            - integer
            - 'null'
        cached_tokens:
          format: int64
          type:
            - integer
            - 'null'
        image_tokens:
          format: int64
          type:
            - integer
            - 'null'
        text_tokens:
          format: int64
          type:
            - integer
            - 'null'
      type: object
    Output_StreamErrorType:
      enum:
        - api_error
        - authentication_error
        - billing_error
        - invalid_request_error
        - not_found_error
        - overloaded_error
        - permission_error
        - rate_limit_error
        - timeout_error
        - conflict_error
        - request_too_large
      type: string
    Input_AudioVoiceName:
      enum:
        - alloy
        - ash
        - ballad
        - coral
        - echo
        - fable
        - nova
        - onyx
        - sage
        - shimmer
        - verse
        - marin
        - cedar
      type: string
    Input_CustomVoice:
      additionalProperties: true
      properties:
        id:
          type: string
      required:
        - id
      type: object
    Input_DeveloperRole:
      enum:
        - developer
      type: string
    Input_SystemRole:
      enum:
        - system
      type: string
    Input_UserContentParts:
      anyOf:
        - type: string
        - items:
            $ref: '#/components/schemas/Input_UserContentPart'
          type: array
    Input_UserRole:
      enum:
        - user
      type: string
    Input_AssistantAudio:
      additionalProperties: true
      properties:
        id:
          type: string
      required:
        - id
      type: object
    Input_AssistantContentParts:
      anyOf:
        - type: string
        - items:
            $ref: '#/components/schemas/Input_AssistantContentPart'
          type: array
    Input_FunctionCall3:
      additionalProperties: true
      properties:
        arguments:
          type: string
        name:
          type: string
      required:
        - arguments
        - name
      type: object
    Input_ReasoningDetail:
      additionalProperties: true
      description: >-
        Payload fields are optional because streaming detail fragments may carry

        only a signature or identity. Encrypted data is never interpreted as
        text.
      properties:
        data:
          type:
            - string
            - 'null'
        format:
          type:
            - string
            - 'null'
        id:
          type:
            - string
            - 'null'
        index:
          format: int64
          type:
            - integer
            - 'null'
        signature:
          type:
            - string
            - 'null'
        summary:
          type:
            - string
            - 'null'
        text:
          type:
            - string
            - 'null'
        type:
          $ref: '#/components/schemas/Input_ReasoningDetailKind'
      required:
        - type
      type: object
    Input_AssistantRole:
      enum:
        - assistant
      type: string
    Input_MessageToolCall:
      anyOf:
        - $ref: '#/components/schemas/Input_ChatToolCall'
        - $ref: '#/components/schemas/Input_CustomToolCall2'
    Input_ToolRole:
      enum:
        - tool
      type: string
    Input_FunctionRole:
      enum:
        - function
      type: string
    Input_ModerationMode2:
      additionalProperties: true
      properties:
        mode:
          $ref: '#/components/schemas/Input_ModerationModeType'
      required:
        - mode
      type: object
    Input_TextPart:
      additionalProperties: true
      properties:
        prompt_cache_breakpoint:
          anyOf:
            - $ref: '#/components/schemas/Input_PromptCacheBreakpoint2'
            - type: 'null'
        text:
          type: string
        type:
          $ref: '#/components/schemas/Input_TextPartType'
      required:
        - type
        - text
      type: object
    Input_TextResponseType:
      enum:
        - text
      type: string
    Input_JsonSchemaFormat:
      additionalProperties: true
      properties:
        description:
          type:
            - string
            - 'null'
        name:
          type: string
        schema:
          additionalProperties: true
          type:
            - object
            - 'null'
        strict:
          type:
            - boolean
            - 'null'
      required:
        - name
      type: object
    Input_JsonSchemaResponseType:
      enum:
        - json_schema
      type: string
    Input_JsonObjectResponseType:
      enum:
        - json_object
      type: string
    Input_NamedFunction:
      additionalProperties: true
      properties:
        name:
          type: string
      required:
        - name
      type: object
    Input_NamedFunctionChoiceType:
      enum:
        - function
      type: string
    Input_NamedCustom:
      additionalProperties: true
      properties:
        name:
          type: string
      required:
        - name
      type: object
    Input_NamedCustomChoiceType:
      enum:
        - custom
      type: string
    Input_AllowedTools:
      additionalProperties: true
      properties:
        mode:
          $ref: '#/components/schemas/Input_AllowedToolsMode'
        tools:
          items:
            additionalProperties: true
            type: object
          type: array
      required:
        - mode
        - tools
      type: object
    Input_AllowedToolChoiceType:
      enum:
        - allowed_tools
      type: string
    Input_FunctionDefinition:
      additionalProperties: true
      properties:
        description:
          type:
            - string
            - 'null'
        name:
          type: string
        parameters:
          additionalProperties: true
          type:
            - object
            - 'null'
        strict:
          type:
            - boolean
            - 'null'
      required:
        - name
      type: object
    Input_FunctionToolType:
      enum:
        - function
      type: string
    Input_CustomTool2:
      additionalProperties: true
      properties:
        description:
          type:
            - string
            - 'null'
        format:
          anyOf:
            - $ref: '#/components/schemas/Input_CustomToolFormat2'
            - type: 'null'
        name:
          type: string
      required:
        - name
      type: object
    Input_CustomToolDefinitionType:
      enum:
        - custom
      type: string
    Input_ApproximateLocation:
      additionalProperties: true
      properties:
        city:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
        region:
          type:
            - string
            - 'null'
        timezone:
          type:
            - string
            - 'null'
      type: object
    Input_UserLocationType3:
      enum:
        - approximate
      type: string
    Output_TokenLogprob:
      additionalProperties: true
      properties:
        bytes:
          items:
            format: int64
            type: integer
          type:
            - array
            - 'null'
        logprob:
          format: double
          type: number
        token:
          type: string
        top_logprobs:
          items:
            $ref: '#/components/schemas/Output_TokenLogprobTop'
          type: array
      required:
        - token
        - bytes
        - logprob
        - top_logprobs
      type: object
    Output_Annotation:
      additionalProperties: true
      properties:
        type:
          $ref: '#/components/schemas/Output_AnnotationType'
        url_citation:
          $ref: '#/components/schemas/Output_UrlCitation2'
      required:
        - type
        - url_citation
      type: object
    Output_ResponseAudio:
      additionalProperties: true
      properties:
        data:
          type: string
        expires_at:
          format: int64
          type: integer
        id:
          type: string
        transcript:
          type: string
      required:
        - id
        - data
        - expires_at
        - transcript
      type: object
    Output_FunctionCall3:
      additionalProperties: true
      properties:
        arguments:
          type: string
        name:
          type: string
      required:
        - arguments
        - name
      type: object
    Output_ReasoningDetail:
      additionalProperties: true
      description: >-
        Payload fields are optional because streaming detail fragments may carry

        only a signature or identity. Encrypted data is never interpreted as
        text.
      properties:
        data:
          type:
            - string
            - 'null'
        format:
          type:
            - string
            - 'null'
        id:
          type:
            - string
            - 'null'
        index:
          format: int64
          type:
            - integer
            - 'null'
        signature:
          type:
            - string
            - 'null'
        summary:
          type:
            - string
            - 'null'
        text:
          type:
            - string
            - 'null'
        type:
          $ref: '#/components/schemas/Output_ReasoningDetailKind'
      required:
        - type
      type: object
    Output_ResponseRole2:
      enum:
        - assistant
      type: string
    Output_MessageToolCall:
      anyOf:
        - $ref: '#/components/schemas/Output_ChatToolCall'
        - $ref: '#/components/schemas/Output_CustomToolCall2'
    Output_ModerationResult:
      additionalProperties: true
      properties:
        model:
          type: string
        results:
          items:
            $ref: '#/components/schemas/Output_ModerationResultItem'
          type: array
        type:
          $ref: '#/components/schemas/Output_ModerationResultType'
      required:
        - model
        - results
        - type
      type: object
    Output_ModerationError:
      additionalProperties: true
      properties:
        code:
          type: string
        message:
          type: string
        type:
          $ref: '#/components/schemas/Output_ModerationErrorType'
      required:
        - code
        - message
        - type
      type: object
    Input_UserContentPart:
      anyOf:
        - $ref: '#/components/schemas/Input_TextPart'
        - $ref: '#/components/schemas/Input_ImagePart'
        - $ref: '#/components/schemas/Input_InputAudioPart'
        - $ref: '#/components/schemas/Input_FilePart'
    Input_AssistantContentPart:
      anyOf:
        - $ref: '#/components/schemas/Input_TextPart'
        - $ref: '#/components/schemas/Input_RefusalPart'
    Input_ReasoningDetailKind:
      enum:
        - reasoning.text
        - reasoning.summary
        - reasoning.encrypted
      type: string
    Input_ChatToolCall:
      additionalProperties: true
      properties:
        function:
          $ref: '#/components/schemas/Input_FunctionCall3'
        id:
          type: string
        type:
          $ref: '#/components/schemas/Input_ChatToolCallType'
      required:
        - id
        - function
        - type
      type: object
    Input_CustomToolCall2:
      additionalProperties: true
      properties:
        custom:
          $ref: '#/components/schemas/Input_CustomCall'
        id:
          type: string
        type:
          $ref: '#/components/schemas/Input_CustomToolCallType2'
      required:
        - id
        - custom
        - type
      type: object
    Input_ModerationModeType:
      enum:
        - score
        - block
      type: string
    Input_PromptCacheBreakpoint2:
      additionalProperties: true
      properties:
        mode:
          $ref: '#/components/schemas/Input_PromptCacheMode2'
        ttl:
          anyOf:
            - $ref: '#/components/schemas/Input_PromptCacheBreakpointTtl2'
            - type: 'null'
          description: >-
            Minimum lifetime of this breakpoint; omitted inherits the request
            TTL.

            OpenAI OpenAPI: PromptCacheBreakpointParam (2026-10-21).
      required:
        - mode
      type: object
    Input_TextPartType:
      enum:
        - text
      type: string
    Input_AllowedToolsMode:
      enum:
        - auto
        - required
      type: string
    Input_CustomToolFormat2:
      anyOf:
        - $ref: '#/components/schemas/Input_TextFormat2'
        - $ref: '#/components/schemas/Input_GrammarFormat2'
    Output_TokenLogprobTop:
      additionalProperties: true
      properties:
        bytes:
          items:
            format: int64
            type: integer
          type:
            - array
            - 'null'
        logprob:
          format: double
          type: number
        token:
          type: string
      required:
        - token
        - bytes
        - logprob
      type: object
    Output_AnnotationType:
      enum:
        - url_citation
      type: string
    Output_UrlCitation2:
      additionalProperties: true
      properties:
        end_index:
          format: int64
          type: integer
        start_index:
          format: int64
          type: integer
        title:
          type: string
        url:
          type: string
      required:
        - end_index
        - start_index
        - title
        - url
      type: object
    Output_ReasoningDetailKind:
      enum:
        - reasoning.text
        - reasoning.summary
        - reasoning.encrypted
      type: string
    Output_ChatToolCall:
      additionalProperties: true
      properties:
        function:
          $ref: '#/components/schemas/Output_FunctionCall3'
        id:
          type: string
        type:
          $ref: '#/components/schemas/Output_ChatToolCallType'
      required:
        - id
        - function
        - type
      type: object
    Output_CustomToolCall2:
      additionalProperties: true
      properties:
        custom:
          $ref: '#/components/schemas/Output_CustomCall'
        id:
          type: string
        type:
          $ref: '#/components/schemas/Output_CustomToolCallType2'
      required:
        - id
        - custom
        - type
      type: object
    Output_ModerationResultItem:
      additionalProperties: true
      properties:
        categories:
          additionalProperties:
            type: boolean
          type: object
        category_applied_input_types:
          additionalProperties:
            items:
              $ref: '#/components/schemas/Output_ModerationInputType'
            type: array
          type: object
        category_scores:
          additionalProperties:
            format: double
            type: number
          type: object
        flagged:
          type: boolean
        model:
          type: string
        type:
          $ref: '#/components/schemas/Output_ModerationItemType'
      required:
        - categories
        - category_applied_input_types
        - category_scores
        - flagged
        - model
        - type
      type: object
    Output_ModerationResultType:
      enum:
        - moderation_results
      type: string
    Output_ModerationErrorType:
      enum:
        - error
      type: string
    Input_ImagePart:
      additionalProperties: true
      properties:
        image_url:
          $ref: '#/components/schemas/Input_ImageUrl'
        prompt_cache_breakpoint:
          anyOf:
            - $ref: '#/components/schemas/Input_PromptCacheBreakpoint2'
            - type: 'null'
        type:
          $ref: '#/components/schemas/Input_ImagePartType'
      required:
        - type
        - image_url
      type: object
    Input_InputAudioPart:
      additionalProperties: true
      properties:
        input_audio:
          $ref: '#/components/schemas/Input_InputAudio'
        prompt_cache_breakpoint:
          anyOf:
            - $ref: '#/components/schemas/Input_PromptCacheBreakpoint2'
            - type: 'null'
        type:
          $ref: '#/components/schemas/Input_InputAudioPartType'
      required:
        - type
        - input_audio
      type: object
    Input_FilePart:
      additionalProperties: true
      properties:
        file:
          $ref: '#/components/schemas/Input_FileRef'
        prompt_cache_breakpoint:
          anyOf:
            - $ref: '#/components/schemas/Input_PromptCacheBreakpoint2'
            - type: 'null'
        type:
          $ref: '#/components/schemas/Input_FilePartType'
      required:
        - type
        - file
      type: object
    Input_RefusalPart:
      additionalProperties: true
      properties:
        refusal:
          type: string
        type:
          $ref: '#/components/schemas/Input_RefusalType'
      required:
        - type
        - refusal
      type: object
    Input_ChatToolCallType:
      enum:
        - function
      type: string
    Input_CustomCall:
      additionalProperties: true
      properties:
        input:
          type: string
        name:
          type: string
      required:
        - input
        - name
      type: object
    Input_CustomToolCallType2:
      enum:
        - custom
      type: string
    Input_PromptCacheMode2:
      enum:
        - explicit
      type: string
    Input_PromptCacheBreakpointTtl2:
      description: >-
        Explicit cache-breakpoint lifetimes from OpenAI's
        PromptCacheBreakpointParam.

        Separate from the request-wide PromptCacheTTLEnum and legacy retention
        policy.
      enum:
        - 30m
        - 12h
      type: string
    Input_TextFormat2:
      additionalProperties: true
      properties:
        type:
          $ref: '#/components/schemas/Input_TextFormatType2'
      required:
        - type
      type: object
    Input_GrammarFormat2:
      additionalProperties: true
      properties:
        grammar:
          $ref: '#/components/schemas/Input_Grammar'
        type:
          $ref: '#/components/schemas/Input_GrammarFormatType2'
      required:
        - type
        - grammar
      type: object
    Output_ChatToolCallType:
      enum:
        - function
      type: string
    Output_CustomCall:
      additionalProperties: true
      properties:
        input:
          type: string
        name:
          type: string
      required:
        - input
        - name
      type: object
    Output_CustomToolCallType2:
      enum:
        - custom
      type: string
    Output_ModerationInputType:
      enum:
        - text
        - image
      type: string
    Output_ModerationItemType:
      enum:
        - moderation_result
      type: string
    Input_ImageUrl:
      additionalProperties: true
      properties:
        detail:
          anyOf:
            - $ref: '#/components/schemas/Input_ImageDetail2'
            - type: 'null'
        url:
          type: string
      required:
        - url
      type: object
    Input_ImagePartType:
      enum:
        - image_url
      type: string
    Input_InputAudio:
      additionalProperties: true
      properties:
        data:
          type: string
        format:
          $ref: '#/components/schemas/Input_AudioFormat'
      required:
        - data
        - format
      type: object
    Input_InputAudioPartType:
      enum:
        - input_audio
      type: string
    Input_FileRef:
      additionalProperties: true
      properties:
        file_data:
          type:
            - string
            - 'null'
        file_id:
          type:
            - string
            - 'null'
        filename:
          type:
            - string
            - 'null'
      type: object
    Input_FilePartType:
      enum:
        - file
      type: string
    Input_RefusalType:
      enum:
        - refusal
      type: string
    Input_TextFormatType2:
      enum:
        - text
      type: string
    Input_Grammar:
      additionalProperties: true
      properties:
        definition:
          type: string
        syntax:
          $ref: '#/components/schemas/Input_GrammarSyntax2'
      required:
        - definition
        - syntax
      type: object
    Input_GrammarFormatType2:
      enum:
        - grammar
      type: string
    Input_ImageDetail2:
      enum:
        - auto
        - low
        - high
      type: string
    Input_AudioFormat:
      enum:
        - wav
        - mp3
      type: string
    Input_GrammarSyntax2:
      enum:
        - lark
        - regex
      type: string
  securitySchemes:
    bearer:
      scheme: bearer
      type: http
    anthropicKey:
      in: header
      name: x-api-key
      type: apiKey
    googleKey:
      in: header
      name: x-goog-api-key
      type: apiKey
    queryKey:
      in: query
      name: key
      type: apiKey

````

## Related topics

- [Routing & Endpoints](https://gproxy.leenhawk.com/reference/routing-table.md)
- [Concepts](https://gproxy.leenhawk.com/introduction/concepts.md)
- [First request](https://gproxy.leenhawk.com/getting-started/first-request.md)
- [Quick start](https://gproxy.leenhawk.com/getting-started/quick-start.md)
- [POST /v1/rerank](https://gproxy.leenhawk.com/api-reference/forwarding/post-v1rerank.md)


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