Skip to main content
WorkCrafter logoWorkCrafter.online

AI generation API

One endpoint and one key for text, images, video, voice, music and code. Billed per call in credits — there is no subscription, no per-modality plan and no minimum. Everything you make through the API also appears in your gallery.

Before you build

  • • Blocking by default, asynchronous on request. A plain call returns the finished result. Add "async": true and it returns a job id at once instead — the better choice for video, long voice-overs and long music, which take minutes.
  • • Failed generations are refunded automatically — you are never billed for an error.
  • • 120 requests per minute per key, and up to 10 keys per account.
  • • Credits never expire and there is no monthly commitment, so an idle month costs nothing.
  • • The engine is ours to choose. You pick a modality and quality tier, not a named third-party model — which is why your integration does not break when a provider deprecates one.

1. Get an API key

Create a key from your dashboard. The key is shown once — store it safely. Send it as a bearer token on every request:

Authorization: Bearer wc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2. Generate

POST https://workcrafter.online/api/v1/generate/

Body fields:

  • tool — text, code, image, audio, music or video
  • prompt — what you want (for audio this is the spoken text, for music the style)
  • model — optional engine key (leave out for automatic)
  • size — image only: square, landscape, portrait
  • voice — audio only. The prompt may be up to 6,000 characters (about five minutes of speech)
  • lyrics, duration — music. duration is in seconds, 10 to 300
  • orientation, duration — video
  • async — optional, true to get a job id back immediately (media tools only)

Example — text

curl -X POST https://workcrafter.online/api/v1/generate/ \
  -H "Authorization: Bearer wc_live_..." \
  -H "Content-Type: application/json" \
  -d '{"tool":"text","prompt":"Write a tagline for an AI studio"}'

Response:

{ "tool": "text", "creationId": "…", "text": "…", "cost": 2 }

Example — image

curl -X POST https://workcrafter.online/api/v1/generate/ \
  -H "Authorization: Bearer wc_live_..." \
  -H "Content-Type: application/json" \
  -d '{"tool":"image","prompt":"a serene mountain lake at sunrise","size":"landscape"}'

Response:

{
  "tool": "image",
  "creationId": "…",
  "url": "https://workcrafter.online/api/creations/…/file",
  "download": "https://workcrafter.online/api/creations/…/file?download=1",
  "cost": 1
}

Long jobs — asynchronous mode

With "async": true the call answers 202 straight away. Poll statusUrl with the same key every few seconds, or wait for the generation.completed webhook.

curl -X POST https://workcrafter.online/api/v1/generate/   -H "Authorization: Bearer wc_live_..."   -H "Content-Type: application/json"   -d '{"tool":"video","prompt":"aerial shot over a misty forest","async":true}'

Response:

{ "jobId": "…", "status": "pending", "statusUrl": "https://workcrafter.online/api/v1/jobs/…/" }

Then:

curl -H "Authorization: Bearer wc_live_..." "https://workcrafter.online/api/v1/jobs/JOB_ID/"

{ "jobId": "…", "status": "pending", "progress": 40 }
{ "jobId": "…", "status": "done",
  "result": { "tool": "video", "creationId": "…", "url": "…", "download": "…", "cost": 12 } }
{ "jobId": "…", "status": "failed", "error": "…", "errorStatus": 502 }

A failed job has already been refunded. A blocking call that runs past about four and a half minutes also answers 202 with a job id rather than an error — the generation is still running, and is collected the same way.

3. Download files

Media responses return a url. Fetch it with the same API key to download the bytes:

curl -L -H "Authorization: Bearer wc_live_..." \
  "https://workcrafter.online/api/creations/ID/file?download=1" -o output.png

4. Webhooks

Register a webhook from your dashboard to receive a signed POST when events happen: generation.completed, generation.failed, credits.low.

Each delivery carries a signature header:

X-WorkCrafter-Event: generation.completed
X-WorkCrafter-Signature: sha256=<hex>

{ "event": "generation.completed",
  "data": { "creationId": "…", "tool": "image", "status": "success" },
  "at": "2026-07-14T10:00:00.000Z" }

Verify it by computing HMAC-SHA256(rawBody, yourWebhookSecret) and comparing to the header. Deliveries time out after 5s; failures are recorded on the webhook.

Pricing & limits

Each call costs credits. Credits are bought in packs from $5, so a credit works out at about $0.02 — less on the larger packs:

ToolCost
Text or code2 credits per run
Image1–3 credits
Voice-over2 credits per 2,000 characters
Music6 credits per 2 minutes, up to 5 minutes
Video clip3 credits per second — 12 for 4 s, up to 10 s · premium engines 3.6–48 credits per second, by engine
  • Voice-over is billed by the length of the text, music and video by their duration, and premium video engines by the second. The response's cost is what was actually charged.
  • Video accepts duration in seconds (snapped to what the engine supports) and, on the engines that offer it, "audio": true.
  • Rate limit: 120 requests / minute per key (status checks have their own, higher limit).
  • Errors return a JSON { "error": "…" } with a 4xx/5xx status.
  • A failed generation is automatically refunded.
  • Up to 10 active keys per account — revoke unused ones from the dashboard.