Poll a short bought with an x402 payment, or read the menu

Called with no query parameters, returns the menu. With runId and token (the statusUrl the paid POST handed back), returns the run's status and, once finished, video with outputs.title and outputs.description. Send Prefer: wait=N to hold the answer until it finishes, for up to N seconds (at most 720).

get/api/x402/short

Request

  • Base URL: https://www.trezalabs.com
  • URL: https://www.trezalabs.com/api/x402/short
  • Auth: HTTP bearer

Query parameters

runIdstring

Required to poll a run. Omit both this and token to get the offer list.

tokenstring

Signed claim ticket from the paid POST. Required to poll a run.

Headers

Preferstring

Optional. wait=N holds the answer until the run finishes, for up to N seconds (at most 720), streamed as a whitespace byte every 2 seconds and then the JSON.

Response

Run status plus video once finished; or, with no query parameters, the menu.

OR

Example response

{
  "status": "success"
}

Changes

No recorded changes to this operation across all 1 revision of this API.