> ## Documentation Index
> Fetch the complete documentation index at: https://gomodel-fix-headers-altering.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a realtime WebRTC call

> OpenAI-compatible WebRTC SDP exchange. Accepts a raw application/sdp offer with the model in the ?model= query parameter, or a multipart form with sdp and session (JSON) fields. The gateway routes by model, injects provider credentials, and relays the SDP answer; the Location header carries the created call id. Media flows directly between the client and the provider, so usage is recorded by a gateway-side sideband observer when usage tracking is enabled.



## OpenAPI

````yaml /openapi.json post /v1/realtime/calls
openapi: 3.0.0
info:
  description: >-
    AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic,
    Gemini, Groq, Fireworks AI, Meta, 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:
  /v1/realtime/calls:
    post:
      tags:
        - realtime
      summary: Create a realtime WebRTC call
      description: >-
        OpenAI-compatible WebRTC SDP exchange. Accepts a raw application/sdp
        offer with the model in the ?model= query parameter, or a multipart form
        with sdp and session (JSON) fields. The gateway routes by model, injects
        provider credentials, and relays the SDP answer; the Location header
        carries the created call id. Media flows directly between the client and
        the provider, so usage is recorded by a gateway-side sideband observer
        when usage tracking is enabled.
      parameters:
        - description: Model that owns the call (required for application/sdp offers)
          name: model
          in: query
          schema:
            type: string
        - description: Optional provider hint
          name: provider
          in: query
          schema:
            type: string
      requestBody:
        content:
          application/sdp:
            schema:
              type: string
          multipart/form-data:
            schema:
              type: string
        description: >-
          SDP offer (raw application/sdp body), or a multipart form with sdp and
          session (JSON) fields
        required: true
      responses:
        '201':
          description: SDP answer
          content:
            application/sdp:
              schema:
                type: string
            application/json:
              schema:
                type: string
        '400':
          description: Bad Request
          content:
            application/sdp:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            application/json:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
        '401':
          description: Unauthorized
          content:
            application/sdp:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            application/json:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
        '429':
          description: Too Many Requests
          content:
            application/sdp:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            application/json:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
        '501':
          description: Not Implemented
          content:
            application/sdp:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            application/json:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
        '502':
          description: Bad Gateway
          content:
            application/sdp:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
            application/json:
              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

````