Celebrity Look-Alike takes one portrait and returns a generated image of the closest celebrity match, with no prompt and no parameters. The photo must show a single clear, roughly frontal face, and the result carries no name or score.
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "spicyapi/look-alike-v1/edit",
"input": {
"image_url": "https://example.com/reference.png"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
Generated from this model’s input schema — the same one the API validates every request against.
Input parameters
Place these fields inside the request body’s input object. Names and types match the API. Do not assume a default when none is specified.
image_urlstringRequired
One clear, roughly frontal portrait with a single visible face. Group shots, profiles, sunglasses and motion blur are where the match degrades or the call fails. Send only photos of people who consented to this use.
HTTP 202 means the task was accepted, not completed. Save the returned taskId and query that task. Do not create another task while waiting for its result.
Start polling at about 2 seconds and gradually increase the interval. Stop at a terminal state. After a connection failure, query the original taskId. Retry creation only with the original idempotency key and body.
Pass callBackUrl when you create the task and the finished record is POSTed to you — no polling loop at all. Every delivery carries X-Webhook-Timestamp, X-Webhook-Signature and X-Webhook-Payload-Version. The signature is a base64 HMAC-SHA256 over taskId.timestamp.sha256(body), so it must be checked against the raw bytes: parsing the JSON and re-serialising it changes them and the check will fail. Failed deliveries are retried, so the same taskId can arrive twice — make the handler idempotent. Answer 2xx first and do the work afterwards; a slow handler is treated as a failed delivery.
Read the result
Consume output only when state is succeeded. On failure, use errorCode, errorMessage and request_id to investigate. Example costs and states do not represent an actual bill.
For each available asset, open or download assets[].url directly without an API Authorization header. The signed URL expires at expiresAt; poll the task again to refresh it while the asset remains within its retention period. A pending or unavailable asset has no URL. Treat signed URLs as private.
SDKs & integrations
Use SpicyAPI in your app, terminal, AI assistant or visual workflow. Choose a setup guide below.
You do not have to write any of the code above. Connect the MCP server once and any agent that speaks MCP — Claude Code, Codex, Cursor, Windsurf, VS Code, Gemini CLI, Cline, LibreChat — can run this model by name, or run it from your shell with a single command.
Say this to your agent
Use spicyapi/look-alike-v1/edit to edit ./poster.png — warmer light, cleaner background — and save the result next to it.
The agent looks the model up in the live catalogue, uploads the local file for you, then shows the exact quote and its maximum charge and waits for your confirmation. Nothing is billed until you say yes.
The first line gives the agent the tools; the second gives it the Skill — the operating rules for them, so it quotes before it bills, uploads local files instead of pasting bytes, and reads the finished asset URL rather than guessing. Every other client takes the same server through its own config file: see the developer hub.
The input is this endpoint’s own schema, same as the examples above. --wait polls until the task is finished and prints it; add --yes to skip the confirmation prompt in CI. Set SPICY_API_KEY first — one key works for the API, the CLI and the MCP server.
Request bodies take URLs, not bytes. Upload the file first and pass the spicy:// URI it prints — the field name above is this endpoint’s own, straight from its schema. An agent on MCP does this step for you, which is why the sentence further up can name ./poster.png directly. Media already reachable over public HTTPS needs no upload.
How long results are kept
npx @spicyapi/cli tasks create --model spicyapi/look-alike-v1/edit \
--input-json '{…}' --retention 1h --wait
npx @spicyapi/cli tasks get $TASK_ID # read back the retention that applied
--retention only ever shortens the window — 30m, 1h, 7d, or 0 to delete as soon as the task reaches a terminal state. The value that actually applies is the shortest of your request, your account settings and the platform maximum, so read it back from the task record rather than assuming the number you asked for took effect. Passing a longer window than your account allows does nothing.
Use it in ComfyUI
Install the SpicyAPI nodes from ComfyUI Manager or with the command below, then search for Celebrity Look-Alike · Image Editing on the canvas. The node has the same options as this page and shows its price before it runs.
cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi
The embedded panel reads the same schema as this page, so it cannot drift from the API. If your docs need the content to be searchable, read the JSON under /api/embed/models/ and render it yourself.