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

# Fetch embed



## OpenAPI

````yaml /openapi.yaml get /v1/videos/{id}/embed
openapi: 3.1.0
info:
  title: VTurb API
  version: v1
  description: |
    Public REST API for VTurb. Dev-first and agents-first: every documented
    response is recorded from the API's real behavior.
  contact:
    name: VTurb API
    url: https://vturb.com
servers:
  - url: https://api.vturb.com
security:
  - bearerAuth: []
paths:
  /v1/videos/{id}/embed:
    get:
      tags:
        - Videos
      summary: Fetch embed
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          example: 652f2b1e8f1b2c3d4e5f6a7b
        - name: type
          in: query
          required: true
          schema:
            type: string
            enum:
              - js
              - iframe
              - lesson
          example: js
          description: >-
            Which snippet to render. `lesson` requires the lesson-embed feature
            on the account.
      responses:
        '200':
          description: The ready-to-paste iframe embed, with its preload links.
          content:
            application/json:
              schema:
                type: object
                properties:
                  embed:
                    type: string
                  metatags:
                    type: string
                required:
                  - embed
                  - metatags
              example:
                embed: >-
                  <script type="text/javascript"> var
                  s=document.createElement("script");
                  s.src="https://scripts.converteai.net/lib/js/smartplayer-wc/v4/sdk.js",
                  s.async=!0,document.head.appendChild(s); </script> <div
                  id="ifr_652f2b1e8f1b2c3d4e5f6a7b_wrapper" style="margin: 0
                  auto; width: 100%; "> <div style="position: relative; padding:
                  56.25% 0 0 0;" id="ifr_652f2b1e8f1b2c3d4e5f6a7b_aspect">
                  <iframe frameborder="0" allowfullscreen src="about:blank"
                  id="ifr_652f2b1e8f1b2c3d4e5f6a7b" style="position: absolute;
                  top: 0; left: 0; width: 100%; height: 100%;"
                  referrerpolicy="origin"
                  onload="this.onload=null,this.src='https://scripts.converteai.net/org_123/players/652f2b1e8f1b2c3d4e5f6a7b/v4/embed.html'+(location.search||'?')+'&vl='+encodeURIComponent(location.href)"></iframe>
                  </div> </div>
                metatags: >-
                  <link rel="preload"
                  href="https://scripts.converteai.net/org_123/players/652f2b1e8f1b2c3d4e5f6a7b/v4/embed.html">

                  <script>!function(i,n){i._plt=i._plt||(n&&n.timeOrigin?n.timeOrigin+n.now():Date.now())}(window,performance);</script>

                  <link rel="preload"
                  href="https://scripts.converteai.net/org_123/players/652f2b1e8f1b2c3d4e5f6a7b/v4/player.js"
                  as="script">

                  <link rel="preload"
                  href="https://scripts.converteai.net/lib/js/smartplayer-wc/v4/smartplayer.js"
                  as="script">

                  <link rel="preload"
                  href="https://cdn.converteai.net/org_123/507f191e810c19729de860ea/main.m3u8"
                  as="fetch">

                  <link rel="dns-prefetch" href="https://cdn.converteai.net">

                  <link rel="dns-prefetch"
                  href="https://scripts.converteai.net">

                  <link rel="dns-prefetch" href="https://images.converteai.net">

                  <link rel="dns-prefetch" href="https://license.vturb.com">
        '401':
          description: Missing API credential.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  request_id:
                    type: string
                required:
                  - type
                  - code
                  - message
                  - request_id
              example:
                type: https://docs.vturb.com/errors/unauthorized
                code: unauthorized
                message: >-
                  Missing or invalid API credential. Send a vt_ token in the
                  Authorization header.
                request_id: 00000000-0000-0000-0000-000000000000
        '403':
          description: The credential is missing the videos:read scope.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  request_id:
                    type: string
                required:
                  - type
                  - code
                  - message
                  - request_id
              example:
                type: https://docs.vturb.com/errors/forbidden
                code: forbidden
                message: The credential is missing the scope this action requires.
                request_id: 00000000-0000-0000-0000-000000000000
        '404':
          description: No video matches that id for the authenticated caller.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  request_id:
                    type: string
                required:
                  - type
                  - code
                  - message
                  - request_id
              example:
                type: https://docs.vturb.com/errors/not_found
                code: not_found
                message: Resource not found.
                request_id: 00000000-0000-0000-0000-000000000000
        '422':
          description: The type must be one of js or iframe.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  request_id:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                      required:
                        - field
                        - message
                required:
                  - type
                  - code
                  - message
                  - request_id
                  - errors
              example:
                type: https://docs.vturb.com/errors/unprocessable_content
                code: unprocessable_content
                message: The request is invalid. See errors for the fields that failed.
                request_id: 00000000-0000-0000-0000-000000000000
                errors:
                  - field: type
                    message: is not included in the list
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Paste your VTurb API token (vt_...). Sent as `Authorization: Bearer
        <token>`.

````