Jobs API
Poll the status of asynchronous AI builds for widgets and agents.
When you create a widget or agent with a build prompt, the API returns a jobId. Use the Jobs endpoint to poll for completion.
GET /v1/jobs/:jobId
Response
Status values
| Value | Meaning |
|---|---|
pending | Job created, build hasn't started yet |
building | AI is generating files, or compile is running |
completed | AI build finished successfully |
failed | Build crashed — see error |
Build status (widgets only)
For widgets, after the AI finishes generating files, an AWS CodeBuild compile is triggered. The job's status becomes completed once the AI is done, but the widget isn't safe to publish until buildStatus.status is SUCCEEDED.
buildStatus.status | Meaning |
|---|---|
IN_PROGRESS | Compile is running (phase shows what stage) |
SUCCEEDED | Compile finished — safe to publish |
FAILED | Compile errored — failureDetails has the cause |
Agents skip CodeBuild entirely, so result.buildId is null and there is no buildStatus.
Recommended polling pattern
Recommended interval: 5 seconds. Builds typically complete in 30–120 seconds.
Token cost: 0 — polling is free.