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

# Create a realtime run

> Start a Developer API run and stream public events.



## OpenAPI

````yaml /developer-api/developer-v1.openapi.yaml post /v1/realtime/runs
openapi: 3.1.0
info:
  title: CREAO Developer API
  version: 1.0.0
  description: |
    Create, update, and run personal CREAO agents from your backend with
    Account API keys. The v1 API uses stable `agent_id`, `conversation_id`, and
    `run_id` identifiers and is served from `developer.creao.ai`.
servers:
  - url: https://developer.creao.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Create, update, and edit personal agents for the authenticated account.
  - name: Runs
    description: Create, stream, fetch, and list Developer API runs.
paths:
  /v1/realtime/runs:
    post:
      tags:
        - Runs
      summary: Create a realtime run
      description: |
        Create a realtime run and receive a Server-Sent Events stream. Use this
        endpoint when your product experience needs live assistant output, tool
        progress, artifacts, and a terminal event.
      operationId: createRealtimeRun
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRealtimeRunRequest'
            examples:
              realtimeSummary:
                summary: Realtime summary
                value:
                  agent_id: 00000000-0000-4000-8000-000000000000
                  input:
                    query: Summarize the latest quarterly report.
      responses:
        '200':
          description: Server-Sent Events stream.
          headers:
            Cache-Control:
              schema:
                type: string
              description: Always `no-cache`.
            X-Accel-Buffering:
              schema:
                type: string
              description: Always `no`.
          content:
            text/event-stream:
              schema:
                type: string
              examples:
                stream:
                  value: >
                    event: run.created

                    data:
                    {"run_id":"11111111-1111-4111-8111-111111111111","agent_id":"00000000-0000-4000-8000-000000000000","conversation_id":"22222222-2222-4222-8222-222222222222"}


                    event: output_text.delta

                    data: {"delta":"Hello"}


                    event: run.completed

                    data:
                    {"run_id":"11111111-1111-4111-8111-111111111111","status":"completed","result":{"text":"Hello"}}
        '400':
          $ref: '#/components/responses/RealtimeInvalidInput'
        '401':
          $ref: '#/components/responses/AuthenticationRequired'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '403':
          $ref: '#/components/responses/AccountBlocked'
        '404':
          description: The agent or conversation does not exist for this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    CreateRealtimeRunRequest:
      type: object
      additionalProperties: false
      required:
        - agent_id
        - input
      properties:
        agent_id:
          type: string
          format: uuid
          description: Active personal CREAO agent to run.
        input:
          description: >-
            JSON input for the agent. Serialized input must be 256 KB or
            smaller.
        conversation_id:
          type: string
          format: uuid
          description: >-
            Existing conversation to continue. Omit to create a new
            conversation.
    ErrorResponse:
      type: object
      additionalProperties: true
      required:
        - error
      properties:
        error:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
          description: Debug message. Do not rely on this field in production clients.
        available:
          type: number
          description: Available credits, when returned for credit errors.
        required:
          type: number
          description: Required credits, when returned for credit errors.
        retryAfterSeconds:
          type: integer
          description: Retry delay, when returned for hourly cap errors.
  responses:
    RealtimeInvalidInput:
      description: >-
        Invalid realtime run request shape, invalid UUID, unsupported field, or
        oversized input.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalidInput:
              value:
                error: INVALID_INPUT
            inputTooLarge:
              value:
                error: INPUT_TOO_LARGE
    AuthenticationRequired:
      description: Missing, malformed, revoked, or unknown Account API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingKey:
              value:
                error: AUTHENTICATION_REQUIRED
    InsufficientCredits:
      description: Account does not have enough credits to start the run.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficientCredits:
              value:
                error: INSUFFICIENT_CREDITS
                available: 0
                required: 1000
    AccountBlocked:
      description: Account is blocked from starting new runs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            accountBlocked:
              value:
                error: ACCOUNT_BLOCKED
    RateLimited:
      description: Account-level or IP-level rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              value:
                error: RATE_LIMITED
    ServiceUnavailable:
      description: Agent execution service was unavailable before the run was accepted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unavailable:
              value:
                error: SERVICE_UNAVAILABLE
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: cr_sk
      description: Account API key from Developer Console. Keys start with `cr_sk_`.
      x-default: cr_sk_your_key_here

````