# Get an operation

`GET https://api.cream-ai.de/api/v1/operations/{id}`

The current state of a long-running operation of your company, for example a storyboard preview (`storyboard.preview`) or applying comments to a finished film (`film.comments_apply`). The `Location` header of the request that started it points here. Poll until `status` is `succeeded` or `failed` (every few seconds is enough); the state is computed when you read it. `result` is set when the operation succeeded: `storyboard_preview` with the URL of the preview, or `film_revision` with the new revision (for example `V3`) and the URL of the film. `error` is set when it failed. Error codes: `start_failed`, `preview_failed`, `correction_failed`, `interrupted_by_restart`. `start_failed`: the operation could not be started; send the request again with a new Idempotency-Key. `interrupted_by_restart`: mint was restarted while applying the comments; they are open again and can be applied again. The scopes depend on the type (`storyboard.preview`: `films:read` + `previews:read`; `film.comments_apply`: `films:read` + `films:revise`; `films:revise` includes `films:read`). A key without them gets `403 forbidden_scope` with `details.required_scopes`. Unknown ids, operations of other companies and operations of films deleted in mint return `404 not_found`, before scopes are checked. New operation types may be added within v1; ignore operations of types you do not know.

Scopes: `films:read`

## Parameters

- `id` (path, required): Id of the operation (id of the Operation object, also at the end of the Location header).

## Returns

- 200: The operation.

## Errors

- 401: Missing, malformed, revoked or expired API key (unauthorized).
- 403: Not allowed (forbidden_scope, ip_not_allowed, company_inactive, api_not_enabled). With forbidden_scope the key lacks a scope for this type of operation; details.required_scopes lists all scopes the type needs.
- 404: The operation was not found (not_found): unknown id, an operation of another company or of a film deleted in mint.
- 429: Too many requests (rate_limited).
- 500: Internal error (internal). Quote the request id when you contact support.
- 503: Temporarily unavailable (service_unavailable). Retry later (after Retry-After seconds, if sent).

## Example request

```sh
curl "https://api.cream-ai.de/api/v1/operations/op_4d9b2e7a1c6f3d8b5e0a2c7f9b4d1e6a" \
  -H "Authorization: Bearer $MINT_API_KEY"
```

## Example response (200)

```json
{
  "object": "operation",
  "id": "op_4d9b2e7a1c6f3d8b5e0a2c7f9b4d1e6a",
  "type": "storyboard.preview",
  "status": "succeeded",
  "created_at": "2026-11-10T08:25:00Z",
  "updated_at": "2026-11-10T08:27:41Z",
  "result": {
    "object": "storyboard_preview",
    "id": "pv_8c1e4a7d2b5f9e3c6a0d1b4e7f2a5c8d",
    "url": "https://api.cream-ai.de/api/v1/films/k7m2xq9v4t8n1b5r3c6d0wza/storyboard-preview?preview_id=pv_8c1e4a7d2b5f9e3c6a0d1b4e7f2a5c8d"
  },
  "error": null
}
```
