Getting Your Result
Submitting a job through any of the video-jobs submit endpoints gets you a 200 with the result inline if it resolves within ~10 seconds. If it doesn’t, you get a 202 instead — and from there, there is no separate endpoint to poll. You have two options, and you can use both:
1. Set a webhookUrl
Section titled “1. Set a webhookUrl”Pass webhookUrl on the original submit call and Megomi POSTs the finished result there as soon as the job resolves — no further action from you. See Webhooks for the payload shape and how to verify the delivery’s signature.
2. Resubmit the same request
Section titled “2. Resubmit the same request”Send the exact same submit request again (same videoUrl, or the same handle + itemId). Megomi recognizes it’s the same target already in flight for your key and attaches to that existing request instead of creating a new one — so you’re never charged twice for one video, and a request that’s now finished comes back inline as a 200 with cached: true.
This is literally the same call as your original submit — see Submit a Video Job for the full request/response shape. The only thing to note here is what changes on a resubmit:
| Field | What to expect on a resubmit |
|---|---|
requestId |
A new opaque ID for this call — it’s a separate request row, even though it’s attached to the same underlying job |
coalesced |
true if a job for this video was already in flight when you resubmitted |
cached |
true once the job has actually resolved — this is what tells you the result is final |
result |
Populated once cached (or the top-level status is terminal) |
A resubmitted request against a job that’s still running comes back the same way the original did: 200 inline if it finishes within ~10s of this call, otherwise another 202.
# Same body as your original submit call.curl -X POST "https://api.megomi.com/api/video-jobs/full" \ -H "x-api-key: YOUR_API_KEY" \ -H "content-type: application/json" \ -d '{"videoUrl": "https://www.tiktok.com/@creator/video/7123456789012345678"}'const res = await fetch("https://api.megomi.com/api/video-jobs/full", { method: "POST", headers: { "x-api-key": process.env.MEGOMI_API_KEY, "content-type": "application/json", }, body: JSON.stringify({ videoUrl: "https://www.tiktok.com/@creator/video/7123456789012345678", }),});const data = await res.json();{ "requestId": "req_4tKp9WmZ2yXaB7cN", "itemId": "7123456789012345678", "status": "success", "coalesced": false, "cached": true, "result": { "likes": 128900, "views": 2119800, "comments": 3040, "shares": 890, "saves": 2118, "hasBasket": true }, "finishReason": null}{ "requestId": "req_1qLr6PxV8nWtE3sJ", "itemId": "7123456789012345678", "status": "queued", "coalesced": true, "cached": false, "result": null}