> ## Documentation Index
> Fetch the complete documentation index at: https://cinepro-changelog-2026-05-21.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Proxy upstream provider requests

> Forwards requests to upstream streaming providers while handling headers and authentication.

**Data Parameter Format:**
The `data` parameter must be a [encodeURIComponent()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) encoded JSON object:
```json
{
  "url": "https://upstream-provider.com/stream.m3u8",
  "headers": {
    "Referer": "https://provider.com",
    "User-Agent": "Mozilla/5.0",
    "more": "headers..."
  }
}
```
The frontend does not have to care about these data objects, since the url fields from the backend response should automatically do that already.

**Content-Type Handling:**
You will get that content type back, which you would, if you were requesting the url directly. 

**Caching:**
- Subtitles: Cache subtitles up to 24 hours
- DO NOT cache proxy responses (pass through caching headers from upstream)




## OpenAPI

````yaml get /v1/proxy
openapi: 3.0.0
info:
  title: Open Media Streaming Specification (OMSS)
  description: >
    A standardized REST API specification for streaming backends to expose
    movies, TV episodes, 

    sources, and subtitles. OMSS enables interoperability between streaming
    backends and frontends.


    **Key Features:**

    - Standardized endpoints for movies and TV episodes

    - Proxy-based source delivery with header support

    - Multi-language and multi-quality source support

    - Subtitle support with multiple formats

    - Diagnostic reporting for partial scrapes

    - Caching optimization recommendations

    - HTTPS-enforced security


    **Reference Implementation:** https://github.com/omss-spec/omss-spec
  version: 1.0.0
  license:
    name: MIT License
    url: https://github.com/omss-spec/omss-spec/blob/main/LICENSE
  contact:
    name: OMSS Community
    url: https://github.com/omss-spec/omss-spec
servers:
  - url: https://api.example.com
    description: Production server (HTTPS required)
    variables:
      version:
        default: v1
        enum:
          - v1
  - url: http://localhost:3000
    description: Development server (localhost only)
security: []
tags:
  - name: Content
    description: Retrieve sources for movies and TV shows
  - name: Proxy
    description: Proxy endpoint to play content by upstream providers
  - name: Health
    description: Health and version information. All endpoints return the same object.
  - name: Refresh
    description: Refresh cached sources
paths:
  /v1/proxy:
    get:
      tags:
        - Proxy
      summary: Proxy upstream provider requests
      description: >
        Forwards requests to upstream streaming providers while handling headers
        and authentication.


        **Data Parameter Format:**

        The `data` parameter must be a
        [encodeURIComponent()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
        encoded JSON object:

        ```json

        {
          "url": "https://upstream-provider.com/stream.m3u8",
          "headers": {
            "Referer": "https://provider.com",
            "User-Agent": "Mozilla/5.0",
            "more": "headers..."
          }
        }

        ```

        The frontend does not have to care about these data objects, since the
        url fields from the backend response should automatically do that
        already.


        **Content-Type Handling:**

        You will get that content type back, which you would, if you were
        requesting the url directly. 


        **Caching:**

        - Subtitles: Cache subtitles up to 24 hours

        - DO NOT cache proxy responses (pass through caching headers from
        upstream)
      operationId: proxyRequest
      parameters:
        - name: data
          in: query
          required: true
          description: >
            [encodeURIComponent()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
            encoded JSON object containing `url` and optional `headers`.

            Example (decoded):
            `{"url":"https://example.com/stream.m3u8","headers":{"Referer":"https://provider.com"}}`
          schema:
            type: string
            pattern: ^[A-Za-z0-9_-]+$
          example: >-
            %7B%22url%22%3A%22https%3A%2F%2Fcdn.example.com%2Fstream.m3u8%22%2C%22headers%22%3A%7B%22Referer%22%3A%22https%3A%2F%2Fprovider.com%22%7D%7D
      responses:
        '200':
          description: Upstream response proxied successfully
          content:
            application/vnd.apple.mpegurl:
              schema:
                type: string
              example: |
                #EXTM3U
                #EXT-X-VERSION:3
                #EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920x1080
                /v1/proxy?data=%7B...%7D
            application/dash+xml:
              schema:
                type: string
            text/vtt:
              schema:
                type: string
            text/plain:
              schema:
                type: string
            video/mp4:
              schema:
                type: string
                format: binary
        '400':
          description: Invalid data parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Upstream URL not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Proxy error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - traceId
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
        traceId:
          type: string
          format: uuid
          description: Unique trace ID for error tracking and debugging
          example: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
    ErrorObject:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Machine-readable error code
          enum:
            - INVALID_TMDB_ID
            - INVALID_PARAMETER
            - MISSING_PARAMETER
            - INVALID_SEASON
            - INVALID_EPISODE
            - INVALID_RESPONSE_ID
            - RESPONSE_ID_NOT_FOUND
            - NO_SOURCES_AVAILABLE
            - ENDPOINT_NOT_FOUND
            - METHOD_NOT_ALLOWED
            - INTERNAL_ERROR
            - UNSUPPORTED_MEDIA_TYPE
          example: INVALID_TMDB_ID
        message:
          type: string
          description: Human-readable error message
          example: TMDB ID must be numeric
        details:
          type: object
          description: Additional error details (backend-specific, optional)
          example:
            parameter: id
            value: not-a-number
            expected: numeric string

````