# Image · job status

`GET /v1/images/generations/{id}` — Poll an async render until the image is ready.

- Base URL: https://eroq.ai/v1
- Auth: `Authorization: Bearer eroq_sk_…` (create keys at https://eroq.ai/dashboard/keys)
- Credits: free

Free to call, as often as you like — every few seconds is the intended cadence. `status` walks `processing` → `succeeded` (the image is in `data`) or `failed` (an `error` object explains, and the credits were already refunded).

While `processing`, `phase` tells you where the render is: `queued` (waiting for a free render slot — a busy period can hold it there for a while) or `generating` (a slot picked it up and the frames are being drawn). Both are healthy — keep polling.

A finished job carries `generation_ms` — the wall-clock the render took end-to-end (queue + generation), in milliseconds. Handy to show your own users how long a render ran.

Job ids are scoped to your account (and workspace) and expire 24 hours after creation; persist the image (yours to keep, or `store: true` at submit) before then.

`data[0].url` is a signed CDN URL valid for 30 minutes — poll the job again (or read /v1/creations) for a fresh one. A private render (`private: true`) answers once with `b64_json` instead and is stored nowhere.

## GET /v1/images/generations/{id}

Poll an async render until the image is ready.

### Example request

```bash
curl https://eroq.ai/v1/images/generations/GENERATION_ID \
  -H "Authorization: Bearer $EROQ_API_KEY"
```

```javascript
const res = await fetch('https://eroq.ai/v1/images/generations/GENERATION_ID', {
  headers: { Authorization: `Bearer ${process.env.EROQ_API_KEY}` },
})
console.log(await res.json())
```

```python
import os, requests

res = requests.get("https://eroq.ai/v1/images/generations/GENERATION_ID", headers={"Authorization": f"Bearer {os.environ['EROQ_API_KEY']}"})
print(res.json())
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET", "https://eroq.ai/v1/images/generations/GENERATION_ID", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("EROQ_API_KEY"))

	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```

### Response


```json
{
  "id": "b7e6c2d4-…",
  "object": "image.generation",
  "status": "succeeded",
  "created": 1756118400,
  "model": "eroq-krea2",
  "data": [{ "url": "https://cdn.eroq.ai/…/image.webp?token=…&expires=…", "content_type": "image/webp", "library_id": "…" }],
  "generation_ms": 4200,
  "usage": { "credits_spent": 10, "credits_remaining": 977 }
}
```

---
Canonical: https://eroq.ai/docs/image-status · Index for agents: https://eroq.ai/llms.txt · OpenAPI: https://eroq.ai/openapi.json
