Open API wire server-side tools into your own system
Use a Bearer key to call the tools that have to run server-side: HEIC / TIFF / RAW / AVIF conversion, PDF processing, video transcoding and video-to-GIF, GIF frame extraction and reverse, and image denoise. Upload, get a task number, poll, download—four steps.
1. Authentication
Send the key with every request:
Authorization: Bearer tdd_xxxxxxxxxxxxxxxx
Keys are issued to signed-in users only (giving them to anonymous visitors would be a way around per-page rate limits). The plaintext is shown once, on the creation screen; the server stores only its sha256, so a forgotten key has to be regenerated.
2. Request flow
- Create a task:
POST /api/v1/tasks, using the multipart fieldstool(tool code),file(usefiles[]),params(JSON string) - Check status:
GET /api/v1/tasks?no=task number; when status is done it returns result.url - Download the result:
GET /api/v1/results?no=task number, with the same Bearer header - Check usage:
GET /api/v1/usage; returns today's quota and the calls used this minute
Example (HEIC to JPG):
curl -X POST https://www.tdd8.cn/api/v1/tasks \
-H "Authorization: Bearer tdd_xxx" \
-F "tool=convert_heic" \
-F "params={\"format\":\"jpg\"}" \
-F "file=@photo.heic"
# returns {"ok":true,"task_no":"T2026...","status":"pending","left":19,"ttl":7200}
curl -H "Authorization: Bearer tdd_xxx" \
"https://www.tdd8.cn/api/v1/tasks?no=T2026..." # Check status
curl -H "Authorization: Bearer tdd_xxx" -o out.jpg \
"https://www.tdd8.cn/api/v1/results?no=T2026..." # Download
The tool code is the code shown on each tool page, for example convert_heic, pdf_to_jpg, video_convert, gif_reverse, denoise. Only tools that cannot run in the browser and must be processed server-side are exposed through the API; passing a local tool code returns 404.
3. Quota and rate limits
- Quota: shared with the website—20 runs per day for free users, more on VIP plans (from 200), resetting at 00:00 daily. One file counts as one run.
- Rate limit: each key may create at most the per-minute value you chose at creation tasks per minute; exceeding it returns 429 with
Retry-After: 60. - Concurrency: a single key may have at most 3 tasks queued or processing; beyond that returns 429.
- Result retention: follows the account—2 hours for free users, 24 hours / 72 hours / 7 days for VIP. Expired files are removed and the API returns 410.
- Billing: no separate charge for now; the API shares the website quota. If usage-based pricing is introduced later it will be announced in advance—we will not change the rules quietly.
4. Error codes
| Status | Meaning | What to do |
|---|---|---|
| 401 | missing, invalid or revoked key | check the Authorization header, or generate a new key |
| 404 | the tool does not exist, does not need server-side processing, or the task belongs to another key | check the tool code; a task can only be read with the key that created it |
| 409 | the task is not finished | keep polling, do not download yet |
| 410 | the result expired and was removed | submit the task again |
| 413 | the file exceeds the size limit (20 MB for images, 100 MB for video) | compress it or trim it first |
| 415 | unsupported format | supports JPG/PNG/WebP/GIF/BMP/TIFF/AVIF/HEIC/PDF/MP4 |
| 422 | invalid parameters (for example mixed formats in a merge) | fix the request and retry |
| 429 | quota exhausted, rate limited or queue full | read the returned limit, used and Retry-After |
5. My keys
API keys are available to signed-in users only. Sign in to create one on this page, or sign up.
FAQ
Why only server-side tools?
Compression, resizing, watermarking and cropping run in the browser already—turning them into endpoints would only add an extra upload. The API exposes the jobs a browser cannot do well: HEIC decoding, PDF, video transcoding, GIF frame extraction and denoise.
What if a key leaks?
Revoke it here and it starts returning 401 immediately, then create a replacement. Tasks created with the old key can still be queried and downloaded.
Is the API billed separately?
Not at the moment—the API shares the same daily quota as the website. If usage-based pricing is introduced later, it will be announced before it takes effect.
Could someone guess a result URL?
A download requires the task number and the right owner: task numbers are 20-character random strings and must belong to the key's user, so a copied link is useless.