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

# Start a conversation

> Ask the Specter Agent a question or give it a task, in plain English. The
agent searches Specter, reads company, people and investor data, and can
create lists and saved searches, add to or rename a list, and remove things
from your workspace, for you, with the approvals described below.

<Note>
Billed as Specter Agent usage: the credits the turn cost, charged when the turn completes. A failed or cancelled turn is free.
</Note>

## How a conversation works

A conversation is a series of turns. A turn is one message you send and
everything the agent does about it: it usually takes 10 seconds to a few
minutes. This call starts the conversation and its first turn, and returns the
conversation with that turn as `turn`.

By default the call returns at once, with the conversation `working` and a
`202`. Pass `wait_seconds` (up to 60) to hold the request open until the
conversation stops working:

- `200` when it did, with the answer in `turn`.
- `202` when the wait ended first. Read it with
  [Get a conversation](/api-reference/agent/get-a-conversation), which waits
  the same way, until `state` is not `working`. `Location` carries its URL and
  `Retry-After` says when to ask again.

Every response carries the conversation's `id`. Keep it before you do anything
else: a client that gives up on the call can still read the conversation, or
cancel the turn with [Cancel a turn](/api-reference/agent/cancel-a-turn).

## States and statuses

| `state` | Meaning |
| --- | --- |
| `working` | The latest turn is `queued` or `running`. `answer` and `credits_used` are `null`. |
| `input_required` | The turn stopped for you: `turn.input_requests` lists what it waits for. Answer with [Continue a conversation](/api-reference/agent/continue-a-conversation). |
| `idle` | The turn ended. Its `status` says how: `completed` with an `answer`, `failed` with an `error`, or `cancelled`. A failed or cancelled turn is free. |

A conversation never reads as failed: after a failed or cancelled turn it is
`idle` and takes another message.

## What to expect

- There is no streaming and no view of the agent's steps.
- The cost is known only when the turn ends, and is what the turn cost in credits.
- The agent holds writes as the Specter app does. Creating a list or a saved
  search is held according to the approval settings of the account the turn
  acts as, and removing items from a list or deleting a list or a saved
  search is always held. A held write does not run. The conversation reads
  `input_required` and lists the write in `turn.input_requests`; see
  [Continue a conversation](/api-reference/agent/continue-a-conversation). The
  agent cannot import a file or delete a column.
- A message longer than 8,000 characters is a `422 VALIDATION_ERROR`.
- You can have 5 turns working at a time. A sixth is a `429
  TOO_MANY_ACTIVE_CONVERSATIONS`.
- Conversations made with an organization key act as the organization's
  service account, and share its allowance. A turn that is refused because the
  allowance is spent is a `402`.
- `web_url` links to the conversation in the Specter web app, whichever key
  made it.

## Safe retries

Send an `Idempotency-Key` header and a call that timed out can be repeated
without starting a second conversation.



## OpenAPI

````yaml /api-ref/openapi.json post /agent/conversations
openapi: 3.1.0
info:
  title: Specter API
  termsOfService: https://tryspecter.com/terms/
  contact:
    name: API support
    email: api-support@tryspecter.com
  version: 1.0.0
servers:
  - url: https://app.tryspecter.com/api/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Enrich
    description: >-
      Look up a company, person, or investor and, if Specter does not already
      hold it, fetch it on demand. Includes email-based person enrichment.
  - name: Search
    description: Find records across every product from a single plain-English query.
  - name: Agent
    description: >-
      Start a conversation with the Specter Agent, send it messages, answer what
      it asks, and read or cancel its turns.
  - name: Companies
    description: >-
      Company profiles, funding, headcount, traction, the per-company signals
      and sub-resources attached to a single company, and identifier resolution.
  - name: People
    description: >-
      Specter people records: profile data, contact details, and per-person
      lookups for a known person ID.
  - name: Investors
    description: >-
      Specter investor records: profile, activity, targeting, funds, portfolio
      companies, and the funding rounds they have participated in.
  - name: Transactions
    description: 'Transaction detail by ID: funding rounds, acquisitions, and IPOs.'
  - name: Revenue Signals
    description: >-
      Revenue and profitability signals: by ID, by date, and for a saved list or
      company search.
  - name: Talent Signals
    description: 'Talent signals: by ID and in bulk by ID.'
  - name: Investor Interest Signals
    description: 'Investor interest signals: by ID and in bulk by ID.'
  - name: Company Lists
    description: Create, query, and maintain lists of companies, including their results.
  - name: Investor Lists
    description: Create, query, and maintain lists of investors, including their results.
  - name: People Lists
    description: Create, query, and maintain lists of people, including their results.
  - name: Saved Searches
    description: List and delete searches saved via tryspecter.com.
  - name: Company Saved Searches
    description: Details and results for saved company searches.
  - name: People Saved Searches
    description: Details and results for saved people searches.
  - name: Investor Saved Searches
    description: Details and results for saved investor searches.
  - name: Talent Signals Saved Searches
    description: Details and results for saved Talent Signals searches.
  - name: Investor Interest Saved Searches
    description: Details and results for saved Investor Interest Signals searches.
  - name: Funding Rounds Saved Searches
    description: Details and results for saved funding-round searches.
  - name: Acquisitions Saved Searches
    description: Details and results for saved acquisition searches.
  - name: IPOs Saved Searches
    description: Details and results for saved IPO searches.
  - name: Network
    description: >-
      Your team's LinkedIn network: the people and companies your teammates are
      connected to, and your reach into a given company.
  - name: Account
    description: >-
      Organisation-level resources: your team's members, API call logs, and
      credit balance.
paths:
  /agent/conversations:
    post:
      tags:
        - Agent
      summary: Start a conversation
      description: >-
        Ask the Specter Agent a question or give it a task, in plain English.
        The

        agent searches Specter, reads company, people and investor data, and can

        create lists and saved searches, add to or rename a list, and remove
        things

        from your workspace, for you, with the approvals described below.


        <Note>

        Billed as Specter Agent usage: the credits the turn cost, charged when
        the turn completes. A failed or cancelled turn is free.

        </Note>


        ## How a conversation works


        A conversation is a series of turns. A turn is one message you send and

        everything the agent does about it: it usually takes 10 seconds to a few

        minutes. This call starts the conversation and its first turn, and
        returns the

        conversation with that turn as `turn`.


        By default the call returns at once, with the conversation `working` and
        a

        `202`. Pass `wait_seconds` (up to 60) to hold the request open until the

        conversation stops working:


        - `200` when it did, with the answer in `turn`.

        - `202` when the wait ended first. Read it with
          [Get a conversation](/api-reference/agent/get-a-conversation), which waits
          the same way, until `state` is not `working`. `Location` carries its URL and
          `Retry-After` says when to ask again.

        Every response carries the conversation's `id`. Keep it before you do
        anything

        else: a client that gives up on the call can still read the
        conversation, or

        cancel the turn with [Cancel a
        turn](/api-reference/agent/cancel-a-turn).


        ## States and statuses


        | `state` | Meaning |

        | --- | --- |

        | `working` | The latest turn is `queued` or `running`. `answer` and
        `credits_used` are `null`. |

        | `input_required` | The turn stopped for you: `turn.input_requests`
        lists what it waits for. Answer with [Continue a
        conversation](/api-reference/agent/continue-a-conversation). |

        | `idle` | The turn ended. Its `status` says how: `completed` with an
        `answer`, `failed` with an `error`, or `cancelled`. A failed or
        cancelled turn is free. |


        A conversation never reads as failed: after a failed or cancelled turn
        it is

        `idle` and takes another message.


        ## What to expect


        - There is no streaming and no view of the agent's steps.

        - The cost is known only when the turn ends, and is what the turn cost
        in credits.

        - The agent holds writes as the Specter app does. Creating a list or a
        saved
          search is held according to the approval settings of the account the turn
          acts as, and removing items from a list or deleting a list or a saved
          search is always held. A held write does not run. The conversation reads
          `input_required` and lists the write in `turn.input_requests`; see
          [Continue a conversation](/api-reference/agent/continue-a-conversation). The
          agent cannot import a file or delete a column.
        - A message longer than 8,000 characters is a `422 VALIDATION_ERROR`.

        - You can have 5 turns working at a time. A sixth is a `429
          TOO_MANY_ACTIVE_CONVERSATIONS`.
        - Conversations made with an organization key act as the organization's
          service account, and share its allowance. A turn that is refused because the
          allowance is spent is a `402`.
        - `web_url` links to the conversation in the Specter web app, whichever
        key
          made it.

        ## Safe retries


        Send an `Idempotency-Key` header and a call that timed out can be
        repeated

        without starting a second conversation.
      operationId: createAgentConversation
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
                maxLength: 255
              - type: 'null'
            description: >-
              A value you choose, up to 255 characters, that names this
              conversation for 24 hours. Repeat the call with the same key and
              message, for instance after a timeout, and you get the same
              conversation back instead of a second paid one. The same key with
              another message is a `409`.
            examples:
              - f47ac10b-58cc-4372-a567-0e02b2c3d479
            title: Idempotency-Key
          description: >-
            A value you choose, up to 255 characters, that names this
            conversation for 24 hours. Repeat the call with the same key and
            message, for instance after a timeout, and you get the same
            conversation back instead of a second paid one. The same key with
            another message is a `409`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartConversationRequest'
      responses:
        '200':
          description: >-
            The conversation is not working: it needs your input, or its latest
            turn has ended.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
          headers:
            Location:
              description: The absolute URL that reads the conversation.
              schema:
                type: string
        '202':
          description: >-
            The conversation is still working. Read it again with [Get a
            conversation](/api-reference/agent/get-a-conversation).
          headers:
            Location:
              description: The absolute URL that reads the conversation.
              schema:
                type: string
            Retry-After:
              description: >-
                Seconds to wait before reading the conversation again. Sent
                while it is working.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
        '401':
          $ref: '#/components/responses/ApiKeyMissingOrApiKeyNotValid'
        '402':
          $ref: '#/components/responses/AgentCreditsRefused'
        '403':
          $ref: '#/components/responses/NotPermitted'
        '409':
          $ref: '#/components/responses/NoApiUserOrIdempotencyKeyReused'
        '422':
          $ref: '#/components/responses/ValidationFailedOrEmptyMessage'
        '429':
          $ref: '#/components/responses/RateLimitedOrTooManyActiveConversations'
        '503':
          $ref: '#/components/responses/KeyVerificationUnavailable'
components:
  schemas:
    StartConversationRequest:
      properties:
        message:
          type: string
          maxLength: 8000
          minLength: 1
          title: Message
          description: What to ask the agent, in plain English. Up to 8,000 characters.
          examples:
            - Which Berlin fintechs raised a Series A in the last year?
        wait_seconds:
          type: integer
          maximum: 60
          minimum: 0
          title: Wait Seconds
          description: >-
            How long to hold the request open for the conversation to stop
            working, from 0 to 60 seconds. The call returns as soon as the
            conversation is no longer `working`, or with the conversation as it
            stands when the wait ends. With `0`, the default, it returns at
            once.
          default: 0
          examples:
            - 30
      additionalProperties: false
      type: object
      required:
        - message
      title: StartConversationRequest
      examples:
        - message: >-
            Which Berlin fintechs raised a Series A in the last year? Save them
            to a list called Berlin fintech.
          wait_seconds: 30
    Conversation:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The conversation's ID. Pass it to the other conversation endpoints.
          examples:
            - 3f6c8f0e-2c1a-4b5e-9d7a-1b2c3d4e5f60
        state:
          $ref: '#/components/schemas/ConversationState'
          description: >-
            `working` while the latest turn is `queued` or `running`.
            `input_required` while it waits for you. `idle` once it has
            `completed`, `failed` or been `cancelled`: a conversation never
            reads as failed, and is ready for another message.
          examples:
            - idle
        turn:
          $ref: '#/components/schemas/Turn'
          description: >-
            The conversation's latest turn. Read an earlier one with [Get a
            turn](/api-reference/agent/get-a-turn).
        web_url:
          type: string
          title: Web Url
          description: >-
            A link to the conversation in the Specter web app. It opens for
            anyone who can see the conversation there.
          examples:
            - >-
              https://app.tryspecter.com/agent/3f6c8f0e-2c1a-4b5e-9d7a-1b2c3d4e5f60
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the conversation started.
          examples:
            - '2026-12-01T09:30:00Z'
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the conversation last changed.
          examples:
            - '2026-12-01T09:30:48Z'
      type: object
      required:
        - id
        - state
        - turn
        - web_url
        - created_at
        - updated_at
      title: Conversation
      description: A conversation with the Specter Agent and its latest turn.
    ConversationState:
      type: string
      enum:
        - working
        - input_required
        - idle
      title: ConversationState
      description: >-
        What a conversation is doing. A failed or cancelled turn leaves it
        `idle`.
    Turn:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: >-
            The turn's ID. It does not change when the turn is answered after
            stopping for input.
          examples:
            - 9b1d7c52-6f0e-4a8b-8d3f-5e2a1c7b9d40
        status:
          $ref: '#/components/schemas/TurnStatus'
          description: >-
            `queued` and `running` mean the agent is still working. `completed`
            means it answered. `input_required` means the turn stopped for you,
            to approve a write it held or to answer a question: `input_requests`
            says what it waits for, and you answer through [Continue a
            conversation](/api-reference/agent/continue-a-conversation).
            `failed` and `cancelled` are final and free.
          examples:
            - completed
        message:
          type: string
          title: Message
          description: The message that started the turn.
          examples:
            - Which Berlin fintechs raised a Series A in the last year?
        answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer
          description: >-
            The agent's reply in Markdown, with links to Specter pages. For a
            question it is the question. `null` until the turn is `completed` or
            `input_required`, and `null` for held writes the agent said nothing
            about.
          examples:
            - >-
              Three Berlin fintechs raised a Series A in the last year:
              [Hedgehog
              Payments](https://app.tryspecter.com/companies/5e3bc2b700c8f4c966ad2bbd).
        follow_ups:
          items:
            type: string
          type: array
          title: Follow Ups
          description: >-
            Up to three questions the agent suggests asking next. Empty when it
            has none.
          examples:
            - - Compare their funding
              - Who invested in them?
        input_requests:
          items:
            $ref: '#/components/schemas/AgentInputRequest'
          type: array
          title: Input Requests
          description: >-
            What the turn waits for when `status` is `input_required`: the
            writes it holds, or else its question. Empty in every other state,
            and once a later turn exists.
          examples:
            - []
        credits_used:
          anyOf:
            - type: integer
            - type: 'null'
          title: Credits Used
          description: >-
            Credits the turn cost, summed over the work it took, and 0 for a
            turn that failed or was cancelled before it cost anything. `null`
            while the turn is going: the cost is known only when it ends.
          examples:
            - 7
        error:
          anyOf:
            - $ref: '#/components/schemas/TurnError'
            - type: 'null'
          description: Why the turn failed. `null` unless `status` is `failed`.
          examples:
            - null
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the turn started.
          examples:
            - '2026-12-01T09:30:00Z'
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
          description: >-
            When the turn last stopped: it finished, failed, was cancelled, or
            is waiting for input. `null` while it is going.
          examples:
            - '2026-12-01T09:30:48Z'
      type: object
      required:
        - id
        - status
        - message
        - answer
        - follow_ups
        - input_requests
        - credits_used
        - error
        - created_at
        - completed_at
      title: Turn
      description: One message you sent and everything the agent did about it.
    ApiKeyMissing:
      properties:
        errorCode:
          type: string
          const: API_KEY_MISSING
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - No API Key was presented on the header X-API-KEY
      type: object
      required:
        - errorCode
        - message
      title: ApiKeyMissing
    ApiKeyNotValid:
      properties:
        errorCode:
          type: string
          enum:
            - API_KEY_NOT_VALID
            - key_from_another_org
          title: Errorcode
          description: >-
            `key_from_another_org` when an `ak_` key was issued for an
            organization its owner no longer belongs to.
        message:
          type: string
          title: Message
          examples:
            - API key present, but not valid
      type: object
      required:
        - errorCode
        - message
      title: ApiKeyNotValid
    AgentCreditsRefused:
      properties:
        errorCode:
          type: string
          enum:
            - OUT_OF_CREDITS
            - CREDIT_LIMIT_REACHED
          title: Errorcode
          description: >-
            `OUT_OF_CREDITS` when the Specter Agent's allowance is spent and the
            organization has no credits to pay for another turn;
            `CREDIT_LIMIT_REACHED` when a limit set on the person or the API key
            is reached.
        message:
          type: string
          title: Message
          examples:
            - There are no more credits available to complete the request
        scope:
          anyOf:
            - type: string
              enum:
                - member
                - key
            - type: 'null'
          title: Scope
          description: >-
            Sent with `CREDIT_LIMIT_REACHED`: whether the person's or the key's
            limit was reached.
        period:
          anyOf:
            - type: string
              enum:
                - day
                - week
                - month
            - type: 'null'
          title: Period
          description: 'Sent with `CREDIT_LIMIT_REACHED`: the period of the limit.'
      type: object
      required:
        - errorCode
        - message
      title: AgentCreditsRefused
    NotPermitted:
      properties:
        errorCode:
          type: string
          enum:
            - NOT_PERMITTED
            - user_suspended
            - api_access_not_granted
            - org_key_disabled
            - member_keys_disabled
            - member_keys_admins_only
          title: Errorcode
          description: >-
            `NOT_PERMITTED` for a team key; the other codes are the reasons an
            `ak_` key is refused.
        message:
          type: string
          title: Message
          examples:
            - API key present, but you are not permitted
      type: object
      required:
        - errorCode
        - message
      title: NotPermitted
    NoApiUser:
      properties:
        errorCode:
          type: string
          const: NO_API_USER
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - >-
              Your organization's API user is not set up yet, so there is no
              owner for this item. Contact support.
      type: object
      required:
        - errorCode
        - message
      title: NoApiUser
    IdempotencyKeyReused:
      properties:
        errorCode:
          type: string
          const: IDEMPOTENCY_KEY_REUSED
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - This idempotency key was already used with a different request.
      type: object
      required:
        - errorCode
        - message
      title: IdempotencyKeyReused
    ValidationFailed:
      properties:
        errorCode:
          type: string
          const: VALIDATION_ERROR
          title: Errorcode
        message:
          type: string
          title: Message
          description: >-
            Why the request was rejected: each invalid field, with the path to
            it.
          examples:
            - Field required (body.name)
      type: object
      required:
        - errorCode
        - message
      title: ValidationFailed
    EmptyMessage:
      properties:
        errorCode:
          type: string
          const: EMPTY_MESSAGE
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - The message is empty.
      type: object
      required:
        - errorCode
        - message
      title: EmptyMessage
    RateLimited:
      properties:
        errorCode:
          type: string
          const: RATE_LIMITED
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - You have been rate-limited
      type: object
      required:
        - errorCode
        - message
      title: RateLimited
    TooManyActiveConversations:
      properties:
        errorCode:
          type: string
          const: TOO_MANY_ACTIVE_CONVERSATIONS
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - >-
              You already have 5 conversations working. Wait for one to finish,
              or cancel one, before starting more work.
      type: object
      required:
        - errorCode
        - message
      title: TooManyActiveConversations
    KeyVerificationUnavailable:
      properties:
        errorCode:
          type: string
          const: clerk_unavailable
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - Key verification is temporarily unavailable
      type: object
      required:
        - errorCode
        - message
      title: KeyVerificationUnavailable
    TurnStatus:
      type: string
      enum:
        - queued
        - running
        - completed
        - input_required
        - failed
        - cancelled
      title: TurnStatus
      description: >-
        Where a turn stands. `queued` and `running` are in progress; the rest
        are final.
    AgentInputRequest:
      properties:
        id:
          type: string
          title: Id
          description: Identifies the request. Key your answer by it in `input_responses`.
          examples:
            - int-call_abc
        type:
          type: string
          enum:
            - approval
            - question
          title: Type
          description: >-
            `approval` asks you to approve a write the agent held. `question`
            asks you something.
          examples:
            - approval
            - question
        message:
          type: string
          title: Message
          description: What is asked, in a sentence fit to show a person.
          examples:
            - Create the list "Berlin fintech"?
            - Which of the two companies named Hedgehog do you mean?
        requested_schema:
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          type: object
          title: Requested Schema
          description: >-
            A flat JSON Schema of the reply `content`. Empty for an approval.
            For a question, a `reply` string. The `content` of your answer must
            match this schema. The `enum` on `reply`, when present, lists the
            agent's suggested answers; any text is accepted.
          examples:
            - properties: {}
              type: object
            - properties:
                reply:
                  enum:
                    - The Berlin fintech
                    - The fintech in San Francisco
                  title: Your answer
                  type: string
              required:
                - reply
              type: object
        tool_call:
          anyOf:
            - $ref: '#/components/schemas/AgentToolCall'
            - type: 'null'
          description: For an `approval`, the write that is held. `null` for a question.
          examples:
            - arguments:
                name: Berlin fintech
                product_type: company
              name: create_list
            - null
      type: object
      required:
        - id
        - type
        - message
        - requested_schema
        - tool_call
      title: AgentInputRequest
      description: One thing a turn is waiting for, after an MCP elicitation request.
    TurnError:
      properties:
        code:
          type: string
          title: Code
          description: A stable code for why the turn failed.
          examples:
            - TURN_FAILED
        message:
          type: string
          title: Message
          description: What happened, in a sentence fit to show a person.
          examples:
            - >-
              The agent could not finish this request. The failed attempt was
              not charged; send the message again.
      type: object
      required:
        - code
        - message
      title: TurnError
    JsonValue: {}
    AgentToolCall:
      properties:
        name:
          type: string
          title: Name
          description: The tool the agent wants to call.
          examples:
            - create_list
        arguments:
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          type: object
          title: Arguments
          description: The arguments it would call the tool with.
          examples:
            - name: Berlin fintech
              product_type: company
      type: object
      required:
        - name
        - arguments
      title: AgentToolCall
  responses:
    ApiKeyMissingOrApiKeyNotValid:
      description: Unauthorized
      content:
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/ApiKeyMissing'
              - $ref: '#/components/schemas/ApiKeyNotValid'
    AgentCreditsRefused:
      description: >-
        The turn cannot start: the Specter Agent's allowance is spent and there
        are no credits to pay for it, or a limit on the person or the key is
        reached. The `X-CreditLimit-*` headers are not sent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AgentCreditsRefused'
    NotPermitted:
      description: Forbidden - There is no permissions to use the endpoint
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotPermitted'
    NoApiUserOrIdempotencyKeyReused:
      description: >-
        Conflict - your organization has no API user yet (`NO_API_USER`), or the
        `Idempotency-Key` was used with a different request
        (`IDEMPOTENCY_KEY_REUSED`).
      content:
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/NoApiUser'
              - $ref: '#/components/schemas/IdempotencyKeyReused'
    ValidationFailedOrEmptyMessage:
      description: >-
        Validation Error - a field is invalid (a message longer than the agent
        accepts included), or the message is empty once trimmed
        (`EMPTY_MESSAGE`).
      content:
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/ValidationFailed'
              - $ref: '#/components/schemas/EmptyMessage'
    RateLimitedOrTooManyActiveConversations:
      description: >-
        Too Many Requests - the API rate limit is exceeded (`RATE_LIMITED`), or
        the caller already has 5 turns working
        (`TOO_MANY_ACTIVE_CONVERSATIONS`).
      headers:
        X-RateLimit-Limit:
          description: The total rate limit allowed for this endpoint
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: The number of requests remaining
          schema:
            type: integer
        X-RateLimit-Reset:
          description: The number of seconds until the rate limit resets
          schema:
            type: number
            format: float
      content:
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/RateLimited'
              - $ref: '#/components/schemas/TooManyActiveConversations'
    KeyVerificationUnavailable:
      description: >-
        Key verification is temporarily unavailable, so an `ak_` key could not
        be checked. Retry after the interval in `Retry-After`.
      headers:
        Retry-After:
          description: The number of seconds to wait before retrying
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/KeyVerificationUnavailable'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

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