> ## 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`.

# Stop a task

> Stop the turn, drop queued messages, return the task to plan. Outputs stay readable.



## OpenAPI

````yaml https://api.autumn.ai/openapi.json post /task/{task_id}/stop
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/{task_id}/stop:
    post:
      tags:
        - Tasks
      summary: Stop a task
      description: >-
        Stop the turn, drop queued messages, return the task to plan. Outputs
        stay readable.
      operationId: taskStop
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            description: The task_id returned by POST /task or POST /task/start.
            examples:
              - 8fab6f34
            title: Task Id
          description: The task_id returned by POST /task or POST /task/start.
      responses:
        '200':
          description: Task returned to plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '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
        '404':
          description: >-
            `task_not_found`: No task with that task_id. Check the id, or list
            tasks with GET /task.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                task_not_found:
                  summary: task_not_found
                  value:
                    error: task_not_found
                    message: >-
                      No task with that task_id. Check the id, or list tasks
                      with GET /task.
                    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. |
            `service_unavailable`: Autumn 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
                service_unavailable:
                  summary: service_unavailable
                  value:
                    error: service_unavailable
                    message: >-
                      Autumn 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:
    Task:
      properties:
        task_id:
          type: string
          title: Task Id
          examples:
            - 8fab6f34
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          examples:
            - Series A AI security companies
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: >-
            `plan` (idle, or finished), `execute` (working), `accepted`
            (queued), `deleted`.
          examples:
            - execute
        phase:
          anyOf:
            - type: string
              enum:
                - plan
                - execute
            - type: 'null'
          title: Phase
          examples:
            - execute
        activity:
          anyOf:
            - type: string
            - type: 'null'
          title: Activity
          description: idle, planning, executing or thinking. Finished is `idle`.
          examples:
            - executing
        output_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Output Count
          examples:
            - 10
        credits_used:
          anyOf:
            - type: integer
            - type: 'null'
          title: Credits Used
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        poll_after_s:
          anyOf:
            - type: integer
            - type: 'null'
          title: Poll After S
          description: Seconds to wait before polling status again.
          examples:
            - 5
        status_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Url
          examples:
            - /task/8fab6f34/state
        task_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Url
          examples:
            - /task/8fab6f34
        output_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Url
          examples:
            - /task/8fab6f34/output
        stream_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Stream Url
          examples:
            - /task/8fab6f34/stream
      additionalProperties: true
      type: object
      required:
        - task_id
      title: Task
    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

````