API documentation
Generate content from your own apps with a single endpoint. Everything you make through the API also appears in your gallery.
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_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2. Generate
POST https://workcrafter.online/api/v1/generate
Body fields:
tool—text,code,image,audio,musicorvideoprompt— 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,portraitvoice— audio onlylyrics,duration— musicorientation,duration— video
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": 10
}3. Download files
Media responses return a url. Fetch it with the same API key to download the bytes:
curl -H "Authorization: Bearer wc_live_..." \
"https://workcrafter.online/api/creations/ID/file?download=1" -o output.png4. 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 (1 credit = $0.02):
| Tool | Cost |
|---|---|
| text | 2 credits ($0.02) |
| code | 2 credits ($0.02) |
| image | 10 credits ($0.10) |
| audio | 10 credits ($0.10) |
| music | 15 credits ($0.15) |
| video | 50 credits ($0.50) |
- Rate limit: 120 requests / minute per key.
- 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.
Ready to start? Create your first API key →