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

# Mint a fresh Trigger.dev realtime access token for this run

> Trigger.dev public access tokens default to a 15-minute expiry; this endpoint is the mandatory refresh path for turns that run longer than that (00-master-spec.md §8).



## OpenAPI

````yaml /openapi.json get /api/v1/runs/{runId}/realtime-token
openapi: 3.1.0
info:
  title: VyomFlow API
  version: 1.0.0
  description: >-
    Internal REST surface (S1–S6) exposed as reference documentation. This is
    the S8 minimum-fallback scope (Submission Requirement #13) — generated
    directly from the same Zod contracts the Route Handlers validate against,
    not a hand-maintained duplicate. Auth documented here is the app's own Clerk
    bearer scheme; see the public API-key section for the versioned public
    surface, where shipped.
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: http://localhost:3000
security: []
paths:
  /api/v1/runs/{runId}/realtime-token:
    get:
      tags:
        - Runs
      summary: Mint a fresh Trigger.dev realtime access token for this run
      description: >-
        Trigger.dev public access tokens default to a 15-minute expiry; this
        endpoint is the mandatory refresh path for turns that run longer than
        that (00-master-spec.md §8).
      parameters:
        - schema:
            type: string
            minLength: 1
          required: true
          name: runId
          in: path
      responses:
        '200':
          description: Fresh realtime access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RealtimeAccess'
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Not found (non-leaking — see above).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - ClerkBearer: []
components:
  schemas:
    RealtimeAccess:
      type: object
      properties:
        runId:
          type: string
        streamKey:
          type: string
        accessToken:
          type: string
        expiresAt:
          type: string
      required:
        - runId
        - streamKey
        - accessToken
        - expiresAt
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    ClerkBearer:
      type: http
      scheme: bearer
      description: >-
        Clerk session token, `Authorization: Bearer <token>`. This documents the
        app's own internal auth as of S1-S6 — see S8-public-api-bonus.md for the
        fallback scope this doc covers, and the public API-key scheme's own page
        once the full scope ships.

````