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

# Add media

> Add a file to your library from an https link (`{url, name}`), or send up to 4 MB of raw bytes as `application/octet-stream` with `?name=`. Larger files go through [direct uploads](https://docs.vidjutsu.ai/guides/uploads). A video with sound also returns its sound as audio media.



## OpenAPI

````yaml /openapi/spec.json post /media
openapi: 3.1.0
info:
  title: VidJutsu Cloud API
  version: '2026-11-03'
  description: >-
    Video editing built for agents: upload takes, edit a timeline with history,
    and render it on cloud machines. The same operations are MCP tools at
    https://api.vidjutsu.ai/mcp.
servers:
  - url: https://api.vidjutsu.ai
security:
  - bearer: []
tags:
  - name: Sign-up and sign-in
  - name: Account
  - name: API keys
  - name: Billing
  - name: Media
  - name: Uploads
  - name: Projects
  - name: History
  - name: Shot list
  - name: Layouts
  - name: Audio
  - name: Look and check
  - name: Motion graphics
  - name: Live updates
  - name: Comments
  - name: Renders
  - name: Publishing
  - name: Status
paths:
  /media:
    post:
      tags:
        - Media
      summary: Add media
      description: >-
        Add a file to your library from an https link (`{url, name}`), or send
        up to 4 MB of raw bytes as `application/octet-stream` with `?name=`.
        Larger files go through [direct
        uploads](https://docs.vidjutsu.ai/guides/uploads). A video with sound
        also returns its sound as audio media.
      operationId: ingest
      parameters:
        - description: >-
            With a file body: its file name, which names the media (`take1.mov`
            is media `take1`).
          in: query
          name: name
          required: false
          schema:
            type: string
        - name: VidJutsu-Version
          in: header
          required: false
          description: >-
            The API version you wrote your integration against, a date. Without
            it you get the latest version. The current version is `2026-11-03`.
            See https://docs.vidjutsu.ai/api-reference/introduction#versioning.
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            example: '2026-11-03'
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Makes a write safe to retry: the same key returns the first result
            instead of doing the work twice. Up to 128 printable characters.
          schema:
            type: string
            maxLength: 128
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestUrl'
          application/octet-stream:
            schema:
              contentEncoding: binary
              type: string
        description: >-
          An https link (`{url, name}`), or up to 4 MB of raw bytes
          (`application/octet-stream`, named by `?name=`).
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ingested'
          description: The stored media
        '401':
          description: No API key or token, or it isn't valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            Not signed up yet (`no_plan`, with `checkout_url`), or your wallet
            doesn't cover this or is below zero (`insufficient_credits` or
            `payment_failed`, with `top_up_url`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: A limit was reached (`plan_limit`, with `reason` and `contact_url`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Too many renders at once, or too many requests. Retry after
            `retry_after_seconds`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: >-
            Any other error: 400 invalid_request, 404 not_found, 409 conflict,
            413 payload_too_large, 502 upstream_error, 503 service_unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    IngestUrl:
      additionalProperties: false
      description: An https link to add to your library.
      properties:
        name:
          default: null
          description: 'File name for the media id; default: the link''s last path part.'
          type:
            - string
            - 'null'
        url:
          description: An `https://` link the server downloads (a presigned link works).
          type: string
        source:
          type: object
          additionalProperties: true
          description: >-
            Where the file came from, for example `{"type": "hyperframes",
            "project": "intro", "version": 3}`. `files` shows it, so an agent
            knows what to edit to change the file.
        project:
          type: string
          description: The project this file is for. Its open editors show the progress.
      required:
        - url
      type: object
    Ingested:
      additionalProperties: false
      properties:
        audio:
          anyOf:
            - $ref: '#/components/schemas/MediaObject'
            - type: 'null'
          description: A video's sound, as audio media.
        bytes:
          type: integer
        conform_at_render:
          description: >-
            Whether the parts of this video a render uses are converted at
            render time (it is stored as uploaded).
          type: boolean
        converted:
          description: >-
            Whether the file was converted before storing (a still image becomes
            PNG).
          type: boolean
        media:
          $ref: '#/components/schemas/MediaObject'
        name:
          type: string
        note:
          type: string
      required:
        - name
        - converted
        - conform_at_render
        - note
        - bytes
        - media
        - audio
      type: object
    Error:
      type: object
      description: >-
        Every error has a stable `code` and a `message`. Billing and limit
        errors add the fields that tell you how to fix them. See
        https://docs.vidjutsu.ai/errors.
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
          enum:
            - unauthenticated
            - forbidden
            - no_account
            - payment_required
            - upgrade_required
            - plan_limit
            - rate_limited
            - not_found
            - invalid_request
            - conflict
            - payload_too_large
            - upstream_error
            - service_unavailable
          description: Stable error code.
        message:
          type: string
          description: What went wrong, in plain words.
        reason:
          type: string
          description: >-
            Finer cause, for example `no_plan`, `insufficient_credits`,
            `payment_failed`, `spend_limit`, `stale_head`.
        checkout_url:
          type: string
          description: >-
            402 `no_plan`: a Stripe Checkout link to add a card and make your
            first payment.
        top_up_url:
          type: string
          description: >-
            402 `insufficient_credits` or `payment_failed`: a Stripe link to add
            credits to your wallet.
        upgrade_url:
          type: string
          description: >-
            402 `upgrade_required`: a link to move to a plan that has the
            feature.
        media_deletes_at:
          type: string
          format: date-time
          description: >-
            402 `payment_failed` (wallet below zero): when your stored media
            will be deleted unless you top up.
        contact_url:
          type: string
          description: '403 plan_limit: where to ask about Enterprise.'
        retry_after_seconds:
          type: integer
          description: '429: when to try again (also sent as a Retry-After header).'
        latest_version:
          type: string
          description: '400 unknown_version: the newest API version.'
        request_id:
          type: string
          description: >-
            Your Idempotency-Key, or a generated id. Quote it when you contact
            support.
    MediaObject:
      additionalProperties: false
      properties:
        asset_hash:
          type: string
        duration:
          additionalProperties: false
          properties:
            rate:
              type: integer
            ticks:
              type: integer
          required:
            - ticks
            - rate
          type: object
        id:
          type: string
        kind:
          enum:
            - video
            - audio
            - image
        lineage:
          items:
            type: string
          type: array
      required:
        - id
        - asset_hash
        - duration
        - kind
        - lineage
      type: object
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A VidJutsu API key (`vj_live_...`) from POST /auth/verify or POST /keys,
        or an OAuth access token (MCP clients).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.