# Processing

The processing status of the version a write produced: whether search finds it, and whether every later step has ended.

API reference. Base URL: `https://api.mirabase.io`

## Read the processing status of several versions

`POST /v2/versions/batch-status`

Return the processing status of up to 100 versions in one call, one result per id in the order sent. A version you cannot see is reported as `not_found`, the same as one that does not exist. Counted as a read and never charged. Needs `knowledge:read`.

**Capability** `knowledge:read`

Guide: [Processing status](https://mirabase.io/developers/processing.md#write-status)

### Request body

`application/json` `DevBatchStatusRequest`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `version_ids` | `string[]` | Required | 1 to 100 version ids, such as the `version_id` of each write receipt. Repeats are answered again. items 1..100 |

### Responses

- `200` `application/json` `DevBatchStatusResponse`

### Response headers

- `Mirabase-Tokens-Charged` Prepaid tokens only (deployments that sell them, accounts on them), on successful responses of operations that charge: tokens this request was charged. Final.
- `Mirabase-Tokens-Reserved` Tokens held for this request's model calls that settle after the response; the ledger has the final amount.
- `Mirabase-Tokens-Remaining` The account's spendable tokens after this request's last charge or hold, when it had one.

### Error statuses

`400` `401` `403` `404` `422` `429` `500` `503` See [Errors](https://mirabase.io/developers/conventions.md#errors) for the error shape and [Error codes](https://mirabase.io/developers/errors.md) for what each code means.

### Example request

```bash
curl -X POST "https://api.mirabase.io/v2/versions/batch-status" \
  -H "Authorization: Bearer $MIRABASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version_ids":["<version_ids>"]}'
```

### Example response

```json
{
  "data": [
    {
      "entry_id": "<entry_id>",
      "version_id": "<version_id>",
      "state": "accepted",
      "searchable": false,
      "is_current": false,
      "degraded": false,
      "attempt": 1,
      "terminal": false,
      "status_url": "<status_url>"
    }
  ]
}
```

## Read a version's processing status

`GET /v2/versions/{version_id}/status`

Return the processing status of one version: whether search finds it (`searchable`), whether every later step has ended (`processed`), and how. A version you cannot see returns 404 `not_found`, the same as one that does not exist. Poll it with backoff until `terminal` is true, or send `Prefer: wait` on the write. Reading it is never charged. Needs `knowledge:read`.

**Capability** `knowledge:read`

Guide: [Files and versions](https://mirabase.io/developers/files.md#processing)

### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `version_id` | Path | `DevId` | Required | Opaque server-issued identifier. Clients compare it byte for byte. length 1..256 |

### Responses

- `200` `application/json` `DevWriteStatus`

### Response headers

- `Mirabase-Tokens-Charged` Prepaid tokens only (deployments that sell them, accounts on them), on successful responses of operations that charge: tokens this request was charged. Final.
- `Mirabase-Tokens-Reserved` Tokens held for this request's model calls that settle after the response; the ledger has the final amount.
- `Mirabase-Tokens-Remaining` The account's spendable tokens after this request's last charge or hold, when it had one.

### Error statuses

`400` `401` `403` `404` `422` `429` `500` `503` See [Errors](https://mirabase.io/developers/conventions.md#errors) for the error shape and [Error codes](https://mirabase.io/developers/errors.md) for what each code means.

### Example request

```bash
curl "https://api.mirabase.io/v2/versions/$VERSION_ID/status" \
  -H "Authorization: Bearer $MIRABASE_API_KEY"
```

### Example response

```json
{
  "entry_id": "ent_01JD2M9B2D",
  "version_id": "ver_01JD2M9B2E",
  "state": "searchable",
  "searchable": true,
  "searchable_at": "2026-11-22T08:30:02Z",
  "is_current": true,
  "degraded": false,
  "enrichments": {
    "relations": "pending",
    "classification": "succeeded",
    "summary": "succeeded",
    "memory": "pending"
  },
  "attempt": 1,
  "terminal": false,
  "status_url": "/v2/versions/ver_01JD2M9B2E/status"
}
```
