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

# Start (or resume) a prompt run

> Kicks off a fresh scan across the project's active platforms. Returns immediately with a `runId`. If a previous run was interrupted, this resumes it instead of starting a new one. Concurrent runs against the same project return 409.



## OpenAPI

````yaml /api-reference/openapi.json post /prompts/run
openapi: 3.1.0
info:
  title: OpenLens API
  version: 1.4.0
  description: >-
    Public REST API for OpenLens. Onboard clients, run scans across the major AI
    platforms, read visibility metrics, and download client-ready reports. Beta
    — endpoints may evolve before GA.
  contact:
    name: OpenLens support
    email: contact@aibread.com
servers:
  - url: https://openlens.com/api
security:
  - bearerAuth: []
tags:
  - name: Onboarding
  - name: Runs
  - name: Metrics
  - name: Citations
  - name: Deliverables
  - name: Resources
  - name: Account
  - name: Workstreams
paths:
  /prompts/run:
    post:
      tags:
        - Runs
      summary: Start (or resume) a prompt run
      description: >-
        Kicks off a fresh scan across the project's active platforms. Returns
        immediately with a `runId`. If a previous run was interrupted, this
        resumes it instead of starting a new one. Concurrent runs against the
        same project return 409.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                  format: uuid
              required:
                - projectId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  runId:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - running
                  resumed:
                    type: boolean
                required:
                  - runId
                  - status
        '400':
          description: Missing or invalid request parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            Monthly included API calls for your tier are used up (code
            `USAGE_LIMIT`). Body includes a `limit` object — `{ limitHit,
            currentTier, targetTier, feature, cap, used, resetAt }` — describing
            the cap and the upgrade that lifts it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found or not owned by your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: A run is already in progress for this project.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      activeRunId:
                        type:
                          - string
                          - 'null'
                        format: uuid
        '429':
          description: >-
            Rate limit, project cap, or daily quota hit. Body includes a `code`
            field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error. Retry; if persistent, contact support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code for programmatic handling, when applicable.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Clerk API key. Create one from your account settings under API Keys.

````