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

# Create Response

> Create a model response.



## OpenAPI

````yaml /api-reference/v3-openapi.json post /v3/responses
openapi: 3.1.0
info:
  title: Eden AI API V3
  version: 3.0.0
servers:
  - url: https://api.edenai.run
    description: Production server
security: []
paths:
  /v3/responses:
    post:
      tags:
        - Responses
      summary: Create Response
      description: Create a model response.
      operationId: create_response_v3_responses_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LLMResponseObject'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - AuthBearer: []
components:
  schemas:
    ResponsesBody:
      properties:
        fallbacks:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 3
            - type: 'null'
          title: Fallbacks
          description: >-
            List of fallback model IDs to try if the primary model fails. Models
            are tried in order. Example: ['anthropic/claude-3-opus',
            'openai/gpt-4o']
        router_candidates:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Router Candidates
          description: >-
            List of model candidates for dynamic routing when using
            model='@edenai'. Each entry should be 'provider/model', e.g.
            ['openai/gpt-4o', 'anthropic/claude-3-5-sonnet-20241022']. If not
            provided, defaults to all available models.
        model:
          type: string
          title: Model
          description: Model identifier, e.g. 'openai/gpt-4o'
        input:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/EasyInputMessage'
                  - $ref: '#/components/schemas/ResponseInputItem'
              type: array
          title: Input
          description: Text, image, or file inputs to the model
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
          description: >-
            System/developer instructions prepended to input. Not carried over
            when using previous_response_id.
        previous_response_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Response Id
          description: >-
            ID of a prior response to continue a multi-turn conversation. The
            provider manages conversation state server-side.
        stream:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Stream
          description: Whether to stream the response via server-sent events.
          default: false
        tools:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Tools
          description: >-
            List of tools the model may call (function, web_search, file_search,
            etc.).
        tool_choice:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tool Choice
          description: >-
            Controls which tool is called. 'auto', 'required', 'none', or a
            specific tool object.
        temperature:
          anyOf:
            - type: number
              maximum: 2
              minimum: 0
            - type: 'null'
          title: Temperature
        top_p:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Top P
        max_output_tokens:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Max Output Tokens
        reasoning:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Reasoning
          description: 'Reasoning configuration, e.g. {''effort'': ''low''|''medium''|''high''}.'
        truncation:
          anyOf:
            - type: string
              enum:
                - auto
                - disabled
            - type: 'null'
          title: Truncation
          description: How to handle context that exceeds the model's context window.
        store:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Store
          description: >-
            Whether the provider should store the response server-side for later
            retrieval.
          default: true
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Up to 16 key-value pairs for tagging.
        user:
          anyOf:
            - type: string
            - type: 'null'
          title: User
          description: Stable end-user identifier for abuse detection.
        parallel_tool_calls:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Parallel Tool Calls
        text:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Text
          description: >-
            Text output configuration, e.g. {'format': {'type': 'json_schema',
            ...}}.
        include:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Include
          description: Additional output data to include, e.g. 'file_search_call.results'.
        background:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Background
          description: Whether to run the model response in the background.
      type: object
      required:
        - model
        - input
      title: ResponsesBody
    LLMResponseObject:
      properties:
        cost:
          anyOf:
            - type: number
            - type: 'null'
          title: Cost
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
        id:
          type: string
          title: Id
        object:
          type: string
          const: response
          title: Object
          default: response
        created_at:
          type: integer
          title: Created At
        model:
          type: string
          title: Model
        status:
          type: string
          title: Status
        output:
          items:
            anyOf:
              - $ref: '#/components/schemas/ResponseOutputMessage'
              - additionalProperties: true
                type: object
          type: array
          title: Output
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
        previous_response_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Response Id
        usage:
          anyOf:
            - $ref: '#/components/schemas/ResponseUsage'
            - type: 'null'
        error:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Error
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - id
        - created_at
        - model
        - status
        - output
      title: LLMResponseObject
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EasyInputMessage:
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
            - system
            - developer
          title: Role
        content:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/ResponseInputText'
                  - $ref: '#/components/schemas/ResponseInputImage'
                  - $ref: '#/components/schemas/ResponseInputFile'
                  - additionalProperties: true
                    type: object
              type: array
          title: Content
        type:
          type: string
          const: message
          title: Type
          default: message
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
      type: object
      required:
        - role
        - content
      title: EasyInputMessage
    ResponseInputItem:
      properties:
        type:
          type: string
          title: Type
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
      additionalProperties: true
      type: object
      required:
        - type
      title: ResponseInputItem
      description: >-
        Non-message input item forwarded to the provider as-is (reasoning,
        function_call, etc.).
    ResponseOutputMessage:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: message
          title: Type
        role:
          type: string
          const: assistant
          title: Role
        status:
          type: string
          title: Status
        content:
          items:
            anyOf:
              - $ref: '#/components/schemas/ResponseOutputText'
              - $ref: '#/components/schemas/ResponseOutputRefusal'
              - additionalProperties: true
                type: object
          type: array
          title: Content
      type: object
      required:
        - id
        - type
        - role
        - status
        - content
      title: ResponseOutputMessage
    ResponseUsage:
      properties:
        input_tokens:
          type: integer
          title: Input Tokens
        output_tokens:
          type: integer
          title: Output Tokens
        total_tokens:
          type: integer
          title: Total Tokens
        input_tokens_details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input Tokens Details
        output_tokens_details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Output Tokens Details
      type: object
      required:
        - input_tokens
        - output_tokens
        - total_tokens
      title: ResponseUsage
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ResponseInputText:
      properties:
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControl'
            - type: 'null'
        type:
          type: string
          const: input_text
          title: Type
        text:
          type: string
          title: Text
      type: object
      required:
        - type
        - text
      title: ResponseInputText
    ResponseInputImage:
      properties:
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControl'
            - type: 'null'
        type:
          type: string
          const: input_image
          title: Type
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        file_id:
          anyOf:
            - type: string
            - type: 'null'
          title: File Id
        detail:
          type: string
          enum:
            - low
            - high
            - auto
          title: Detail
          default: auto
      type: object
      required:
        - type
      title: ResponseInputImage
    ResponseInputFile:
      properties:
        cache_control:
          anyOf:
            - $ref: '#/components/schemas/CacheControl'
            - type: 'null'
        type:
          type: string
          const: input_file
          title: Type
        file_id:
          anyOf:
            - type: string
            - type: 'null'
          title: File Id
        file_url:
          anyOf:
            - type: string
            - type: 'null'
          title: File Url
        file_data:
          anyOf:
            - type: string
            - type: 'null'
          title: File Data
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
      type: object
      required:
        - type
      title: ResponseInputFile
    ResponseOutputText:
      properties:
        type:
          type: string
          const: output_text
          title: Type
        text:
          type: string
          title: Text
        annotations:
          items: {}
          type: array
          title: Annotations
          default: []
      type: object
      required:
        - type
        - text
      title: ResponseOutputText
    ResponseOutputRefusal:
      properties:
        type:
          type: string
          const: refusal
          title: Type
        refusal:
          type: string
          title: Refusal
      type: object
      required:
        - type
        - refusal
      title: ResponseOutputRefusal
    CacheControl:
      properties:
        type:
          type: string
          const: ephemeral
          title: Type
          description: Cache type. Currently only 'ephemeral' is supported.
        ttl:
          anyOf:
            - type: string
            - type: 'null'
          title: Ttl
          description: Optional cache time-to-live, e.g. '3600s'. Provider-dependent.
      type: object
      required:
        - type
      title: CacheControl
      description: >-
        Anthropic-style cache marker placed on a message content part.


        LiteLLM translates this into native provider context caching (e.g.
        Gemini

        ``cachedContents``, Anthropic prompt caching). Only a single contiguous

        block of cache-marked content is cached per request, and providers
        enforce

        a minimum token count below which caching is silently skipped.
  securitySchemes:
    AuthBearer:
      type: http
      scheme: bearer

````