> ## 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.

# Create a model response (Responses API)



## OpenAPI

````yaml /openapi.json post /v1/responses
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:
  /v1/responses:
    post:
      tags:
        - responses
      summary: Create a model response (Responses API)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/core.ResponsesRequest'
        description: Responses API request
        required: true
      responses:
        '200':
          description: JSON response or SSE stream when stream=true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.ResponsesResponse'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/core.ResponsesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              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'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
        '429':
          description: Too Many Requests
          content:
            application/json:
              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'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/core.OpenAIErrorEnvelope'
      security:
        - BearerAuth: []
components:
  schemas:
    core.ResponsesRequest:
      type: object
      properties:
        context_management: {}
        conversation:
          description: >-
            Conversation accepts either a conversation ID string or an object
            with id.
          oneOf:
            - type: string
            - $ref: '#/components/schemas/core.ResponsesConversationRef'
        include:
          type: array
          items:
            type: string
        input:
          description: string or []ResponsesInputElement — see docs for array form
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/core.ResponsesInputElement'
        instructions:
          type: string
        max_output_tokens:
          type: integer
        metadata:
          type: object
          additionalProperties:
            type: string
        model:
          type: string
        parallel_tool_calls:
          type: boolean
        previous_response_id:
          type: string
        prompt: {}
        prompt_cache_retention:
          type: string
        provider:
          description: Gateway routing hint; stripped before upstream execution.
          type: string
        reasoning:
          $ref: '#/components/schemas/core.Reasoning'
        safety_identifier:
          type: string
        service_tier:
          type: string
        store:
          type: boolean
        stream:
          type: boolean
        stream_options:
          $ref: '#/components/schemas/core.StreamOptions'
        temperature:
          type: number
        text: {}
        tool_choice:
          description: string or object
        tools:
          type: array
          items:
            type: object
            additionalProperties: {}
        top_logprobs:
          type: integer
        top_p:
          type: number
        truncation:
          type: string
        user:
          type: string
    core.ResponsesResponse:
      type: object
      properties:
        created_at:
          type: integer
        error:
          $ref: '#/components/schemas/core.ResponsesError'
        id:
          type: string
        model:
          type: string
        object:
          description: '"response"'
          type: string
        output:
          type: array
          items:
            $ref: '#/components/schemas/core.ResponsesOutputItem'
        provider:
          type: string
        status:
          description: '"completed", "failed", "in_progress"'
          type: string
        usage:
          $ref: '#/components/schemas/core.ResponsesUsage'
    core.OpenAIErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/core.OpenAIErrorObject'
    core.ResponsesConversationRef:
      type: object
      properties:
        id:
          type: string
      required:
        - id
    core.ResponsesInputElement:
      type: object
      properties:
        arguments:
          type: string
        call_id:
          description: Function call fields (type="function_call")
          type: string
        content:
          description: Can be string or []ContentPart
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/core.ContentPart'
        name:
          type: string
        output:
          description: >-
            Function call output fields (type="function_call_output") - CallID
            shared above
          type: string
        role:
          description: Message fields (type="" or "message")
          type: string
        status:
          type: string
        type:
          description: '"message", "function_call", "function_call_output"'
          type: string
    core.Reasoning:
      type: object
      properties:
        effort:
          description: >-
            Effort controls how much reasoning effort the model should use.

            Valid values are "low", "medium", "high", "xhigh", and "max".

            "xhigh" and "max" are supported by newer models such as Claude Opus
            4.8;

            providers downgrade unsupported levels to their nearest equivalent.
          type: string
    core.StreamOptions:
      type: object
      properties:
        include_usage:
          description: >-
            IncludeUsage requests token usage information in streaming
            responses.

            When true, the final streaming chunk will include usage statistics.
          type: boolean
    core.ResponsesError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    core.ResponsesOutputItem:
      type: object
      properties:
        arguments:
          type: string
        call_id:
          type: string
        content:
          type: array
          items:
            $ref: '#/components/schemas/core.ResponsesContentItem'
        id:
          type: string
        name:
          type: string
        role:
          type: string
        status:
          type: string
        type:
          description: '"message", "function_call", etc.'
          type: string
    core.ResponsesUsage:
      type: object
      properties:
        completion_tokens_details:
          $ref: '#/components/schemas/core.CompletionTokensDetails'
        input_tokens:
          type: integer
        output_tokens:
          type: integer
        prompt_tokens_details:
          $ref: '#/components/schemas/core.PromptTokensDetails'
        raw_usage:
          type: object
          additionalProperties: {}
        total_tokens:
          type: integer
    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.ContentPart:
      type: object
      properties:
        image_url:
          $ref: '#/components/schemas/core.ImageURLContent'
        input_audio:
          $ref: '#/components/schemas/core.InputAudioContent'
        text:
          type: string
        type:
          type: string
    core.ResponsesContentItem:
      type: object
      properties:
        annotations:
          description: |-
            Providers can return structured annotation objects here (for example
            citations from native tools), so keep the payload shape liberal.
          type: array
          items:
            type: object
        image_url:
          $ref: '#/components/schemas/core.ImageURLContent'
        input_audio:
          $ref: '#/components/schemas/core.InputAudioContent'
        text:
          type: string
        type:
          description: '"output_text", "input_image", "input_audio", etc.'
          type: string
    core.CompletionTokensDetails:
      type: object
      properties:
        accepted_prediction_tokens:
          type: integer
        audio_tokens:
          type: integer
        reasoning_tokens:
          type: integer
        rejected_prediction_tokens:
          type: integer
    core.PromptTokensDetails:
      type: object
      properties:
        audio_tokens:
          type: integer
        cached_tokens:
          type: integer
        image_tokens:
          type: integer
        text_tokens:
          type: integer
    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
    core.ImageURLContent:
      type: object
      properties:
        detail:
          type: string
        media_type:
          type: string
        url:
          type: string
    core.InputAudioContent:
      type: object
      properties:
        data:
          type: string
        format:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````