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

# Send a follow-up prompt

> Asks the agent to continue where its last prompt stopped. Accepted only while the run is `idle`; the run is `working` again until the agent stops.



## OpenAPI

````yaml https://tracks.alpic.ai/api/openapi.json post /runs/{id}/prompts
openapi: 3.1.0
info:
  title: Tracks API
  version: 0.0.1
  description: >-
    Run coding agents such as Claude Code in isolated sandboxes with an API key
    of your organization. Create a run with a prompt, then follow its output and
    what it costs, or launch an experiment to compare agents on your scenarios.
servers:
  - url: https://tracks.alpic.ai/api
security: []
tags:
  - name: Runs
    description: Start coding agents and follow their work.
  - name: Files
    description: Upload files to place in a run's sandbox.
  - name: Connections
    description: >-
      Let agents use MCP servers as one of their users, without their
      credentials entering the sandbox.
  - name: Experiments
    description: >-
      Define scenarios to give several agents in several variants, judged on
      what they did.
  - name: Executions
    description: Launch experiments and read their results.
  - name: Library
    description: What your experiments can give their agents.
  - name: System
paths:
  /runs/{id}/prompts:
    post:
      tags:
        - Runs
      summary: Send a follow-up prompt
      description: >-
        Asks the agent to continue where its last prompt stopped. Accepted only
        while the run is `idle`; the run is `working` again until the agent
        stops.
      operationId: runs.sendPrompt
      parameters:
        - name: id
          in: path
          schema:
            $ref: '#/components/schemas/RunId'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendPromptInput'
        required: true
      responses:
        '202':
          description: One instruction to the agent and the work it did in response.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/UnfinishedPrompt'
                  - $ref: '#/components/schemas/FinishedPrompt'
                description: One instruction to the agent and the work it did in response.
        '400':
          description: >-
            The request is invalid: a value is missing, has the wrong type or is
            out of range. Fix it before sending the request again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestEncoded'
        '401':
          description: >-
            The API key is missing, malformed or revoked, or its organization is
            closed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyRefusedEncoded'
        '404':
          description: No run with this id exists in your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunNotFoundEncoded'
        '409':
          description: >-
            The run accepts no prompt now: it is one-shot, has ended, or is
            still working on a prompt.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunNotIdleEncoded'
        '422':
          description: >-
            The agent cannot use this model. The message lists the models it can
            use.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelNotOfferedEncoded'
        '503':
          description: >-
            The model provider could not be reached to check the model. Retry
            later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelProviderUnavailableEncoded'
      security:
        - bearer: []
components:
  schemas:
    RunId:
      type: string
      description: Unique identifier of the run.
    SendPromptInput:
      type: object
      properties:
        text:
          type: string
          minLength: 1
          description: What you ask the agent to do next.
        model:
          type: string
          minLength: 1
          description: Model for this prompt only. Defaults to the run's model.
      required:
        - text
      additionalProperties: false
    UnfinishedPrompt:
      type: object
      properties:
        run_id:
          $ref: '#/components/schemas/RunId'
        index:
          type: integer
          minimum: 1
          maximum: 9007199254740991
          description: Position of the prompt in its run, starting at 1.
        text:
          type: string
          description: What you asked the agent to do.
        model:
          type: string
          description: Model for this prompt, when not the run's.
        submitted_at:
          type: string
        status:
          type: string
          enum:
            - working
            - failed
            - canceled
          description: >-
            `working` while the agent works on it. `failed` or `canceled` when
            the run ended before the prompt finished.
      required:
        - run_id
        - index
        - text
        - submitted_at
        - status
      additionalProperties: false
      description: A prompt the agent has not finished.
    FinishedPrompt:
      type: object
      properties:
        run_id:
          $ref: '#/components/schemas/RunId'
        index:
          type: integer
          minimum: 1
          maximum: 9007199254740991
          description: Position of the prompt in its run, starting at 1.
        text:
          type: string
          description: What you asked the agent to do.
        model:
          type: string
          description: Model for this prompt, when not the run's.
        submitted_at:
          type: string
        status:
          type: string
          enum:
            - finished
          description: The agent stopped, whatever its exit code.
        finished_at:
          type: string
        exit_code:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Exit code of the agent.
      required:
        - run_id
        - index
        - text
        - submitted_at
        - status
        - finished_at
        - exit_code
      additionalProperties: false
      description: A prompt the agent has finished.
    InvalidRequestEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - InvalidRequest
        message:
          type: string
          description: Every problem found, in one sentence.
        location:
          type: string
          enum:
            - path
            - query
            - header
            - body
          description: The part of the request that is wrong.
        issues:
          type: array
          items:
            $ref: '#/components/schemas/RequestIssue'
          description: Each problem found, with where it is.
      required:
        - _tag
        - message
        - location
        - issues
      additionalProperties: false
    ApiKeyRefusedEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - ApiKeyRefused
        message:
          type: string
      required:
        - _tag
        - message
      additionalProperties: false
    RunNotFoundEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - RunNotFound
        message:
          type: string
      required:
        - _tag
        - message
      additionalProperties: false
    RunNotIdleEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - RunNotIdle
        message:
          type: string
      required:
        - _tag
        - message
      additionalProperties: false
    ModelNotOfferedEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - ModelNotOffered
        message:
          type: string
      required:
        - _tag
        - message
      additionalProperties: false
    ModelProviderUnavailableEncoded:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - ModelProviderUnavailable
        message:
          type: string
      required:
        - _tag
        - message
      additionalProperties: false
    RequestIssue:
      type: object
      properties:
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: number
              - type: string
                enum:
                  - Infinity
                  - '-Infinity'
                  - NaN
          description: >-
            Keys leading to the wrong value inside that part of the request,
            such as `["agent", "model"]`. Empty when the problem concerns that
            part as a whole.
        message:
          type: string
          description: What is wrong with the value.
      required:
        - path
        - message
      additionalProperties: false
      description: One problem found in the request.
  securitySchemes:
    bearer:
      description: >-
        An API key of your organization, starting with `trk_`, sent as
        `Authorization: Bearer <key>`.
      type: http
      scheme: bearer

````

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