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

# Create a response

> The OpenAI Responses API for the LLM models.

An `:async` model answers at once with a `queued` or `in_progress` response; poll
`GET /v1/responses/{response_id}` until it is terminal. A `:superfast` model completes
inline.

`stream: true` returns server-sent events: live on `:superfast` models, buffered on
`:async` models (keep-alives while the job runs, then the whole output).


## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/responses
openapi: 3.1.0
info:
  title: Abstract API
  version: 1.0.0
  summary: Robot action models and LLMs behind one API key.
  description: >
    `POST /v1/chat/completions` serves the robot action models. `POST
    /v1/responses` and

    `GET /v1/responses/{response_id}` serve the LLM models through the OpenAI
    Responses API.

    `GET /v1/models` lists the LLM model ids.


    The robot models also run over a WebSocket at
    `wss://api.abstract.inc/v1/responses`.

    OpenAPI does not describe it. See [Sessions over
    WebSocket](/robots/sessions).


    `/v1/robot/runs` stores your robot runs (episode logs, the Rerun recording
    with the

    camera video) under your account, and lists, downloads and deletes them.
    Only the key's

    account reaches its runs. An account stores up to 100 GiB of runs;

    `GET /v1/robot/runs/usage` shows what it holds.
  contact:
    name: Abstract
    url: https://abstract.inc
servers:
  - url: https://api.abstract.inc
security:
  - bearerAuth: []
tags:
  - name: Robot models
  - name: Robot runs
  - name: LLM models
paths:
  /v1/responses:
    post:
      tags:
        - LLM models
      summary: Create a response
      description: >
        The OpenAI Responses API for the LLM models. An `:async` model answers
        at once with a

        `queued` or `in_progress` response; poll `GET
        /v1/responses/{response_id}` until it is

        terminal. A `:superfast` model completes inline.


        `stream: true` returns server-sent events: live on `:superfast` models,
        buffered on

        `:async` models (keep-alives while the job runs, then the whole output).
      operationId: createResponse
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            The same POST with the same key returns the same response and never
            starts a second job. 1 to 200 characters from `A-Z a-z 0-9 _ . / :
            -`.
          schema:
            type: string
            pattern: ^[A-Za-z0-9_./:-]{1,200}$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponseRequest'
            examples:
              async:
                summary: Background job, then poll
                value:
                  model: glm-5.3:async
                  input: Summarise RFC 8628 in three sentences.
              superfast:
                summary: Inline, streamed live
                value:
                  model: kimi-k3:superfast
                  input: Write a haiku about a robot arm.
                  stream: true
      responses:
        '200':
          description: >-
            The response. On an `:async` model its `status` is `queued` or
            `in_progress`.
          headers:
            Idempotency-Key:
              description: >-
                The key this request ran under. The API generates one when you
                send none.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              example:
                id: resp_abc123
                object: response
                created_at: 1790000000
                status: queued
                model: glm-5.3:async
                output: []
                usage: null
            text/event-stream:
              schema:
                type: string
                description: OpenAI Responses server-sent events.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '409':
          description: >-
            `idempotency_conflict`, `idempotency_replay_terminal` or
            `submission_outcome_unknown`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: '`invalid_request`: the body is over 2 MiB.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            `invalid_request` (not a JSON object, unknown model, or an
            unsupported field) or `invalid_idempotency_key`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            `spend_limit_exceeded`: the request would cross the monthly spend
            limit. Do not retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: '`invalid_upstream_response`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    ResponseRequest:
      type: object
      required:
        - model
      additionalProperties: true
      properties:
        model:
          type: string
          enum:
            - glm-5.3:async
            - deepseek-v4-flash:async
            - glm-5.3:superfast
            - deepseek-v4-flash:superfast
            - kimi-k3:superfast
        input:
          description: The OpenAI Responses `input`.
          oneOf:
            - type: string
            - type: array
              items:
                type: object
        stream:
          type: boolean
          default: false
        max_output_tokens:
          type: integer
          minimum: 1
          maximum: 65536
          description: Default 8,192 on `glm-5.3:superfast` and 4,096 on the others.
        metadata:
          type: object
          additionalProperties: true
    Response:
      type: object
      required:
        - id
        - status
        - model
      properties:
        id:
          type: string
        object:
          type: string
          const: response
        created_at:
          type: integer
        status:
          type: string
          enum:
            - queued
            - in_progress
            - completed
            - failed
            - cancelled
            - incomplete
        model:
          type: string
          description: The public model id you sent.
        output:
          type: array
          items:
            type: object
        usage:
          oneOf:
            - $ref: '#/components/schemas/ResponseUsage'
            - type: 'null'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
            - code
          properties:
            message:
              type: string
              description: For people. It can change.
            type:
              type: string
            param:
              type:
                - string
                - 'null'
              description: The request field at fault, when one is.
            code:
              type: string
              description: Branch on this. See [Errors and limits](/errors).
    ResponseUsage:
      type: object
      properties:
        input_tokens:
          type: integer
        input_tokens_details:
          type: object
          properties:
            cached_tokens:
              type: integer
        output_tokens:
          type: integer
        total_tokens:
          type: integer
  responses:
    Unauthorized:
      description: '`missing_api_key` or `invalid_api_key`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              message: Invalid API key.
              type: invalid_request_error
              code: invalid_api_key
    PaymentRequired:
      description: '`payment_required`: the account has no payment method and no credit.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unavailable:
      description: >-
        A dependency is down, for example `auth_unavailable`,
        `billing_unavailable`, `metering_unavailable` or `engine_unavailable`.
        Retry with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Abstract API key. Get it with `abstract login`, pass it as
        `$(abstract token)`.

````

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