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

# Update prompt

> Change the inference prompt on a running stream. Takes effect on the next inference cycle — no need to recreate the stream.

<Warning>
  The v0.2 API is deprecated. New integrations should use v1.
</Warning>


## OpenAPI

````yaml api-reference/v0.2/openapi.json PATCH /streams/{stream_id}/config/prompt
openapi: 3.1.0
info:
  title: Overshoot Streaming API
  description: >-
    Real-time video and image inference API. Stream video from any source
    (camera, file, RTSP, screen share) and receive continuous AI analysis
    results over WebSocket.


    ## Quick start


    1. **Create a stream** — `POST /streams` with a prompt and model

    2. **Connect WebSocket** — `WS /ws/streams/{stream_id}` to receive results

    3. **Send keepalives** — `POST /streams/{stream_id}/keepalive` every 15s

    4. **Close when done** — `DELETE /streams/{stream_id}`


    ## List models


    `GET /models` returns available models and their current status.


    ```json

    [{"model": "Qwen/Qwen3.5-9B", "ready": true, "status": "ready"}]

    ```


    | Status | `ready` | Meaning |

    |--------|---------|----------|

    | `ready` | `true` | Healthy, performing well |

    | `degraded` | `true` | Near capacity, higher latency expected |

    | `saturated` | `false` | At capacity, will reject new streams |

    | `unavailable` | `false` | Endpoint not reachable |


    ## WebSocket — Receive results


    Connect to `WS /ws/streams/{stream_id}` to receive inference results in
    real-time.


    **Authentication:** Send your API key as the first message:

    ```json

    {"api_key": "your-api-key"}

    ```


    **Result messages:** Each message is a `StreamInferenceResult` with fields:
    `result` (model output), `ok`, `error`, `finish_reason`,
    `inference_latency_ms`, `total_latency_ms`.


    **Close codes:**

    - `1008` — Authentication failed

    - `1001` — Stream ended (reasons: `client_requested`, `lease_expired`,
    `insufficient_credits`, transport disconnected)


    ## Authentication


    All endpoints require a Bearer token: `Authorization: Bearer <api_key>`


    Get your API key at
    [platform.overshoot.ai](https://platform.overshoot.ai/api-keys).


    ## SDKs


    - **JavaScript:** `npm install overshoot`

    - **Python:** `pip install
    git+https://github.com/Overshoot-ai/overshoot-python.git`


    Full documentation at [docs.overshoot.ai](https://docs.overshoot.ai).
  version: '0.2'
servers:
  - url: /v0.2
security: []
tags:
  - name: streams
    description: Create, manage, and close video inference streams.
  - name: internal
    description: Internal/experimental endpoints. Not used by SDKs.
paths:
  /streams/{stream_id}/config/prompt:
    patch:
      tags:
        - streams
      summary: Update prompt
      description: >-
        Change the inference prompt on a running stream. Takes effect on the
        next inference cycle — no need to recreate the stream.
      operationId: update_stream_prompt_streams__stream_id__config_prompt_patch
      parameters:
        - name: stream_id
          in: path
          required: true
          schema:
            type: string
            title: Stream Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromptUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StreamConfigResponse'
        '400':
          description: Invalid stream_id format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Stream or config not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Request validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - API Key: []
components:
  schemas:
    PromptUpdateRequest:
      properties:
        prompt:
          type: string
          minLength: 1
          title: Prompt
          description: New prompt text (e.g. 'Count the number of people')
      additionalProperties: false
      type: object
      required:
        - prompt
      title: PromptUpdateRequest
      description: >-
        Update the inference prompt on a running stream. Takes effect on the
        next inference cycle.
    StreamConfigResponse:
      properties:
        id:
          type: string
          title: Id
          description: Config identifier
        stream_id:
          type: string
          title: Stream Id
          description: Stream identifier
        prompt:
          type: string
          title: Prompt
          description: Active inference prompt
        backend:
          type: string
          enum:
            - gemini
            - overshoot
          title: Backend
          description: Inference backend
        model:
          type: string
          title: Model
          description: Model identifier
        output_schema_json:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Output Schema Json
          description: JSON Schema for structured output, or null
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
          description: ISO 8601 creation timestamp
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
          description: ISO 8601 last update timestamp
      type: object
      required:
        - id
        - stream_id
        - prompt
        - backend
        - model
        - output_schema_json
        - created_at
        - updated_at
      title: StreamConfigResponse
      description: Current stream inference configuration, returned after updates.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
        details:
          anyOf:
            - {}
            - type: 'null'
          title: Details
      type: object
      required:
        - error
      title: ErrorResponse
      description: Error response.
  securitySchemes:
    API Key:
      type: http
      description: Provide your API key in the Authorization header as 'Bearer <api_key>'
      scheme: bearer

````