Captions Internal API

The internal API from Captions — 8 operation(s) for internal.

Operations 10

POST /internal/retention/purge Purge Retention #
POST /internal/api-keys/generate Create Api Key #
POST /internal/api-keys/{key_id} Revoke Api Key #
GET /internal/api-keys/user/{user_id} List User Api Keys #
POST /internal/rate-limits/overrides Create Rate Limit Override #
GET /internal/rate-limits/overrides List Rate Limit Overrides #
GET /internal/rate-limits/overrides/{identifier} Get Rate Limit Override #
PUT /internal/rate-limits/overrides/{identifier} Update Rate Limit Override #
DELETE /internal/rate-limits/overrides/{identifier} Delete Rate Limit Override #
POST /internal/rate-limits/overrides/{identifier}/invalidate-cache Invalidate Rate Limit Override Cache #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/captions:captions-internal-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

captions-internal-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mirage Video Internal API
  description: API for AI-powered video generation
  version: 0.0.1
tags:
- name: Internal
paths:
  /internal/retention/purge:
    post:
      tags:
      - Internal
      summary: Purge Retention
      description: Run one idempotent purge pass; non-2xx makes Cloud Tasks retry.
      operationId: purge_retention_internal_retention_purge_post
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetentionPurgeRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetentionPurgeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /internal/api-keys/generate:
    post:
      tags:
      - Internal
      summary: Create Api Key
      description: 'Create a new API key for a user.


        This endpoint requires internal API key authentication.

        The returned API key should be saved securely as it cannot be retrieved again.'
      operationId: create_api_key_internal_api_keys_generate_post
      parameters:
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
          description: Internal API Key for authentication
          title: X-Api-Key
        description: Internal API Key for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKeyRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateApiKeyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /internal/api-keys/{key_id}:
    post:
      tags:
      - Internal
      summary: Revoke Api Key
      operationId: revoke_api_key_internal_api_keys__key_id__post
      parameters:
      - name: key_id
        in: path
        required: true
        schema:
          type: string
          title: Key Id
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
          description: Internal API Key for authentication
          title: X-Api-Key
        description: Internal API Key for authentication
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Revoke Api Key Internal Api Keys  Key Id  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /internal/api-keys/user/{user_id}:
    get:
      tags:
      - Internal
      summary: List User Api Keys
      operationId: list_user_api_keys_internal_api_keys_user__user_id__get
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          title: User Id
      - name: org_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Organization ID to filter by
          title: Org Id
        description: Organization ID to filter by
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
          description: Internal API Key for authentication
          title: X-Api-Key
        description: Internal API Key for authentication
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiKeyInfo'
                title: Response List User Api Keys Internal Api Keys User  User Id  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /internal/rate-limits/overrides:
    post:
      tags:
      - Internal
      summary: Create Rate Limit Override
      description: 'Create a new rate limit override for an org or user.


        This endpoint requires internal API key authentication.


        Example request:

        ```json

        {

        "identifier": "org:org_123",

        "endpointLimits": {

        "generation": {

        "maxTokens": 100,

        "refillRatePerSecond": 5.0

        },

        "status": {

        "maxTokens": 200,

        "refillRatePerSecond": 50.0

        }

        },

        "note": "Enterprise plan with higher limits"

        }

        ```'
      operationId: create_rate_limit_override_internal_rate_limits_overrides_post
      parameters:
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
          description: Internal API Key for authentication
          title: X-Api-Key
        description: Internal API Key for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RateLimitOverrideCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitOverrideResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Internal
      summary: List Rate Limit Overrides
      description: 'List all rate limit overrides, optionally filtered by type.


        Query parameters:

        - override_type: ''org'' or ''user'' to filter results

        - limit: Maximum number of results (default: 100, max: 1000)'
      operationId: list_rate_limit_overrides_internal_rate_limits_overrides_get
      parameters:
      - name: override_type
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Filter by type: ''org'' or ''user''. If not provided, returns all overrides.'
          title: Override Type
        description: 'Filter by type: ''org'' or ''user''. If not provided, returns all overrides.'
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          description: Maximum number of results
          default: 100
          title: Limit
        description: Maximum number of results
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
          description: Internal API Key for authentication
          title: X-Api-Key
        description: Internal API Key for authentication
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RateLimitOverrideResponse'
                title: Response List Rate Limit Overrides Internal Rate Limits Overrides Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /internal/rate-limits/overrides/{identifier}:
    get:
      tags:
      - Internal
      summary: Get Rate Limit Override
      description: 'Get a rate limit override by identifier.


        Identifier format: ''org:'' or ''user:''


        Example: /internal/rate-limits/overrides/org:org_123'
      operationId: get_rate_limit_override_internal_rate_limits_overrides__identifier__get
      parameters:
      - name: identifier
        in: path
        required: true
        schema:
          type: string
          title: Identifier
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
          description: Internal API Key for authentication
          title: X-Api-Key
        description: Internal API Key for authentication
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitOverrideResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Internal
      summary: Update Rate Limit Override
      description: 'Update an existing rate limit override.


        Only the fields provided in the request will be updated.'
      operationId: update_rate_limit_override_internal_rate_limits_overrides__identifier__put
      parameters:
      - name: identifier
        in: path
        required: true
        schema:
          type: string
          title: Identifier
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
          description: Internal API Key for authentication
          title: X-Api-Key
        description: Internal API Key for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RateLimitOverrideUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitOverrideResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Internal
      summary: Delete Rate Limit Override
      description: 'Delete a rate limit override.


        After deletion, the org/user will fall back to default rate limits.'
      operationId: delete_rate_limit_override_internal_rate_limits_overrides__identifier__delete
      parameters:
      - name: identifier
        in: path
        required: true
        schema:
          type: string
          title: Identifier
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
          description: Internal API Key for authentication
          title: X-Api-Key
        description: Internal API Key for authentication
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /internal/rate-limits/overrides/{identifier}/invalidate-cache:
    post:
      tags:
      - Internal
      summary: Invalidate Rate Limit Override Cache
      description: 'Manually invalidate the cache for a specific rate limit override.


        Useful for debugging or forcing a cache refresh.'
      operationId: invalidate_rate_limit_override_cache_internal_rate_limits_overrides__identifier__invalidate_cache_post
      parameters:
      - name: identifier
        in: path
        required: true
        schema:
          type: string
          title: Identifier
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
          description: Internal API Key for authentication
          title: X-Api-Key
        description: Internal API Key for authentication
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RateLimitOverrideResponse:
      properties:
        identifier:
          type: string
          title: Identifier
        endpointLimits:
          $ref: '#/components/schemas/EndpointLimitsOverride'
        createdAt:
          type: string
          format: date-time
          title: Createdat
        createdBy:
          type: string
          title: Createdby
        updatedAt:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updatedat
        updatedBy:
          anyOf:
          - type: string
          - type: 'null'
          title: Updatedby
        note:
          type: string
          title: Note
          default: ''
      type: object
      required:
      - identifier
      - endpointLimits
      - createdAt
      - createdBy
      title: RateLimitOverrideResponse
      description: Response containing rate limit override information
    EndpointLimitsOverride:
      properties:
        generation:
          anyOf:
          - $ref: '#/components/schemas/EndpointRateLimitConfig'
          - type: 'null'
        status:
          anyOf:
          - $ref: '#/components/schemas/EndpointRateLimitConfig'
          - type: 'null'
        videoCaptionsSubmit:
          anyOf:
          - $ref: '#/components/schemas/EndpointRateLimitConfig'
          - type: 'null'
        metaTextOverlaySubmit:
          anyOf:
          - $ref: '#/components/schemas/EndpointRateLimitConfig'
          - type: 'null'
        metaTextOverlayPoll:
          anyOf:
          - $ref: '#/components/schemas/EndpointRateLimitConfig'
          - type: 'null'
        v2Create:
          anyOf:
          - $ref: '#/components/schemas/EndpointRateLimitConfig'
          - type: 'null'
        v2Status:
          anyOf:
          - $ref: '#/components/schemas/EndpointRateLimitConfig'
          - type: 'null'
        catalog:
          anyOf:
          - $ref: '#/components/schemas/EndpointRateLimitConfig'
          - type: 'null'
      type: object
      title: EndpointLimitsOverride
      description: Rate limit overrides for specific endpoints
    RetentionPurgeResponse:
      properties:
        state:
          type: string
          title: State
        deletedMorcRecords:
          type: integer
          title: Deletedmorcrecords
          default: 0
        deletedGatewayRecords:
          type: integer
          title: Deletedgatewayrecords
          default: 0
        deletedBridgeRecords:
          type: integer
          title: Deletedbridgerecords
          default: 0
      type: object
      required:
      - state
      title: RetentionPurgeResponse
    ApiKeyInfo:
      properties:
        key_id:
          type: string
          title: Key Id
        name:
          type: string
          title: Name
        created_at:
          type: string
          format: date-time
          title: Created At
        last_used_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Used At
        key_prefix:
          type: string
          title: Key Prefix
        key_suffix:
          type: string
          title: Key Suffix
      type: object
      required:
      - key_id
      - name
      - created_at
      - last_used_at
      - key_prefix
      - key_suffix
      title: ApiKeyInfo
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    EndpointRateLimitConfig:
      properties:
        max_tokens:
          type: integer
          title: Max Tokens
        refill_rate_per_second:
          type: number
          title: Refill Rate Per Second
      type: object
      required:
      - max_tokens
      - refill_rate_per_second
      title: EndpointRateLimitConfig
      description: Rate limit configuration for a specific endpoint
    CreateApiKeyResponse:
      properties:
        api_key:
          type: string
          title: Api Key
          description: The newly created API key (show only once)
        key_id:
          type: string
          title: Key Id
          description: The key ID for management purposes
      type: object
      required:
      - api_key
      - key_id
      title: CreateApiKeyResponse
    CreateApiKeyRequest:
      properties:
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
          description: Optional friendly name for the key
      type: object
      title: CreateApiKeyRequest
    MirageApiRetentionTaskKind:
      type: string
      enum:
      - success
      - terminal
      - watchdog
      title: MirageApiRetentionTaskKind
    RateLimitOverrideUpdateRequest:
      properties:
        endpointLimits:
          anyOf:
          - $ref: '#/components/schemas/EndpointLimitsOverride'
          - type: 'null'
        note:
          anyOf:
          - type: string
          - type: 'null'
          title: Note
      type: object
      title: RateLimitOverrideUpdateRequest
      description: Request to update a rate limit override
    RateLimitOverrideCreateRequest:
      properties:
        identifier:
          type: string
          title: Identifier
          description: Identifier in format 'org:<id>' or 'user:<id>'
          examples:
          - org:org_123
          - user:user_456
        endpointLimits:
          $ref: '#/components/schemas/EndpointLimitsOverride'
          description: Rate limit overrides per endpoint
        note:
          type: string
          title: Note
          description: Optional note about why this override exists
          default: ''
      type: object
      required:
      - identifier
      - endpointLimits
      title: RateLimitOverrideCreateRequest
      description: Request to create a rate limit override
    RetentionPurgeRequest:
      properties:
        retentionId:
          type: string
          title: Retentionid
        kind:
          $ref: '#/components/schemas/MirageApiRetentionTaskKind'
          default: success
      type: object
      required:
      - retentionId
      title: RetentionPurgeRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
x-provenance:
  method: harvested
  publisher: Captions
  source: https://api.mirage.app/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)