Skip to main content
These examples use curl and a token obtained through the OAuth 2.1 flow. Export it once and reuse it:

Happy Path, Step by Step

A complete iteration on an existing project, from token check to finished generation.

1. Validate your token

If this returns 200, your token works. 401 missing_token or 401 invalid_token means go back to Authentication.

2. Find the project to iterate on

Project ids are numeric (int64). List your projects and pick one:

3. Create a generation job

Submit a prompt against that project. input.model is optional — the API evaluates the prompt and picks the tier (light or full) for you.
A prompt the evaluation step considers unusable fails fast here with 400 invalid_prompt. A valid prompt returns 202 Accepted immediately — the generation has just started:
Save the job id (a UUID) — it is your handle for everything that follows.

4. Poll until the job finishes

When the runner finishes, the job turns terminal:

5. Read the updated project

That’s it: prompt in, generated files saved to the project.

Error Handling

Every error has the same shape — branch on code, not on the message text:

400 — prompt rejected by evaluation

Retry only with a materially better prompt — resubmitting the same text will be rejected again.

429 — quota exceeded

Always honor the Retry-After header before retrying. Rate limits are being tuned during early access; your current quota snapshot appears in whoami when available.

Full error code reference

Health Check

An unauthenticated liveness probe, useful for monitors:

Next Steps

Async Jobs

The full job lifecycle and polling guidance.

API Overview

Back to the big picture.