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

# Script an avatar-video render job

> Script a new async avatar-video render job for an existing, enabled avatar persona — merges `merge_fields` into `script_template` and persists the request as a pollable job. Does not call the provider render API directly; the tenant's render runtime performs the actual render and reports back via PATCH /api/v1/video/avatar-video-renders/{id}. Owner/admin/developer only; scoped on video:write.



## OpenAPI

````yaml /openapi.yaml post /api/v1/video/avatar-video-renders
openapi: 3.1.0
info:
  title: Devotel CPaaS API
  description: Orbit by Devotel — Communications Platform as a Service API
  version: 1.0.0
  contact:
    name: Devotel
    url: https://devotel.io
    email: support@devotel.io
  license:
    name: Proprietary
servers:
  - url: https://api.orbit.devotel.io
    description: Production
security:
  - Bearer: []
  - ApiKey: []
tags:
  - name: Messages
    description: >-
      Send and manage messages across all channels (SMS, WhatsApp, RCS, Email,
      Viber, etc.)
  - name: Fax
    description: >-
      List and track fax (MMS/T.38) transmissions on Telnyx-backed fax numbers
      (sending flows through the Messaging API)
  - name: Agents
    description: AI agent creation, configuration, and execution
  - name: Voice
    description: Voice calls, IVR, conferencing, and SIP trunking
  - name: OnCall
    description: On-call rotations and escalation policy planning for incident alerting
  - name: Webhooks
    description: Webhook endpoint management and delivery logs
  - name: Numbers
    description: Phone number search, provisioning, and configuration
  - name: Brand Identity
    description: >-
      Unified cross-channel brand trust posture (10DLC, toll-free, WhatsApp,
      RCS, branded calling, number KYC)
  - name: Contacts
    description: Contact management, segmentation, and lifecycle tracking
  - name: Campaigns
    description: Marketing campaign orchestration and analytics
  - name: Flows
    description: Automation flow builder and execution engine
  - name: Templates
    description: Message template management and approval workflows
  - name: Settings
    description: Organization, channel, and user preference settings
  - name: Verify
    description: OTP generation and verification across channels
  - name: Push
    description: Push notification delivery via FCM and APNs
  - name: Integrations
    description: Third-party service connections and OAuth management
  - name: CDP
    description: >-
      Customer Data Platform — activation surface (CRM object sync, streaming
      destinations, ad-audience activation)
  - name: Files
    description: >-
      Server-to-server media upload, listing, retrieval, and deletion
      (signed-URL backed)
  - name: Commerce
    description: >-
      Omnichannel conversational-commerce — persistent cart + checkout state
      machine, channel-agnostic hosted pay-by-link, native WhatsApp checkout,
      and AP2-style agent payment mandates.
  - name: Sync
    description: >-
      Real-time shared-state primitive (Twilio Sync parity) — Documents, Maps,
      Lists, and ephemeral Streams, with change events relayed over the
      /api/v1/ws/sync WebSocket gateway
paths:
  /api/v1/video/avatar-video-renders:
    post:
      tags:
        - Video
      summary: Script an avatar-video render job
      description: >-
        Script a new async avatar-video render job for an existing, enabled
        avatar persona — merges `merge_fields` into `script_template` and
        persists the request as a pollable job. Does not call the provider
        render API directly; the tenant's render runtime performs the actual
        render and reports back via PATCH
        /api/v1/video/avatar-video-renders/{id}. Owner/admin/developer only;
        scoped on video:write.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - avatar_agent_id
                - script_template
              properties:
                avatar_agent_id:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: >-
                    The vaa_-prefixed avatar persona to render from. Must be an
                    existing, enabled persona.
                script_template:
                  type: string
                  minLength: 1
                  maxLength: 5000
                  description: >-
                    The operator-authored script, with optional {{merge_field}}
                    tokens.
                locale:
                  type:
                    - string
                    - 'null'
                  maxLength: 35
                  description: >-
                    Optional BCP-47-ish locale override for TTS; falls back to
                    the persona's locale when omitted.
                merge_fields:
                  type: object
                  additionalProperties:
                    type: string
                    maxLength: 500
                  description: >-
                    Values for every {{token}} referenced by script_template. A
                    referenced token with no supplied value rejects the request.
      responses:
        '202':
          description: The scripted render job, queued for the render runtime.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      render:
                        $ref: '#/components/schemas/VideoAvatarVideoRender'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
        '400':
          description: >-
            A supplied field failed validation, an unresolved merge-field token,
            or the per-tenant render-job cap was reached.
        '404':
          description: No avatar persona with that avatar_agent_id exists in this tenant.
components:
  schemas:
    VideoAvatarVideoRender:
      type: object
      description: >-
        An async AI avatar video-message render job — the asynchronous
        counterpart to `VideoAvatarJoinPlan`. Scripts a persona's dialog (with
        `{{merge_field}}` tokens) into a pollable job that a render runtime
        turns into a rendered clip. Stored per tenant; no provider credentials
        are persisted, only a non-secret provider reference denormalized from
        the source persona.
      required:
        - id
        - persona_id
        - provider
        - script_template
        - merge_fields
        - rendered_script
        - locale
        - status
        - output_url
        - error
        - created_at
        - updated_at
        - completed_at
        - created_by
      additionalProperties: false
      properties:
        id:
          type: string
          description: The vavr_-prefixed render job id minted on creation.
        persona_id:
          type: string
          description: The avatar persona (vaa_-prefixed) this clip was rendered from.
        provider:
          type: string
          enum:
            - tavus
            - heygen
            - did
          description: Denormalized from the persona at creation time.
        script_template:
          type: string
          description: The operator-authored script, with {{merge_field}} tokens.
        merge_fields:
          type: object
          additionalProperties:
            type: string
          description: The merge-field values supplied at render time.
        rendered_script:
          type: string
          description: >-
            script_template with every token substituted — what the avatar
            speaks.
        locale:
          type:
            - string
            - 'null'
          description: >-
            Optional BCP-47-ish locale override for TTS; null falls back to the
            persona's.
        status:
          type: string
          enum:
            - queued
            - rendering
            - completed
            - failed
          description: Lifecycle state of the render job.
        output_url:
          type:
            - string
            - 'null'
          description: HTTPS URL of the rendered clip; set only once status is completed.
        error:
          type:
            - string
            - 'null'
          description: Human-readable failure reason; set only once status is failed.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            ISO 8601 timestamp the job reached a terminal state; null while in
            flight.
        created_by:
          type:
            - string
            - 'null'
          description: Platform user id of the creating operator; null for API-key callers.
    ResponseMeta:
      type: object
      required:
        - request_id
        - timestamp
      additionalProperties: false
      properties:
        request_id:
          type: string
          description: Unique request identifier (also returned as X-Request-Id header)
        timestamp:
          type: string
          format: date-time
        docs_url:
          type: string
          format: uri
          nullable: true
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Dashboard JWT token from Clerk
    ApiKey:
      type: apiKey
      name: X-API-Key
      in: header
      description: Server-to-server API key (dv_live_sk_*)

````