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

# Create response

> Generate a stateless Responses result or typed SSE stream. Requires inference:write. Send conversation history in input. Storage, background execution and previous_response_id are unavailable. Function and supported web-search tools are accepted.



## OpenAPI

````yaml /openapi.json post /v1/responses
openapi: 3.1.0
info:
  title: Limitless API
  version: 0.2.0
  description: >-
    Customer inference, scoped organization administration, policies, and health
    probes for Limitless at https://trylimitless.ai. This deployment uses
    sandbox credits and test payments but sends real inference requests. Model
    features depend on the active backend. The OpenAI SDK base URL is
    https://trylimitless.ai/v1.
servers:
  - url: https://trylimitless.ai
    description: >-
      Limitless sandbox API: test payments and real inference. OpenAI SDK
      clients add /v1 to this origin.
security:
  - customerKey: []
tags:
  - name: Health
  - name: Models
  - name: Inference
  - name: Credits
  - name: Organization
  - name: Projects
  - name: Project keys
  - name: Admin keys
  - name: Spending limits
  - name: Reports
  - name: Policies
paths:
  /v1/responses:
    post:
      tags:
        - Inference
      summary: Create response
      description: >-
        Generate a stateless Responses result or typed SSE stream. Requires
        inference:write. Send conversation history in input. Storage, background
        execution and previous_response_id are unavailable. Function and
        supported web-search tools are accepted.
      operationId: createResponse
      parameters:
        - name: X-Limitless-Session-ID
          in: header
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 512
          description: >-
            Optional cache-affinity hint, isolated to this organization and
            project. X-Abliteration-Session-ID is accepted for compatibility.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponseCreateRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseObject'
            text/event-stream:
              schema:
                type: string
                description: >-
                  SSE records emitted when stream=true. Parse this endpoint’s
                  native event format; network chunks can split events.
          description: Successful response.
          headers:
            X-Request-ID:
              description: Gateway request ID for Activity and support.
              schema:
                type: string
                format: uuid
        '400':
          $ref: '#/components/responses/Api400'
        '401':
          $ref: '#/components/responses/Api401'
        '402':
          $ref: '#/components/responses/Api402'
        '403':
          $ref: '#/components/responses/Api403'
        '404':
          $ref: '#/components/responses/Api404'
        '409':
          $ref: '#/components/responses/Api409'
        '413':
          $ref: '#/components/responses/Api413'
        '415':
          $ref: '#/components/responses/Api415'
        '422':
          $ref: '#/components/responses/Api422'
        '429':
          $ref: '#/components/responses/Api429'
        '500':
          $ref: '#/components/responses/Api500'
        '502':
          $ref: '#/components/responses/Api502'
        '503':
          $ref: '#/components/responses/Api503'
        '504':
          $ref: '#/components/responses/Api504'
      security:
        - customerKey: []
        - customerHeaderKey: []
components:
  schemas:
    ResponseCreateRequest:
      properties:
        model:
          type: string
          minLength: 1
          maxLength: 200
        input:
          anyOf:
            - type: string
            - items:
                additionalProperties: true
                type: object
              type: array
        instructions:
          anyOf:
            - type: string
            - type: 'null'
        stream:
          type: boolean
          default: false
        store:
          type: boolean
          const: false
          default: false
          description: Responses are stateless; true is rejected.
        background:
          type: boolean
          const: false
          default: false
        max_output_tokens:
          anyOf:
            - type: integer
              maximum: 999990
              minimum: 1
            - type: 'null'
          description: >-
            Positive output bound; limited by the model’s configured maximum.
            Chat/Responses default to 1,024 when omitted. Send exactly one
            output-bound field.
        max_tool_calls:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
        temperature:
          anyOf:
            - type: number
            - type: 'null'
        top_p:
          anyOf:
            - type: number
            - type: 'null'
        presence_penalty:
          anyOf:
            - type: number
              maximum: 2
              minimum: -2
            - type: 'null'
        frequency_penalty:
          anyOf:
            - type: number
              maximum: 2
              minimum: -2
            - type: 'null'
        tools:
          items:
            additionalProperties: true
            type: object
          type: array
          description: >-
            Chat: function tools. Responses: functions and supported web_search
            aliases. Messages: custom functions, web_search_2025_03_05 and
            web_fetch_2025_03_05. See the tools guide.
        tool_choice:
          anyOf:
            - type: string
              enum:
                - none
                - auto
                - required
            - additionalProperties: true
              type: object
            - type: 'null'
        parallel_tool_calls:
          anyOf:
            - type: boolean
            - type: 'null'
        reasoning:
          anyOf:
            - $ref: '#/components/schemas/ResponsesReasoning'
            - type: 'null'
        include_reasoning:
          anyOf:
            - type: boolean
            - type: 'null'
        text:
          anyOf:
            - $ref: '#/components/schemas/ResponsesTextConfig'
            - type: 'null'
        include:
          anyOf:
            - items:
                type: string
                enum:
                  - message.input_image.image_url
                  - message.output_text.logprobs
                  - reasoning.encrypted_content
                  - code_interpreter_call.outputs
                  - computer_call_output.output.image_url
                  - file_search_call.results
              type: array
            - type: 'null'
        truncation:
          anyOf:
            - type: string
              enum:
                - auto
                - disabled
            - type: 'null'
        metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
        client_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
        prompt_cache_key:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Optional stable cache-affinity key, isolated to this organization
            and project.
          maxLength: 512
        service_tier:
          anyOf:
            - type: string
              enum:
                - auto
                - default
                - flex
                - scale
                - priority
            - type: 'null'
        user:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
        safety_identifier:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
        policy_ids:
          items:
            type: string
            maxLength: 120
            minLength: 1
          type: array
          maxItems: 1000
          description: >-
            Published Limitless policy IDs. These add to automatically attached
            policies; provider IDs are not accepted.
      additionalProperties: false
      type: object
      required:
        - model
        - input
      description: >-
        Model-dependent request fields. Read the compatibility guide for
        supported combinations and limits.
    ResponseObject:
      properties:
        id:
          type: string
          pattern: ^resp_
        object:
          type: string
          const: response
          default: response
        status:
          type: string
          enum:
            - completed
            - failed
            - in_progress
            - incomplete
            - queued
        model:
          type: string
        output:
          items:
            additionalProperties: true
            type: object
          type: array
        usage:
          anyOf:
            - $ref: '#/components/schemas/ResponseUsage'
            - type: 'null'
      additionalProperties: true
      type: object
      required:
        - id
        - status
        - model
        - output
    ResponsesReasoning:
      properties:
        effort:
          anyOf:
            - type: string
              enum:
                - none
                - minimal
                - low
                - medium
                - high
                - xhigh
                - max
                - ultracode
            - type: 'null'
        summary:
          anyOf:
            - type: string
              enum:
                - auto
                - concise
                - detailed
            - type: 'null'
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
        max_tokens:
          anyOf:
            - type: integer
              maximum: 999990
              minimum: 1
            - type: 'null'
        exclude:
          anyOf:
            - type: boolean
            - type: 'null'
      additionalProperties: false
      type: object
    ResponsesTextConfig:
      properties:
        format:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ResponsesTextFormatText'
                - $ref: '#/components/schemas/ResponsesTextFormatJsonObject'
                - $ref: '#/components/schemas/ResponsesTextFormatJsonSchema'
              discriminator:
                propertyName: type
                mapping:
                  json_object: '#/components/schemas/ResponsesTextFormatJsonObject'
                  json_schema: '#/components/schemas/ResponsesTextFormatJsonSchema'
                  text: '#/components/schemas/ResponsesTextFormatText'
            - type: 'null'
        verbosity:
          anyOf:
            - type: string
              enum:
                - low
                - medium
                - high
            - type: 'null'
      additionalProperties: false
      type: object
    ResponseUsage:
      properties:
        input_tokens:
          type: integer
          minimum: 0
        input_tokens_details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
        output_tokens:
          type: integer
          minimum: 0
        output_tokens_details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
        total_tokens:
          type: integer
          minimum: 0
      additionalProperties: true
      type: object
      required:
        - input_tokens
        - output_tokens
        - total_tokens
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - error
    ResponsesTextFormatText:
      properties:
        type:
          type: string
          const: text
      additionalProperties: false
      type: object
      required:
        - type
    ResponsesTextFormatJsonObject:
      properties:
        type:
          type: string
          const: json_object
      additionalProperties: false
      type: object
      required:
        - type
    ResponsesTextFormatJsonSchema:
      properties:
        type:
          type: string
          const: json_schema
        name:
          type: string
          maxLength: 128
          minLength: 1
        description:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
        schema:
          additionalProperties: true
          type: object
        strict:
          anyOf:
            - type: boolean
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - type
        - name
        - schema
    ErrorDetail:
      properties:
        code:
          type: string
        message:
          type: string
        type:
          type: string
          description: Error category; policy failures use policy_error.
        param:
          anyOf:
            - type: string
            - type: 'null'
        request_id:
          type: string
        doc_url:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - code
        - message
        - type
  responses:
    Api400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Request validation failed.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api401:
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Missing or invalid credential.
    Api402:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Available credit or spending cap cannot cover admission.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api403:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Credential scope or policy denied this operation.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api404:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Resource or model not found in the caller’s organization.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api409:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Revision, state or idempotency conflict.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api413:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: JSON body exceeds the gateway size limit.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api415:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Send application/json.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api422:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Provider request validation failed.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api429:
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Request rate or concurrency exceeded.
    Api500:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Unexpected gateway failure.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api502:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Backend request failed.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api503:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: A required service or configuration is unavailable.
      headers:
        X-Request-ID:
          description: Gateway request ID for Activity and support.
          schema:
            type: string
            format: uuid
    Api504:
      description: Inference deadline exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    customerKey:
      type: http
      scheme: bearer
      bearerFormat: lk_...
      description: >-
        Project customer key. Requires the permission for the requested
        endpoint.
    customerHeaderKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Alternative project-key header. Authorization takes precedence when both
        are supplied.

````

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