Get prompt-suggestion run
Status of one Generate prompt suggestions call. The app never calls this itself — its modal subscribes to the same underlying row over Supabase Realtime — but polling is the only option available to an API caller.
GET /v1/brands/{brand_id}/prompts/suggestions/runs/{request_id}Authorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
request_id | uuid | required | From Generate prompt suggestions’s data.request_id |
Request
cURL
curl --request GET \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/prompts/suggestions/runs/3f1a9c2b-7e40-4b17-8e6a-3c05b91e7d22' \
--header 'Authorization: Bearer <api-key>'Response
200
{
"data": {
"request_id": "3f1a9c2b-7e40-4b17-8e6a-3c05b91e7d22",
"topic_ids": ["9c2b1a4e-5d3f-4b8c-9e1a-2f7c6d8b3a10"],
"status": "completed",
"total_suggestions": 8,
"error": null,
"created_at": "2026-08-30T09:15:22.401Z",
"updated_at": "2026-08-30T09:16:47.118Z",
"completed_at": "2026-08-30T09:16:47.118Z"
},
"request_id": "req_8f21c0aa47b1490d2e63"
}Response fields
| Field | Type | Description |
|---|---|---|
data.request_id | uuid | required |
data.topic_ids | uuid[] | required. The topics this run generated for |
data.status | string | required. One of queued, running, completed, failed |
data.total_suggestions | integer | null | null until the run finishes |
data.error | string | null | Set only when status is failed |
data.created_at | timestamptz | required |
data.updated_at | timestamptz | required |
data.completed_at | timestamptz | null | null while queued or running |
request_id | string | required. Also returned as the x-request-id header. Quote it when contacting support |
Errors
| Status | Code | When |
|---|---|---|
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 401 | token_expired | The key passed its expiry date |
| 401 | token_revoked | The key was revoked |
| 404 | not_found | The run does not exist for this brand, or this key is not allowed to reach it |
| 429 | rate_limited | Over 300 requests per minute |
Notes
Poll, do not assume a fixed latency. Generation runs in the background and its duration
depends on topic size and load. queued and running both mean “not yet”; back off between polls
rather than tightening a loop.
Last updated on