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

# Export a cut's subtitle as SRT or VTT

> Download a cut's subtitle as a caption file.



## OpenAPI

````yaml https://roughy-api-staging.fly.dev/v1/openapi.json get /v1/cuts/{cut_id}/subtitle/export
openapi: 3.1.0
info:
  title: Roughy Public API
  version: 0.0.0
servers:
  - url: https://roughy-api-staging.fly.dev
    description: Staging
security: []
tags:
  - name: Projects
    description: >-
      Workflow containers. Every asset lives inside a project; a project groups
      everything for one piece of work (an episode, an interview, a talk).
  - name: Assets
    description: >-
      The unit of media. `POST /assets` creates one and opens its upload in a
      single call: the response body is the asset (its `upload_url` carries the
      transfer URL while `pending_upload`), and the TUS transfer URL also comes
      back in the `Location` header. List, detail (with signed download URL),
      and delete round it out. Each asset belongs to exactly one project;
      `language` is set at create and immutable.
  - name: Uploads
    description: >-
      Drive the TUS-resumable transfer that streams an asset's bytes. `POST
      /assets` opens the upload; `PATCH`/`HEAD` move and resume the bytes,
      `DELETE` cancels (removing the asset). Lost the transfer URL? Re-`GET` the
      asset — while it's `pending_upload`, `upload_url` carries it.
  - name: Cuts
    description: >-
      A kept-segment plan for an asset, computed automatically by Roughy. Create
      one with `POST /cuts {asset_id, script?}`, list with `GET /cuts`, read a
      cut, export it to NLE formats, and export its generated subtitle (SRT /
      VTT).
  - name: Renders
    description: >-
      Renders an asset to a video (`mp4`/`mov`) or audio (`m4a`/`mp3`) output,
      optionally applying a `cut_id`. `POST /renders {asset_id, cut_id?,
      output}` creates one; list, read (with a signed download URL), and cancel
      as a top-level `/renders` resource.
  - name: Webhooks
    description: >-
      Register endpoints to receive signed terminal-state events (cut / render /
      asset) instead of polling.
  - name: Credits
    description: Credit balance and usage history.
  - name: Users
    description: Your account and profile.
  - name: OAuth
    description: >-
      Device authorization grant (RFC 8628), served at app.roughy.ai/oauth/* for
      the editor plugin. Internal surface — not part of the public /v1 SDK.
  - name: billing
    description: Stripe customer portal, invoices, subscriptions.
  - name: api-keys
    description: Mint and revoke API keys.
  - name: auth
    description: Sign up, log in, log out, and OAuth flows for the dashboard.
  - name: webhooks
    description: Inbound provider webhooks (Stripe, Resend, ElevenLabs).
  - name: email-preferences
    description: Per-category transactional-email opt-out preferences.
  - name: sse
    description: Server-sent live updates per asset.
  - name: health
    description: Liveness and readiness probes.
paths:
  /v1/cuts/{cut_id}/subtitle/export:
    get:
      tags:
        - Cuts
      summary: Export a cut's subtitle as SRT or VTT
      description: Download a cut's subtitle as a caption file.
      operationId: export_cut_subtitle_v1_cuts__cut_id__subtitle_export_get
      parameters:
        - name: cut_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Identifier of the cut.
            title: Cut Id
          description: Identifier of the cut.
        - name: format
          in: query
          required: true
          schema:
            type: string
            description: '`srt` or `vtt` (VTT carries per-word karaoke timing).'
            title: Format
          description: '`srt` or `vtt` (VTT carries per-word karaoke timing).'
      responses:
        '200':
          description: The subtitle as a caption file (attachment).
          content:
            application/x-subrip:
              schema:
                type: string
                format: binary
            text/vtt:
              schema:
                type: string
                format: binary
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: not_found
                  message: Not found.
        '409':
          description: >-
            Unsupported export `format` (`unsupported_format`) or the subtitle
            isn't `completed` yet (generic `conflict`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: conflict
                  message: >-
                    Unsupported export `format` (`unsupported_format`) or the
                    subtitle isn't `completed` yet (generic `conflict`).
      security:
        - HTTPBearer: []
components:
  schemas:
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
      description: |-
        The shape every error response returns.

        Request-correlation lives in the `X-Request-Id` response
        header — include that header value in a support ticket to
        correlate with server-side logs.
      example:
        error:
          code: validation_error
          fields:
            - field: body.name
              message: Field required
          message: Upload-Length must be at least 64 bytes.
    ErrorBody:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
          description: >-
            Stable enum classifier. Clients should switch on this to drive retry
            / display logic; `message` is for humans.
        message:
          type: string
          title: Message
          description: >-
            One-line human-readable description of the failure. Safe to show end
            users; never carries backend internals.
        fields:
          anyOf:
            - items:
                $ref: '#/components/schemas/ErrorFieldDetail'
              type: array
            - type: 'null'
          title: Fields
          description: >-
            Per-field validation errors, set only for `code: validation_error`
            responses. Omitted in every other case.
      type: object
      required:
        - code
        - message
      title: ErrorBody
      description: Inner `error` object — the body of `ErrorResponse.error`.
    ErrorCode:
      type: string
      enum:
        - bad_request
        - unauthenticated
        - forbidden
        - not_found
        - conflict
        - gone
        - precondition_failed
        - payload_too_large
        - unsupported_media_type
        - validation_error
        - account_locked
        - rate_limited
        - insufficient_credits
        - internal_error
        - upstream_error
        - upstream_unavailable
        - asset_processing
        - asset_payment_required
        - asset_failed
        - asset_not_ready
        - modifier_not_ready
        - unsupported_format
        - frame_rate_required
        - cut_not_proposed
      title: ErrorCode
      description: |-
        Stable, client-facing error-classifier enum.

        New entries require an ADR amendment so SDK consumers can rely
        on the list being closed. Numeric HTTP status code stays in the
        response status line — `code` is the orthogonal *category*
        clients switch on without parsing the message.
    ErrorFieldDetail:
      properties:
        field:
          type: string
          title: Field
          description: >-
            Dotted path to the offending field, rooted at the request location
            (e.g. `body.name`, `query.limit`, `path.project_id`).
        message:
          type: string
          title: Message
          description: Human-readable explanation for this field.
      type: object
      required:
        - field
        - message
      title: ErrorFieldDetail
      description: Per-field validation failure on a single request field.
  securitySchemes:
    HTTPBearer:
      type: http
      description: >-
        Pass your API key as `Authorization: Bearer sk_…`. Mint a key from your
        dashboard's API-keys page.
      scheme: bearer
      bearerFormat: sk_…

````