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

# Create response

> OpenAI Responses-compatible endpoint. Supports Responses-native input, reasoning controls, built-in tools such as web search, and official Responses SSE when stream is true.



## OpenAPI

````yaml /openapi.json post /v1/responses
openapi: 3.1.0
info:
  title: APIAny.AI Public API
  version: 1.0.0
  description: >-
    Public API for APIAny.AI model aggregation, async media tasks, chat
    completions, billing visibility, and task lookup.
servers:
  - url: https://apiany.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Models
    description: Public model catalog.
  - name: Chat
    description: Text generation and chat-compatible endpoints.
  - name: Images
    description: Image generation and editing endpoints.
  - name: Videos
    description: Video generation endpoints.
  - name: Moderation
    description: Image safety and moderation endpoints.
  - name: Tasks
    description: Async task lookup.
  - name: Account
    description: Account and credit visibility.
  - name: Free APIs
    description: Free utility APIs protected by API key rate limits.
paths:
  /v1/responses:
    post:
      tags:
        - Chat
      summary: Create response
      description: >-
        OpenAI Responses-compatible endpoint. Supports Responses-native input,
        reasoning controls, built-in tools such as web search, and official
        Responses SSE when stream is true.
      operationId: createResponse
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesRequest'
            examples:
              reasoning:
                value:
                  model: gpt-5.5
                  input: Review this API design and list the main risks.
                  reasoning:
                    effort: high
                    summary: auto
                  text:
                    verbosity: medium
              webSearch:
                value:
                  model: gpt-5.5
                  input: What changed in the latest OpenAI Responses API docs?
                  tools:
                    - type: web_search_preview
      responses:
        '200':
          description: OpenAI-compatible Responses response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
            text/event-stream:
              schema:
                type: string
                description: Responses SSE stream when stream=true.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    ResponsesRequest:
      type: object
      additionalProperties: true
      properties:
        model:
          type: string
          example: gpt-5.5
        input:
          description: >-
            Responses input. Can be a string or an array of message /
            tool-result items.
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                additionalProperties: true
        instructions:
          type: string
          description: System or developer instructions.
        max_output_tokens:
          type: integer
          minimum: 1
          description: Maximum output tokens.
        temperature:
          type: number
          minimum: 0
          maximum: 2
        top_p:
          type: number
          minimum: 0
          maximum: 1
        reasoning:
          type: object
          additionalProperties: true
          properties:
            effort:
              type: string
              enum:
                - none
                - minimal
                - low
                - medium
                - high
                - xhigh
              description: Reasoning strength for supported models.
            summary:
              type: string
              enum:
                - auto
                - concise
                - detailed
        text:
          type: object
          additionalProperties: true
          properties:
            verbosity:
              type: string
              enum:
                - low
                - medium
                - high
            format:
              type: object
              additionalProperties: true
        tools:
          type: array
          description: >-
            Responses tools, including function tools and built-in tools such as
            web_search_preview.
          items:
            type: object
            additionalProperties: true
        tool_choice:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
        stream:
          type: boolean
          description: If true, responses are streamed as OpenAI Responses SSE events.
        metadata:
          type: object
          additionalProperties: true
      required:
        - model
        - input
    ResponsesResponse:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
        object:
          type: string
          example: response
        created_at:
          type: integer
        status:
          type: string
        model:
          type: string
        output:
          type: array
          items:
            type: object
            additionalProperties: true
        output_text:
          type: string
        usage:
          $ref: '#/components/schemas/TokenUsage'
      required:
        - id
        - object
        - status
        - model
        - output
    TokenUsage:
      type: object
      properties:
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        total_tokens:
          type: integer
        input_tokens:
          type: integer
        output_tokens:
          type: integer
        cached_input_tokens:
          type: integer
      additionalProperties: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request
                - auth_error
                - rate_limit
                - insufficient_quota
                - content_policy
                - timeout
                - network_error
                - service_error
                - billable_error
                - unknown
            message:
              type: string
            param:
              type:
                - string
                - 'null'
            code:
              type:
                - string
                - 'null'
          required:
            - type
            - message
      required:
        - error
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````