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

# Super Resolution task



## OpenAPI

````yaml /openapi.json post /v1/tasks/super-resolution
openapi: 3.1.0
info:
  title: Framelane API
  description: >
    Framelane renders video and runs AI media tasks from a single declarative
    request.


    ### Authentication

    Send your API key as a bearer token: `Authorization: Bearer fl_live_...`.


    ### Core workflow

    1. **Get media in.** Pass any publicly accessible URL directly, or `POST
    /v1/uploads` to
       get a signed URL, then `PUT` your file to it.
    2. **Submit one JSON payload.** `POST /v1/renders` composes a whole scene
    (canvas +
       `elements[]` + `transitions[]`) in a single request; `POST /v1/tasks/{type}` runs an AI
       operation (remove-background, gaze-redirect, super-resolution, transcribe).
    3. **Wait for completion.** Jobs are async: poll `GET
    /v1/{renders|tasks}/{id}` or register
       a webhook. Statuses end in `completed`, `failed`, or `cancelled`.
    4. **Fetch the result.** `GET /v1/{renders|tasks}/{id}/download` redirects
    to a short-lived
       signed URL for the output artifact.

    ### Discovering what's possible

    Call **`GET /v1/capabilities`** (no auth) for the machine-readable catalog
    of every effect,

    motion, transition, format, element type, and task parameter — each flagged
    with whether the

    renderer supports it, plus all numeric ranges and rate limits. Validate
    against it before

    submitting to avoid `422`s.


    ### Idempotency

    `POST` endpoints accept an `Idempotency-Key` header. The same key with the
    same body replays

    the original response (`200`); with a different body it returns `409
    Conflict`.


    ### Errors

    Every error has the shape `{"error": {"code", "message", "details"}}`. The
    machine-readable

    `code` (e.g. `source_not_found`, `quota_exceeded`, `codec_unsupported`) is
    stable — branch on

    it to self-correct.
  version: dev
servers:
  - url: https://api.framelane.io
    description: Production
security: []
tags:
  - name: capabilities
    description: Discover supported features, formats, and limits.
  - name: renders
    description: Compose and render video from a declarative timeline.
  - name: tasks
    description: >-
      Run AI media operations: background removal, gaze redirect,
      super-resolution, transcription.
  - name: uploads
    description: Get signed URLs to upload source media into Framelane storage.
  - name: webhooks
    description: Subscribe to job lifecycle events with signed delivery.
  - name: workspace
    description: Manage your workspace, usage, and assets.
  - name: api-keys
    description: Create and revoke API keys.
  - name: auth
    description: Session sync for the first-party console.
  - name: signup
    description: Create a workspace and verify email.
  - name: billing
    description: Manage your subscription and billing portal.
  - name: system
    description: Health, readiness, and version probes.
paths:
  /v1/tasks/super-resolution:
    post:
      tags:
        - tasks
      summary: Super Resolution task
      operationId: create_super_resolution
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Idempotency-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SuperResolutionBody'
      responses:
        '200':
          description: Idempotent replay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobOut'
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobOut'
        '401':
          description: Missing or invalid API key.
        '422':
          description: Validation error or unsupported feature.
        '429':
          description: Rate limit exceeded.
      security:
        - ApiKey: []
components:
  schemas:
    SuperResolutionBody:
      properties:
        metadata:
          additionalProperties:
            type: string
          type: object
          title: Metadata
          description: Arbitrary key-value pairs echoed back in all webhook payloads.
          example:
            project_id: proj_123
        webhook_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Webhook Url
          description: >-
            Per-request webhook URL. Overrides workspace-level webhooks for this
            job only. Receives task.completed, task.failed, and progress events.
          example: https://app.example.com/hooks/framelane
        source_url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Source Url
          description: Publicly accessible URL of the source image or video to upscale.
          example: https://cdn.example.com/low-res.jpg
        scale:
          type: number
          maximum: 4
          minimum: 1
          title: Scale
          description: Upscaling factor applied to width and height.
          default: 2
          example: 2
      type: object
      required:
        - source_url
      title: SuperResolutionBody
    JobOut:
      properties:
        id:
          type: string
          title: Id
          description: 'Unique job ID. Prefix indicates type: `render_` or `task_`.'
          example: render_01J8QR2K5VKDGN2T4FBM3CZYX7
        kind:
          $ref: '#/components/schemas/JobKind'
          description: Whether this is a `render` or a `task`.
          example: render
        task_type:
          anyOf:
            - $ref: '#/components/schemas/TaskType'
            - type: 'null'
          description: For `task` jobs only — the specific AI operation.
          example: transcribe
        workspace_id:
          type: string
          title: Workspace Id
          description: ID of the workspace that owns this job.
          example: ws_01J8QR2K5VKDGN2T4FBM3CZYX8
        status:
          $ref: '#/components/schemas/JobStatus'
          description: >-
            Current lifecycle state: `queued` → `processing` → `completed` /
            `failed` / `cancelled`.
          example: queued
        progress_percent:
          type: integer
          maximum: 100
          minimum: 0
          title: Progress Percent
          description: 0–100 progress indicator updated by the render engine.
          default: 0
          example: 0
        progress_stage:
          anyOf:
            - $ref: '#/components/schemas/ProgressStage'
            - type: 'null'
          description: Current processing phase within a job.
          example: compositing
        output:
          anyOf:
            - $ref: '#/components/schemas/JobOutput'
            - type: 'null'
          description: >-
            Populated once `status == completed`. Contains the signed artifact
            URL.
        error:
          anyOf:
            - $ref: '#/components/schemas/JobError'
            - type: 'null'
          description: Populated when `status == failed`. Contains a structured error code.
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: >-
            Caller-supplied key-value pairs echoed back on every webhook and
            response.
          example:
            project_id: proj_123
            user_ref: usr_abc
        created_at:
          type: string
          format: date-time
          title: Created At
          description: ISO-8601 UTC timestamp when the job was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: ISO-8601 UTC timestamp of the last status change.
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
          description: ISO-8601 UTC timestamp when the job reached a terminal state.
      type: object
      required:
        - id
        - kind
        - workspace_id
        - status
        - created_at
        - updated_at
      title: JobOut
      description: A render job or AI task.
    JobKind:
      type: string
      enum:
        - render
        - task
      title: JobKind
    TaskType:
      type: string
      enum:
        - remove_background
        - gaze_redirect
        - super_resolution
        - transcribe
      title: TaskType
      description: >-
        The 4 task types exposed by the public API.


        Renderer tasks (remove_background, gaze_redirect, super_resolution) are

        dispatched via the Redis broker; transcribe is dispatched via
        AssemblyAI.


        Values:

        - `remove_background` — AI background removal — outputs media with a
        transparent background.

        - `gaze_redirect` — AI gaze redirection — adjusts on-screen eyes to face
        the camera.

        - `super_resolution` — AI upscaling — increases resolution by a 1–4×
        factor.

        - `transcribe` — Speech-to-text transcription (via AssemblyAI) with
        optional analysis.
      x-enumDescriptions:
        remove_background: AI background removal — outputs media with a transparent background.
        gaze_redirect: AI gaze redirection — adjusts on-screen eyes to face the camera.
        super_resolution: AI upscaling — increases resolution by a 1–4× factor.
        transcribe: Speech-to-text transcription (via AssemblyAI) with optional analysis.
    JobStatus:
      type: string
      enum:
        - ingesting
        - queued
        - processing
        - completed
        - failed
        - cancelled
      title: JobStatus
      description: >-
        Values:

        - `ingesting` — External source files are being copied into Framelane
        storage.

        - `queued` — Accepted and waiting for a worker to pick it up.

        - `processing` — Actively rendering or processing.

        - `completed` — Finished successfully; the output artifact is available.

        - `failed` — Terminated with an error (see `error`).

        - `cancelled` — Cancelled by the caller before completion.
      x-enumDescriptions:
        ingesting: External source files are being copied into Framelane storage.
        queued: Accepted and waiting for a worker to pick it up.
        processing: Actively rendering or processing.
        completed: Finished successfully; the output artifact is available.
        failed: Terminated with an error (see `error`).
        cancelled: Cancelled by the caller before completion.
    ProgressStage:
      type: string
      enum:
        - downloading
        - compositing
        - encoding
        - uploading
      title: ProgressStage
      description: |-
        Values:
        - `downloading` — Fetching source media.
        - `compositing` — Compositing the scene on the GPU.
        - `encoding` — Encoding the output video.
        - `uploading` — Uploading the finished artifact to storage.
      x-enumDescriptions:
        downloading: Fetching source media.
        compositing: Compositing the scene on the GPU.
        encoding: Encoding the output video.
        uploading: Uploading the finished artifact to storage.
    JobOutput:
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: CDN URL to the completed artifact.
          example: https://cdn-user.framelane.io/render_01J.../output.mp4
        width:
          anyOf:
            - type: integer
            - type: 'null'
          title: Width
          description: Output video width in pixels.
          example: 1920
        height:
          anyOf:
            - type: integer
            - type: 'null'
          title: Height
          description: Output video height in pixels.
          example: 1080
        duration:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration
          description: Output duration in seconds.
          example: 15.3
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
          description: Artifact file size in bytes.
          example: 12582912
      type: object
      title: JobOutput
    JobError:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
          description: Machine-readable error code.
          example: invalid_source
        message:
          type: string
          title: Message
          description: Human-readable error description.
          example: Source URL returned 404.
      type: object
      required:
        - code
        - message
      title: JobError
    ErrorCode:
      type: string
      enum:
        - invalid_source
        - source_not_found
        - source_too_large
        - asset_not_ready
        - codec_unsupported
        - decode_failed
        - encode_failed
        - timeout
        - out_of_memory
        - gpu_error
        - upload_failed
        - provider_error
        - ingest_failed
        - internal
        - cancelled
      title: ErrorCode
      description: >-
        Structured error codes surfaced on Job.error_code.


        Values:

        - `invalid_source` — A source URL was malformed or inaccessible.

        - `source_not_found` — A source URL returned 404.

        - `source_too_large` — A source file exceeded the maximum allowed size.

        - `asset_not_ready` — A referenced asset was still ingesting when the
        job ran.

        - `codec_unsupported` — A source used a codec the renderer cannot
        decode.

        - `decode_failed` — A source file could not be decoded.

        - `encode_failed` — The output could not be encoded.

        - `timeout` — Processing exceeded the time limit.

        - `out_of_memory` — The renderer ran out of GPU memory.

        - `gpu_error` — A GPU hardware/driver error occurred.

        - `upload_failed` — The output artifact failed to upload to storage.

        - `provider_error` — An upstream provider (e.g. AssemblyAI) returned an
        error.

        - `ingest_failed` — Copying an external source into storage failed.

        - `internal` — An unexpected internal error occurred.

        - `cancelled` — The job was cancelled.
      x-enumDescriptions:
        invalid_source: A source URL was malformed or inaccessible.
        source_not_found: A source URL returned 404.
        source_too_large: A source file exceeded the maximum allowed size.
        asset_not_ready: A referenced asset was still ingesting when the job ran.
        codec_unsupported: A source used a codec the renderer cannot decode.
        decode_failed: A source file could not be decoded.
        encode_failed: The output could not be encoded.
        timeout: Processing exceeded the time limit.
        out_of_memory: The renderer ran out of GPU memory.
        gpu_error: A GPU hardware/driver error occurred.
        upload_failed: The output artifact failed to upload to storage.
        provider_error: An upstream provider (e.g. AssemblyAI) returned an error.
        ingest_failed: Copying an external source into storage failed.
        internal: An unexpected internal error occurred.
        cancelled: The job was cancelled.
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer

````