Generate your personal TikQuick API key and use it with the third-party endpoints.
Loading…
Everything below runs against https://api.tikqcapi.site (Passport) and https://byte.tikqcapi.site (processing server). The optional Optimize step uses one of two encoder servers (https://vapi.tikqcapi.site and https://vapi2.tikqcapi.site), reached with a token from your key. Pick the less busy one for each job, see section 7.
Do not put your key in client-side code, no frontend JS, no shipped browser extension, no public repo. Keep it on your server and only ever send the short-lived OTU tokens (section 3) to the browser. Anyone with the key can mint tokens as you. If it leaks, hit Remake: the old key dies instantly and you get a fresh one with the same usage, cap and Premium status carried over, remaking never resets your limits.
Every upload starts by trading the key for a fresh single-use token. The key itself never goes to PS.
| 400 | Missing key, no key supplied |
| 403 | Invalid API key / key disabled (banned) |
| 429 | Usage limit reached (free 10k cap spent) |
| 500 | Key misconfigured, contact us on Discord |
Tokens are single-use and short-lived, mint one right before each upload, never cache them. Save user_id + token for the next step.
Every patch request (/api/v2/patch and /api/upload/init) takes a selectmethod query parameter. Append it after the auth params.
| orion | Default. Use this whenever you can. The video should be uploaded to TikTok as "Everyone" or "Friends Only", not "Only Me". |
| luna | Fallback if Orion does not work for a video. Risky patch, and it requires a 60 or 30fps source. |
Anything other than luna should be sent as orion. Show the matching warning above to your users when they pick a method.
The fast path. Only the MP4 header goes to the server, never the video itself. The server returns a patched header plus a small "ghost sample", and you splice the final file locally. Nothing is re-encoded and no chunking is needed.
Step A, check the layout locally first. Do this before minting an OTU token, because every answered request (even a 4xx) spends the token. Walk the top-level MP4 boxes by reading only their headers:
Step B, send the prefix.
Step C, assemble and verify. Base64-decode patched_prefix_b64, hex-decode ghost_sample_hex, then build the final file from the three parts above (the payload is the faststart file from byte prefixLen onward, untouched). Reject the result if any of these fail:
| 400 | Server rejected the video header |
| 401 / 403 / 503 | Authentication failed, mint a fresh token and retry |
| 413 | Video too large for the patch server |
| 422 | Video cannot be patched as-is |
| 501 | Patch mode not supported by this server, use the chunked fallback |
Use this when the instant patch (section 5) is not possible for a file. Files are split into 20MB or smaller chunks, POSTed individually (a single-shot upload of anything but small files will fail). 2 chunks in flight at once with retry + backoff works well.
Use job_id / job_otu (not your original token) for chunks and complete. Track progress in bytes sent, not chunks finished, for a smooth bar.
Optional pre-pass for videos that have not been compressed or exported (for example from Handbrake) yet, and the only route for files over 400MB (up to 1500MB). It adds a few seconds to processing. The result is then fed into the normal PS patch with an enc_id instead of raw chunks. Skip the instant patch for these files.
The encoder token is minted with your API key, the same key as the OTU token. Keep it server-side.
load is how busy that server is, 0 to 100, sent as a string (parse it as a number). Use the lowest. A value of 91 or more means jobs are already waiting in a queue there, so avoid it unless the other is just as bad. If the two are within a couple of points, either is fine. Give each call a short timeout (about 3 seconds) and if one does not answer, use the other. Do this right before you mint the token. One reading is good for about 5 seconds, so you do not need to re-check for every request.
Leave encoderserver off for vapi, and send &encoderserver=vapi2 for vapi2. A token only works on the server that minted it, so use the returned encoder_server as ENCODER_SERVER for every remaining step of that job (create, upload, finish, progress).
| 400 | Missing key, or an unknown encoderserver value |
| 403 | Invalid API key / key disabled (banned) |
| 429 | Usage limit reached |
| 500 | Key misconfigured, contact us on Discord |
| 502 | Could not reach that encoder server. Retry, or mint a token for the other one (every attempt costs 1 use) |
| queued | Has pos and optional eta_seconds |
| setting_up_env, rendering, processing | Progress, optional percent and message |
| done | Has output_url_base64, base64-decode it to get the output URL |
| failed | Has error, stop |
| enc_serve | Which encoder PS pulls enc_id from. Either vapi or vapi2. Leave it off for vapi (the default). |
Send &enc_serve=vapi2 if, and only if, the job ran on vapi2 (the token came from encoderserver=vapi2). The file only exists on the encoder that produced it, so a mismatch returns a 502. Any value other than vapi or vapi2 returns a 400.
The encoders are sometimes down. The two /loadz checks above double as the availability check: if neither answers, fall back to the direct limits (300MB, or 400MB with the partner perk).
No auth needed, good for a "test connection" button. Having trouble? Try https://ps.tikquick.online as a backup PS domain (or https://tqps.exliatycl.online).
One key per account, one key per IP. Your key is capped at 10,000 uses unless an admin marks it Premium.
Pass your key to the third-party endpoints to mint upload tokens.
Free keys stop minting after 10,000 uses. Premium keys are unlimited. Think your key leaked? Hit Remake above, the old key dies instantly and you get a fresh one. Get a premium key via DM'ing @mikedev_ on our Discord server..