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

# Create a response (OpenAI Responses format)

> Accepts the OpenAI Responses API request/response shape. Use this if your
client already speaks the Responses API. The request body is the
[OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses)'s.
Turn thinking off with `"reasoning": {"effort": "none"}`; this is the one switch
that works on every model (see [Reasoning](/inference/models#reasoning)).




## OpenAPI

````yaml /api-reference/inference/openapi.yaml post /responses
openapi: 3.1.0
info:
  title: PrimaLabs Inference API
  version: 1.0.0
  description: >
    Serverless LLM inference on PrimaLabs. The API is OpenAI-compatible: point
    any

    OpenAI SDK at the base URL below and pass a PrimaLabs API key as the bearer

    token. Anthropic (`/messages`) and OpenAI Responses (`/responses`) formats
    are

    also accepted as passthroughs.


    This is a **curated** spec covering the endpoints we serve; it is maintained
    by

    hand. The current model list is published at

    https://docs.primalabs.ai/inference/models.
servers:
  - url: https://api.primalabs.ai/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Chat
    description: OpenAI-compatible chat completions — the primary endpoint.
  - name: Completions
    description: Legacy text completions.
  - name: Models
    description: The models your key can call, with context, pricing and capabilities.
  - name: Account
    description: Your account's balance.
  - name: Passthrough
    description: Anthropic and OpenAI Responses formats, forwarded as-is.
paths:
  /responses:
    post:
      tags:
        - Passthrough
      summary: Create a response (OpenAI Responses format)
      description: >
        Accepts the OpenAI Responses API request/response shape. Use this if
        your

        client already speaks the Responses API. The request body is the

        [OpenAI Responses
        API](https://platform.openai.com/docs/api-reference/responses)'s.

        Turn thinking off with `"reasoning": {"effort": "none"}`; this is the
        one switch

        that works on every model (see
        [Reasoning](/inference/models#reasoning)).
      operationId: createResponse
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  example: primalabs-ai/DeepSeek-V4.1-Flash-1017
                input:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: object
                  example: Hello
              additionalProperties: true
            example:
              model: primalabs-ai/DeepSeek-V4.1-Flash-1017
              input: Hello
      responses:
        '200':
          description: An OpenAI Responses-format response.
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/BalanceExhausted'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Authentication Error, Invalid proxy server token passed.
              type: token_not_found_in_db
              param: key
              code: '401'
    Forbidden:
      description: >
        The key cannot access this model. Unknown model IDs return this status
        too —

        check the `model` against the published catalog. A URL path the API does
        not serve

        (for example one built on a wrong base URL) is also refused with `403`,
        by the

        network edge and without a JSON body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: >-
                key not allowed to access model. Tried to access
                primalabs-ai/does-not-exist
              type: key_model_access_denied
              param: model
              code: '403'
    BalanceExhausted:
      description: >
        Your balance has reached zero. Retrying will not help until you top up
        on the

        [dashboard](https://dashboard.primalabs.ai); check `GET /credits`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: >-
                ExceededBudget: User=<your user id> over budget. Spend=25.0,
                Budget=25.0
              type: budget_exceeded
              code: '422'
    RateLimited:
      description: >
        Rate limited. One of three layers tripped — per-IP, per-user fair share,
        or

        per-model admission. Back off and retry with jitter; honor `Retry-After`
        when present.

        The per-IP limit is enforced at the network edge and returns no JSON
        body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            param:
              type:
                - string
                - 'null'
            code:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your PrimaLabs API key, sent as `Authorization: Bearer <key>`.'

````

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