Skip to article

MCP quickstart

Connect an Agent and complete a generation workflow.

Connect an Agent

Create a key in your account's API & MCP settings, set SPRITEFLOW_API_KEY in the environment that launches your client and follow the dedicated client configuration. The endpoint is https://spriteflow.io/api/mcp and uses stateless HTTP JSON.

Use the settings connection check to test authentication and tool discovery without spending credits. A successful discovery check does not prove a paid generation or client workflow has completed.

Run a complete task

Try this instruction in a connected client:

Discover Sprite Flow's available operations. Estimate the cost of a 1k full-body pixel ranger and a Pro walking animation. Explain the cost before generation. Generate the character once, poll it to a terminal state, reuse its ready asset in the animation, then retrieve the download URL. Preserve each idempotency key when recovering any lost response.

The expected sequence is get_capabilities → estimate_cost → generate_character → get_task → generate_sprite_motion → get_task → get_download_url. Read the relevant business article before selecting detailed parameters.

Understand tool results

Tools return structured results in structuredContent, with a JSON text copy for compatible clients. A generation call returns a business task ID immediately; it does not wait for the media. Call get_task until terminal is true. This workflow does not require experimental MCP Tasks or an SSE connection.

Reuse files and recover batches

Use search_assets for existing ready files. Upload a new image with create_upload_url, PUT the bytes, then call confirm_upload. For batches, inspect individual items and preserve successful files. Explain failures before creating an intentional retry with a fresh key; never resubmit an unknown paid request with a new key.

Permissions and next steps

Every call authenticates the key owner and checks the required scopes and asset ownership. Generation uses that account's credits. Tool annotations help the client plan actions but do not grant permission. See Authentication, Task lifecycle and Errors.