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

# Export a 3D motion

> Only meaningful for a motion created with `type` `glb` or
`all`, or generated from text via `POST /v1/motions` with
`application/json`; a `render`-only motion has nothing to export.
`download_type` selects the file format — `glb` or `fbx` — and each
request resolves all three rig variants for that format at once
(`mixamo_url`, `metahuman_url`, `metahuman_body_url`); all three
rigs, in both formats, are generated up front from the same pass,
so switching `download_type` never triggers new work.
Replaces the old `GET /v1/animations/{animation_id}`.

An export is visible only to the API key that created the motion;
other keys get `404 MOTION_NOT_FOUND`. Once the export files are
deleted, this answers `404 RESULT_EXPIRED`.




## OpenAPI

````yaml /openapi.yaml get /v1/motions/{motion_id}/export
openapi: 3.0.3
info:
  title: Viggle API
  description: >
    The Viggle API generates AI video (Viggle H3, Viggle Remake, Video

    Remix), images (Viggle Image), 2x video upscaling (FlashVSR), and JST-2

    3D characters, motions, and scenes. Every job is asynchronous: create it,

    then poll (or, for renders, watch) until it reaches a terminal status.


    Base URL: `https://apis.viggle.ai`. Authenticate every request with

    `Authorization: Bearer <API key>`. Usage is billed in credits

    (1 credit = $0.01). Guides and pricing:
    https://docs.viggle.ai/v1/introduction
  version: 2.0.0
  contact:
    name: Viggle Support
    url: https://viggle.ai
servers:
  - url: https://apis.viggle.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Renders
    description: >-
      Video Remix (JST-1). Prepare inputs, create renders, watch progress,
      cancel, and download results. Read render status through `GET
      /v1/videos/{video_id}`.
  - name: Credits
    description: Read the credit balance available to the calling API key.
  - name: Characters
    description: |
      Create, list, inspect, and delete reusable character assets. `type`
      selects whether creation also extracts a 3D vsplat; export its
      download URL separately once ready.
  - name: Motions
    description: |
      Create, list, inspect, and delete reusable motion assets, and import one
      from an official motion template. `type` selects whether creation also
      extracts or generates a 3D animation; export its download URL
      separately once ready.
  - name: Videos
    description: |
      Generate a Viggle H3 video from text, frames, or references (`vid_`
      prefix) or a Viggle Remake video from a driving video and character
      images (`anim_` prefix), upscale a video 2x with FlashVSR (`vsr_`
      prefix), and read the unified view over every video the calling API
      key created — H3 generations, Remake generations, and Video Remix
      renders (`render_` prefix) — merged into one resource.
  - name: Images
    description: |
      Viggle Image — generate 1–6 PNG images from a text prompt,
      optionally guided by up to 8 reference images
      (`img_` prefix), and retrieve them by ID.
  - name: Scenes
    description: |
      Scene model — build a 3D Gaussian-splat scene (`.spz`) from a text
      prompt or a 360° panorama, generate new posed views of it, and
      reconstruct it from those views. Every operation is an asynchronous
      task (`scn_` prefix) read back by ID. Every run costs 1 credit per
      view, and a panorama counts as 6 views. Credits are refunded in full
      unless the task finishes `ready`.
paths:
  /v1/motions/{motion_id}/export:
    parameters:
      - $ref: '#/components/parameters/MotionId'
      - $ref: '#/components/parameters/RequestId'
    get:
      tags:
        - Motions
      summary: Export a 3D motion
      description: |
        Only meaningful for a motion created with `type` `glb` or
        `all`, or generated from text via `POST /v1/motions` with
        `application/json`; a `render`-only motion has nothing to export.
        `download_type` selects the file format — `glb` or `fbx` — and each
        request resolves all three rig variants for that format at once
        (`mixamo_url`, `metahuman_url`, `metahuman_body_url`); all three
        rigs, in both formats, are generated up front from the same pass,
        so switching `download_type` never triggers new work.
        Replaces the old `GET /v1/animations/{animation_id}`.

        An export is visible only to the API key that created the motion;
        other keys get `404 MOTION_NOT_FOUND`. Once the export files are
        deleted, this answers `404 RESULT_EXPIRED`.
      operationId: exportMotion
      parameters:
        - name: download_type
          in: query
          required: false
          description: >-
            Selects the pre-generated file format to return as signed URLs:
            `glb` or `fbx`. All three rig variants (`mixamo_url`,
            `metahuman_url`, `metahuman_body_url`) for that format come back
            together.
          schema:
            type: string
            enum:
              - glb
              - fbx
      responses:
        '200':
          description: Current animation export state.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionExport'
        '400':
          $ref: '#/components/responses/ResourceBadRequest'
        '401':
          $ref: '#/components/responses/ResourceUnauthorized'
        '404':
          $ref: '#/components/responses/ResourceNotFound'
        '500':
          $ref: '#/components/responses/ResourceInternalServerError'
        '503':
          $ref: '#/components/responses/ResourceServiceUnavailable'
components:
  parameters:
    MotionId:
      name: motion_id
      in: path
      required: true
      description: >-
        Public Motion ID returned by motion creation or listing. It normally
        begins with `mot_` and must identify a Motion owned by the caller.
      schema:
        type: string
        minLength: 1
      example: mot_7d2e9f1a-3c5b-4e8d-9f0a-1b2c3d4e5f60
    RequestId:
      name: X-Request-Id
      in: header
      required: false
      description: >-
        Optional caller-supplied correlation ID, echoed as sent in the response
        header. Omit it and the service generates one. Use it for tracing and
        support.
      schema:
        type: string
        minLength: 1
  headers:
    RequestId:
      description: Stable request identifier for support and tracing.
      schema:
        type: string
  schemas:
    MotionExport:
      description: |
        A motion's 3D animation extraction (video source) or generation
        (text source), for download. `download_type` selects the file
        format — `glb` or `fbx` — not a skeleton; each request resolves all
        three rig variants for that format at once (`mixamo_url`,
        `metahuman_url`, `metahuman_body_url`). All three rigs, in both
        formats, are generated up front from the same underlying pass, so
        switching `download_type` never triggers new work or a wait. The
        three URL fields are always present in the response — a rig that
        isn't ready yet simply stays null rather than being omitted or
        erroring. Download URLs are signed for 1 hour and re-signed on
        every read. Formerly `AnimationResource`, returned by the now-removed
        `GET /v1/animations/{animation_id}`.
      type: object
      additionalProperties: false
      required:
        - id
        - status
        - download_type
        - mixamo_url
        - metahuman_url
        - metahuman_body_url
        - mp4_url
        - thumbnail_url
        - created_at
        - updated_at
        - error
      properties:
        id:
          type: string
          description: ID of the Motion whose 3D animation export is represented.
          minLength: 1
        status:
          description: >-
            Current lifecycle of the 3D animation extraction or generation.
            Download only when this is `ready` and the relevant rig URL is
            populated.
          allOf:
            - $ref: '#/components/schemas/ResourceStatus'
        download_type:
          description: >-
            Echoes the requested `download_type` — the file format shared by
            `mixamo_url`/`metahuman_url`/`metahuman_body_url` below.
          type: string
          nullable: true
          enum:
            - glb
            - fbx
            - null
        mixamo_url:
          type: string
          description: >-
            Signed URL (valid for 1 hour) for the Mixamo rig in the requested
            `download_type` format, once ready; otherwise null. Always present,
            regardless of which format (or none) was requested.
          nullable: true
        metahuman_url:
          type: string
          description: >-
            Signed URL (valid for 1 hour) for the 441-joint MetaHuman rig (full
            facial) in the requested `download_type` format, once ready;
            otherwise null. Always present.
          nullable: true
        metahuman_body_url:
          type: string
          description: >-
            Signed URL (valid for 1 hour) for the 86-joint body-only MetaHuman
            rig in the requested `download_type` format, once ready; otherwise
            null. Always present.
          nullable: true
        mp4_url:
          type: string
          description: >-
            Signed URL (valid for 1 hour) for an MP4 preview of the Mixamo
            animation, present once `status` is `ready` when the Motion was
            created with `render_mp4=true`; otherwise null. Returned whatever
            `download_type` you request.
          nullable: true
        thumbnail_url:
          description: >-
            Reserved for response-shape compatibility and always null because
            Motion animation exports do not generate thumbnails.
          type: string
          nullable: true
        created_at:
          description: >-
            ISO 8601 timestamp with a UTC offset. May be an empty string on a
            task that has not recorded one.
          type: string
          nullable: true
        updated_at:
          type: string
          description: >-
            ISO 8601 timestamp with a UTC offset for the latest 3D animation
            state update; null if unavailable.
          nullable: true
        error:
          type: object
          description: >-
            Structured extraction or generation failure when `status` is
            `failed`; otherwise null.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ResourceError'
    ResourceStatus:
      description: |
        The public lifecycle shared by every asynchronous resource. It carries
        the same values as `RenderStatus`.
      type: string
      enum:
        - queued
        - processing
        - ready
        - failed
        - cancelled
    ResourceError:
      description: |
        The failure attached to a character or motion export. `code` is
        Viggle's raw internal task code, not one of the public `ErrorCode`
        values: treat it as opaque. There is no `retryable` flag; treat the
        failure as not retryable and contact support with the asset ID.
      type: object
      additionalProperties: false
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
          description: >-
            Internal failure code of the extraction, opaque. The vocabulary is
            open.
          minLength: 1
        message:
          type: string
          description: Human-readable explanation of the extraction failure.
        request_id:
          type: string
          description: >-
            ID of the export request that returned this error (it changes on
            every read), not of the request that created the asset; null when
            unavailable.
          nullable: true
    ResourceErrorResponse:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          description: >-
            Error payload containing the stable code, message, retry guidance,
            correlation ID, and error-specific details.
          allOf:
            - $ref: '#/components/schemas/ErrorBody'
    ErrorBody:
      type: object
      additionalProperties: false
      required:
        - code
        - message
        - retryable
        - request_id
        - details
        - remediation
      properties:
        code:
          description: >-
            Stable, machine-readable error code. Use it for programmatic
            handling instead of parsing `message`.
          allOf:
            - $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: >-
            Human-readable explanation suitable for logs or presentation to a
            developer.
        retryable:
          type: boolean
          description: >-
            Whether retrying the operation without changing its input may
            succeed. True for HTTP 408, 429, and 5xx responses.
        request_id:
          type: string
          description: >-
            Correlation identifier for tracing and support. Include it when
            reporting the failure.
        details:
          type: object
          description: Error-specific structured context; available keys depend on `code`.
          additionalProperties: true
        remediation:
          description: Suggested recovery action and optional retry delay.
          allOf:
            - $ref: '#/components/schemas/ErrorRemediation'
    ErrorCode:
      description: |
        Error codes the API emits, in the synchronous error envelope and in
        the `error` object of a failed job. Clients should tolerate codes not
        listed here. Asynchronous failures that have no public mapping
        surface as `PROCESSING_FAILED`.
      type: string
      enum:
        - INVALID_REQUEST
        - UNAUTHENTICATED
        - INVALID_CREDENTIAL
        - INSUFFICIENT_CREDITS
        - RENDER_NOT_FOUND
        - CHARACTER_NOT_FOUND
        - MOTION_NOT_FOUND
        - DRAFT_NOT_FOUND
        - NOT_FOUND
        - RESULT_EXPIRED
        - IDEMPOTENCY_KEY_REUSED
        - ID_ALREADY_EXISTS
        - UPLOAD_TIMEOUT
        - CONTENT_POLICY_VIOLATION
        - RATE_LIMITED
        - SERVICE_BUSY
        - INTERNAL_ERROR
        - IMAGE_REQUIRED
        - MOTION_VIDEO_REQUIRED
        - UNSUPPORTED_MEDIA
        - VIDEO_TOO_LONG
        - VIDEO_TOO_LARGE
        - VIDEO_RESOLUTION_TOO_HIGH
        - VIDEO_UNREADABLE
        - VIDEO_DIMENSIONS_MUST_BE_EVEN
        - VIDEO_INACCESSIBLE
        - NO_HUMANS_DETECTED
        - MOTION_NOT_READY
        - MOTION_MODEL_MISMATCH
        - INVALID_BACKGROUND_MODE
        - ALL_WORKERS_BUSY
        - WORKER_STOPPED
        - TASK_FAILED
        - PROCESSING_FAILED
    ErrorRemediation:
      type: object
      additionalProperties: false
      required:
        - action
        - retry_after_ms
      properties:
        action:
          type: string
          enum:
            - none
            - retry
          description: >-
            Suggested next action. Synchronous errors always carry `none`; a
            failed job's `error` carries `retry` when the failure is retryable.
        retry_after_ms:
          type: integer
          description: >-
            Recommended delay in milliseconds before retrying; null when no
            timed retry is advised.
          nullable: true
          format: int64
          minimum: 0
  responses:
    ResourceBadRequest:
      description: |
        Invalid request. The resource operations answer every request-shape
        rejection with `400`; they never answer `422`.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceErrorResponse'
    ResourceUnauthorized:
      description: Missing or invalid API key. Code `UNAUTHENTICATED`.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceErrorResponse'
    ResourceNotFound:
      description: |
        The resource does not exist, or it is not visible to the caller (a
        2D asset of another account, or a 3D-only asset or export created by
        another API key). The cases are deliberately indistinguishable. Codes
        `CHARACTER_NOT_FOUND`, `MOTION_NOT_FOUND`, or `RENDER_NOT_FOUND`;
        an export whose files were deleted answers `RESULT_EXPIRED`.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceErrorResponse'
    ResourceInternalServerError:
      description: Unexpected server error.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceErrorResponse'
    ResourceServiceUnavailable:
      description: Service temporarily unavailable.
      headers:
        Retry-After:
          schema:
            type: integer
            minimum: 0
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: |
        Send your API key as `Authorization: Bearer <API key>`. Keys begin
        with `sk-`. A missing or invalid key answers `401 UNAUTHENTICATED`.
        Never expose an API key in browser code.

````

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