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

# Create an agent response

> Run a text turn and optionally continue a stored response.

Send a text `input`. To continue, send the next input with the earlier response’s `id` as `previous_response_id`. With `stream: true`, read text deltas until the `response.completed` event. A new non-streaming call returns the completed response with its `id`, `output`, `output_text`, and `usage`. [Try a first request](https://docs.eigi.ai/eigi-agent/developer-api.md).


## OpenAPI

````yaml api-reference/openapi.json POST /v1/eigi-agent/openai/responses
openapi: 3.0.0
info:
  title: eigi.ai API
  description: REST API for managing AI voice agents and conversations
  version: 1.0.0
  contact:
    email: buddy@eigi.ai
    url: https://eigi.ai
servers:
  - url: https://api.eigi.ai
    description: Production server
security:
  - ApiKeyAuth: []
  - OAuthAccessToken: []
paths:
  /v1/eigi-agent/openai/responses:
    post:
      tags:
        - Personal agent
      summary: Create an agent response
      description: Run a text turn and optionally continue a stored response.
      operationId: personalResponsesCreate
      parameters:
        - name: X-Eigi-Session-Id
          in: header
          required: false
          description: Stable conversation ID. X-Eigi-Session-Key is accepted as an alias.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentResponseInput'
            example:
              model: eigi-agent
              input: Hello!
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalAgentResponse'
            text/event-stream:
              schema:
                type: string
                description: Server-sent events when stream is true.
        '401':
          description: Missing or invalid credentials.
        '404':
          description: Response ID not found.
      security:
        - PlatformKeyBearer: []
        - ApiKeyAuth: []
components:
  schemas:
    AgentResponseInput:
      type: object
      properties:
        model:
          type: string
          example: eigi-agent
        input:
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                additionalProperties: true
        instructions:
          type: string
        previous_response_id:
          type: string
        stream:
          type: boolean
          default: false
    PersonalAgentResponse:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
        model:
          type: string
        status:
          type: string
        output:
          type: array
          items:
            type: object
            additionalProperties: true
        output_text:
          type: string
        usage:
          type: object
          additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Studio API key for server-side requests.
    OAuthAccessToken:
      type: http
      scheme: bearer
      description: OAuth access token issued to an authorized Eigi integration.
    PlatformKeyBearer:
      type: http
      scheme: bearer
      description: The owning account's Studio API key in the Authorization header.

````

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