Skip to article

Game props

Generate a coordinated grid of game props.

What you can create

Generate coordinated equipment, inventory icons or environmental props in a 4, 9 or 16-slot grid. Example: a sword, shield, potion and coin in one consistent pixel-art set. Inspect available extracted assets before reusing them individually.

Prepare the grid

Provide exactly one nonempty prompt for every slot. prompts.length must equal gridSize; blank slots are not accepted. Choose exactly one style source: preset, custom prompt, ready reference asset or template ID.

Generate props in the workspace

  1. Open Game prop generator.
  2. Select 4, 9 or 16 slots and describe one prop in each slot.
  3. Choose one style source and an existing project or compatible character asset destination.
  4. Review the cost and generate the set.
  5. Inspect the result, then download or reuse the ready image assets.

Choices, limits and cost

Every supported grid size costs 4 credits for the complete generation. Increasing slot count changes the composition rather than multiplying the price. Be specific about the item silhouette and material; do not ask for a full scene in an inventory-icon slot.

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
templateIdstringNoSee the workflow requirements above.
stylePromptstringNominLength: 3; maxLength: 1000
gridSizenumber / number / numberYesSee the workflow requirements above.
promptsarrayYesminItems: 1; maxItems: 16
stylePresetIdstringNo"16-bit-pixel", "modern-anime", "cyberpunk-chibi", "dark-fantasy"
characterIdstringNominLength: 1; maxLength: 255
characterTargetobject / objectNoSee the workflow requirements above.
projectIdstringNominLength: 1; maxLength: 255
folderIdstring / nullNoSee the workflow requirements above.
styleReferenceAssetIdstringNoSee the workflow requirements above.

API example

This example costs 4 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_props",
  "input": {
    "gridSize": 4,
    "prompts": [
      "Iron sword",
      "Wooden shield",
      "Healing potion",
      "Gold coin"
    ],
    "stylePresetId": "16-bit-pixel"
  }
}
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_props. The following is a tools/call params object:

json
{
  "name": "generate_props",
  "arguments": {
    "input": {
      "gridSize": 4,
      "prompts": [
        "Iron sword",
        "Wooden shield",
        "Healing potion",
        "Gold coin"
      ],
      "stylePresetId": "16-bit-pixel"
    },
    "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