Skip to article

Classic animation

Animate a character image into a short sprite sequence.

What you can create

Create a short sprite animation from one character image and an action prompt. Classic suits compact loops and controlled frame counts. Example: a full-body knight becomes an eight-frame idle sequence.

Prepare the character

Use a ready PNG, JPEG or WebP with one complete character, clear limbs and padding around the silhouette. Avoid contact sheets, text, cropped feet and a busy scene. Upload and confirm the source or reuse an image returned by Character design. Set inputAssetId; dimensions are read on the server.

Animate in the workspace

  1. Open Sprite Motion and select Classic.
  2. Choose the character image. Describe one action and its facing direction.
  3. Set a supported frame count and playback rate. Enable background removal if appropriate.
  4. Review the cost and save destination, then generate.
  5. Inspect the sequence for clipped limbs and frame consistency before downloading the available files.

Choices, limits and cost

Classic costs 5 credits per generation. The integration defaults to 8 frames at 8 FPS when omitted. Classic supports 4, 6, 8, 10, 12 or 16 frames. intelligentFrameCount requires enhancePrompt. The explicit loop option is reserved for standalone Pro generation; use an idle or walking prompt for a Classic cycle.

An existing character action can receive the result when characterId and a compatible action characterTarget are supplied. A design-sheet asset target is not an animation destination.

Parameters

These fields are generated from the same input Schema used by REST and MCP. Nested required fields apply when their parent object or selected variant is present. Business conditions described above are validated before submission.

FieldTypeRequiredDefault and limits
promptstringYesminLength: 1; maxLength: 1500
modestringNo"classic", "pro"; Default: "classic"
backgroundRemovalMethodstringNo"ai", "cpu"
loopbooleanNoDefault: false
motionDirectionstringNo"horizontal", "square", "vertical"
frameCountintegerNominimum: -9007199254740991; maximum: 9007199254740991; Classic supports the advertised frame options; Pro requires 32. Defaults to 8 for Classic or 32 for Pro.
intelligentFrameCountbooleanNoDefault: false
fpsintegerNoDefault: 8; minimum: 4; maximum: 12
originalWidthintegerNomaximum: 9007199254740991; Legacy hint; the service reads the asset dimensions.
originalHeightintegerNomaximum: 9007199254740991; Legacy hint; the service reads the asset dimensions.
removeBackgroundbooleanNoDefault: false
enhancePromptbooleanNoDefault: false
projectIdstringNominLength: 1; maxLength: 255
folderIdstring / nullNoSee the workflow requirements above.
characterIdstringNominLength: 1; maxLength: 255
characterTargetobject / objectNoSee the workflow requirements above.
inputAssetIdstringYesSee the workflow requirements above.

API example

This example costs 5 credits. A quote does not reserve balance or bypass subscription requirements. Set SPRITEFLOW_API_KEY in your shell. Replace the placeholder asset ID 00000000-0000-4000-8000-000000000001 with a ready asset you own when present. Use a new idempotency key for each intentional generation; keep it unchanged when retrying.

bash

# Use the same BASE_URL for credentials, uploads and generation.
BASE_URL="https://spriteflow.io"
IDEMPOTENCY_KEY="example-workflow-001"

cat > request.json <<'JSON'
{
  "operation": "generate_sprite_motion",
  "input": {
    "inputAssetId": "00000000-0000-4000-8000-000000000001",
    "mode": "classic",
    "prompt": "Walk in place, facing right"
  }
}
JSON

curl --fail-with-body "$BASE_URL/api/v1/estimates" \
  -H "Authorization: Bearer $SPRITEFLOW_API_KEY" \
  -H "Content-Type: application/json" --data-binary @request.json

curl --fail-with-body "$BASE_URL/api/v1/tasks" \
  -H "Authorization: Bearer $SPRITEFLOW_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" --data-binary @request.json

An accepted request returns HTTP 202, Location and Retry-After headers. Example response (IDs are illustrative):

json
{"taskId":"00000000-0000-4000-8000-000000000002","status":"accepted","statusUrl":"/api/v1/tasks/00000000-0000-4000-8000-000000000002","pollAfterSeconds":10,"replayed":false}

MCP example

Call estimate_cost with the same operation and input, then call generate_sprite_motion. The following is a tools/call params object:

json
{
  "name": "generate_sprite_motion",
  "arguments": {
    "input": {
      "inputAssetId": "00000000-0000-4000-8000-000000000001",
      "mode": "classic",
      "prompt": "Walk in place, facing right"
    },
    "idempotencyKey": "example-workflow-001"
  }
}

The tool returns the same task receipt in structuredContent and a JSON text result. Pass taskId to get_task. Tool annotations describe behavior; permissions are still checked on the server.

Completion, download and reuse

Poll the returned statusUrl after pollAfterSeconds. Continue while terminal is false. Read items for per-task results, progress for batch counts and assets for ready files. A batch can be partially_completed: use its successful assets and review each failed item before deciding whether to create a separate retry.

For each returned asset ID, call get_download_url or GET /api/v1/assets/{assetId}/download. Download the temporary URL before it expires. Image assets can be passed into a compatible operation as inputAssetId or a style reference. Do not pass provider task IDs, download URLs or local filesystem paths as asset IDs.

Failures and recovery

  • INVALID_PARAMETERS: fix the field errors before submitting. Check the business conditions and defaults above.
  • INPUT_ASSET_UNAVAILABLE: confirm the upload, check ownership and ensure the asset is ready and not trashed.
  • INSUFFICIENT_CREDITS: add credits before a new request; a cost estimate does not reserve them.
  • A timeout or lost response: resend the identical request with the original idempotency key. Never invent a new key just because the response was lost.
  • A terminal generation failure: inspect the item error and refund information. Refund handling uses the existing generation workflow. Do not assume an in-progress or unknown submission is safe to repeat.

Uploads · Tasks · Credits · Idempotency · Save destinations · Download and export