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

> ## Agent Instructions
> Autumn AI (autumn.ai) is a people and company intelligence API, a separate company from useautumn.com (billing software); no billing-product routes exist here.
> Base URL https://api.autumn.ai. Auth on every request: `X-API-Key: <key>` or `Authorization: Bearer <key>`. Plain HTTP + JSON. Schemas: https://www.autumn.ai/docs/openapi.json. Every docs page is Markdown at its URL plus `.md`.

# Start a task and stream

> Start a task from a prompt and stream the turn.



## OpenAPI

````yaml https://api.autumn.ai/openapi.json post /task/stream
openapi: 3.1.0
info:
  title: Autumn Task API
  description: >-
    Durable research tasks run by a sandboxed agent. Auth on every request:
    `X-API-Key: <key>` or `Authorization: Bearer <key>`. JSON over HTTP;
    `/stream` routes are server-sent events. Errors share one body: branch on
    `error`, retry when `retryable` is true.
  termsOfService: https://www.autumn.ai/terms
  contact:
    name: Autumn
    url: https://www.autumn.ai/
  version: 1.0.0
  x-llms-txt: https://api.autumn.ai/llms.txt
servers:
  - url: https://api.autumn.ai
security:
  - ApiKeyHeader: []
  - BearerApiKey: []
tags:
  - name: Tasks
    description: Start, continue, execute, stop and read tasks.
  - name: Outputs
    description: Rows a task produced.
  - name: Credits
    description: Account balance.
  - name: Uploads
    description: Attach a CSV or text file to a task.
externalDocs:
  description: Guide and cookbook
  url: https://www.autumn.ai/docs
paths:
  /task/stream:
    post:
      tags:
        - Tasks
      summary: Start a task and stream
      description: Start a task from a prompt and stream the turn.
      operationId: taskStartStream
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromptRequest'
        required: true
      responses:
        '200':
          description: >-
            Server-sent events: task, tool, text, error, done. A failure after
            the stream opens is an error event.
          content:
            text/event-stream:
              schema:
                type: string
        '400':
          description: >-
            `invalid_request`: The request is invalid. Fix the field in `param`
            (see `detail`), or read `message`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_request:
                  summary: invalid_request
                  value:
                    error: invalid_request
                    message: >-
                      The request is invalid. Fix the field in `param` (see
                      `detail`), or read `message`.
                    retryable: false
                    request_id: req_3f9c2a1b0d4e5f6a7b8c
        '401':
          description: >-
            `unauthorized`: Missing or invalid credentials. Send your full API
            key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.
          headers:
            WWW-Authenticate:
              description: Bearer realm="autumn"
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: unauthorized
                  value:
                    error: unauthorized
                    message: >-
                      Missing or invalid credentials. Send your full API key as
                      `X-API-Key: <key>` or `Authorization: Bearer <key>`.
                    retryable: false
                    request_id: req_3f9c2a1b0d4e5f6a7b8c
        '422':
          description: >-
            `invalid_request`: a field failed validation. `param` names it;
            `detail` is the validator output.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: invalid_request
                message: 'prompt: Field required'
                retryable: false
                param: prompt
                detail:
                  - type: missing
                    loc:
                      - body
                      - prompt
                    msg: Field required
                request_id: req_3f9c2a1b0d4e5f6a7b8c
        '503':
          description: >-
            `auth_unavailable`: Key verification is temporarily unavailable.
            Wait `retry_after` seconds, then send the request again.
          headers:
            Retry-After:
              description: Seconds to wait before the next request.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                auth_unavailable:
                  summary: auth_unavailable
                  value:
                    error: auth_unavailable
                    message: >-
                      Key verification is temporarily unavailable. Wait
                      `retry_after` seconds, then send the request again.
                    retryable: true
                    request_id: req_3f9c2a1b0d4e5f6a7b8c
                    retry_after: 5
      security:
        - ApiKeyHeader: []
        - BearerApiKey: []
components:
  schemas:
    PromptRequest:
      properties:
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
          description: Continue this task instead of creating one.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Display name. Derived from the prompt when omitted.
        clarify:
          type: boolean
          title: Clarify
          description: >-
            Allow one blocking planning question before work starts. Default
            false: plan and execute without asking.
          default: false
        input_files:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Input Files
          description: Task-local filenames returned by POST /validate-upload.
        output:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Output
          description: >-
            The output artifact to collect: id, kind, path, name; for research
            also schema, schema_order, target_count.
        outputs:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
              maxItems: 1
            - type: 'null'
          title: Outputs
          description: Alternative to output. Only the first entry is used.
        input_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input Schema
          description: Column types of input_rows.
        input_rows:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Input Rows
          description: Rows to enrich, one object per row.
        rules:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Rules
          description: Task rules the agent must follow.
        count:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Count
          description: Target row count.
        target_count:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Target Count
          description: Alternative to count.
        version:
          anyOf:
            - type: string
              enum:
                - ranger
                - scout
            - type: 'null'
          title: Version
          description: >-
            Model tier. `scout` (default): faster. `ranger`: most capable. Fixed
            for the life of the task.
          examples:
            - scout
        source_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Source Data
          description: Caller metadata stored on the task and returned with it.
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
          description: >-
            Natural-language task for Autumn. One of prompt or message is
            required.
          examples:
            - >-
              Find 10 Series A AI security companies and return name, website,
              funding stage, and source URLs.
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: Alias of prompt.
      additionalProperties: true
      type: object
      title: PromptRequest
      examples:
        - prompt: >-
            Find 10 Series A AI security companies and return name, website,
            funding stage, and source URLs.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: Stable snake_case code. Branch on this field.
          examples:
            - out_of_credits
        message:
          type: string
          title: Message
          description: What went wrong and what to do next.
        retryable:
          type: boolean
          title: Retryable
          description: >-
            True: the same request can succeed later. False: change the request,
            key, balance or id first.
        request_id:
          type: string
          title: Request Id
          description: Also the X-Request-ID header. A client-sent X-Request-ID is echoed.
          examples:
            - req_3f9c2a1b0d4e5f6a7b8c
        retry_after:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retry After
          description: Seconds to wait. Mirrors the Retry-After header. On 429.
        resolve:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolve
          description: Where to fix the cause. On 402.
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
          description: The field that failed validation. On 422.
        detail:
          anyOf:
            - {}
            - type: 'null'
          title: Detail
          description: Full validator output. On 422.
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
          description: The task the error refers to.
        task_created:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Task Created
          description: False when task creation was refused, so no task exists.
      additionalProperties: true
      type: object
      required:
        - error
        - message
        - retryable
        - request_id
      title: ErrorResponse
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Autumn API key.
      x-default: YOUR_AUTUMN_API_KEY
    BearerApiKey:
      type: http
      scheme: bearer
      bearerFormat: Autumn API key
      description: 'The same key as `Authorization: Bearer <key>`.'
      x-default: YOUR_AUTUMN_API_KEY

````