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

# Get a fresh signed video URL

> Refreshes the stored signed URL if it has expired (24h TTL).

<Note>
  Just want a URL to drop into a `<video>` tag or redirect through, without parsing JSON? `GET https://mathify.dev/api/video/{fragmentId}` 307-redirects straight to the signed video. It's unauthenticated (no API key needed) and short-lived (15 min TTL), unlike this endpoint's 24h signed URL.
</Note>


## OpenAPI

````yaml /openapi.json get /fragments/{fragmentId}/signed-video
openapi: 3.1.0
info:
  title: Mathify API
  version: 1.0.0
  description: >-
    Public REST API for generating and retrieving Mathify math animations. See
    app/api/v1/README.md in the source repo for the underlying implementation.
servers:
  - url: https://mathify.dev/api/v1
security: []
tags:
  - name: Projects
  - name: Messages
  - name: Fragments
  - name: Music
  - name: Evals
paths:
  /fragments/{fragmentId}/signed-video:
    get:
      tags:
        - Fragments
      summary: Get a fresh signed video URL
      description: Refreshes the stored signed URL if it has expired (24h TTL).
      operationId: getSignedVideo
      parameters:
        - in: path
          name: fragmentId
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Signed URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignedVideoResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            A valid API key is required, or the account has no credits balance
            (see https://mathify.dev/pricing)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyHeader: []
        - bearerAuth: []
components:
  schemas:
    SignedVideoResponse:
      type: object
      properties:
        fragmentId:
          type: string
        signedUrl:
          type: string
        refreshed:
          type: boolean
      required:
        - fragmentId
        - signedUrl
        - refreshed
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          example: Project not found
          type: string
      required:
        - error
      additionalProperties: false
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Mathify API key (`mk_live_<64 hex chars>`), generated at
        /settings/api-keys.
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Same token as apiKeyHeader, passed as `Authorization: Bearer <token>`.'

````