Get an Asset
Fetch a single asset together with a fresh, short-lived download URL. Use this to poll an upload until its status is active (or failed).
GET
https://console-api.siraya.ai/extapi/v1/assets/{assetId}
Path Parameters
assetId
string
Required
The unique identifier of the asset, returned when you list or upload it.
Note: The returned
urlis short-lived — fetch it promptly, or re-request the asset for a fresh one.
import requests, time
url = "https://console-api.siraya.ai/extapi/v1/assets/a-9z8y7x"
headers = {"Authorization": "Bearer <API_KEY>"}
# Poll until the asset is active (or failed)
while True:
asset = requests.get(url, headers=headers).json()["data"]
if asset["status"] in ("active", "failed"):
break
time.sleep(3)
print(asset["status"], asset.get("url"))
Example Response