> ## Documentation Index
> Fetch the complete documentation index at: https://gomodel-docs-benchmark-writeup-and-tooling.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Provider passthrough

> Runtime-configurable passthrough endpoint under /p/{provider}/{endpoint}; enabled by default via server.enable_passthrough_routes. The endpoint path is opaque and may proxy JSON, binary, or SSE responses with upstream status codes preserved. For multi-segment provider endpoints, clients that rely on OpenAPI-generated path handling should URL-encode embedded slashes in the endpoint parameter. A leading v1/ segment is normalized away by default so /p/{provider}/v1/... and /p/{provider}/... map to the same upstream path relative to the provider base URL.



## OpenAPI

````yaml /openapi.json options /p/{provider}/{endpoint}
openapi: 3.0.0
info:
  description: >-
    AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic,
    Gemini, Groq, OpenRouter, DeepSeek, Z.ai, xAI, MiniMax, Xiaomi MiMo,
    OpenCode Go, Oracle, Ollama, Bailian). Drop-in OpenAI-compatible API.
  title: GoModel API
  contact: {}
  version: '1.0'
servers:
  - url: '{base_url}'
    description: Edit the base URL to point at your GoModel deployment.
    variables:
      base_url:
        default: http://localhost:8080
        description: Your GoModel deployment URL
security: []
paths:
  /p/{provider}/{endpoint}:
    patch:
      tags:
        - passthrough
      summary: Provider passthrough
      description: >-
        Runtime-configurable passthrough endpoint under
        /p/{provider}/{endpoint}; enabled by default via
        server.enable_passthrough_routes. The endpoint path is opaque and may
        proxy JSON, binary, or SSE responses with upstream status codes
        preserved. For multi-segment provider endpoints, clients that rely on
        OpenAPI-generated path handling should URL-encode embedded slashes in
        the endpoint parameter. A leading v1/ segment is normalized away by
        default so /p/{provider}/v1/... and /p/{provider}/... map to the same
        upstream path relative to the provider base URL.
      parameters:
        - description: Provider type
          name: provider
          in: path
          required: true
          schema:
            type: string
        - description: >-
            Provider-native endpoint path relative to the provider base URL.
            URL-encode embedded / characters when using generated clients.
          name: endpoint
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Opaque upstream response body
          content:
            application/json:
              schema:
                type: string
                format: binary
            application/octet-stream:
              schema:
                type: string
                format: binary
            text/event-stream:
              schema:
                type: string
                format: binary
        '201':
          description: Opaque upstream response body
          content:
            application/json:
              schema:
                type: string
                format: binary
            application/octet-stream:
              schema:
                type: string
                format: binary
            text/event-stream:
              schema:
                type: string
                format: binary
        '202':
          description: Opaque upstream response body
          content:
            application/json:
              schema:
                type: string
                format: binary
            application/octet-stream:
              schema:
                type: string
                format: binary
            text/event-stream:
              schema:
                type: string
                format: binary
        '204':
          description: No Content passthrough response
          content:
            application/json:
              schema:
                type: string
            application/octet-stream:
              schema:
                type: string
            text/event-stream:
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
      security:
        - BearerAuth: []
components:
  schemas:
    core.OpenAIErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/core.OpenAIErrorObject'
    core.OpenAIErrorObject:
      type: object
      required:
        - code
        - message
        - param
        - type
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
        param:
          type: string
          nullable: true
        type:
          $ref: '#/components/schemas/core.ErrorType'
    core.ErrorType:
      type: string
      enum:
        - provider_error
        - rate_limit_error
        - invalid_request_error
        - authentication_error
        - not_found_error
      x-enum-varnames:
        - ErrorTypeProvider
        - ErrorTypeRateLimit
        - ErrorTypeInvalidRequest
        - ErrorTypeAuthentication
        - ErrorTypeNotFound
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````