# streamJobEvents

> Part of the MAP Audio Music API docs. Index of every page: https://map.audio/developers/music-api/llms.txt. OpenAPI document: https://map.audio/developers/music-api/openapi.json.

`GET https://api.map.audio/v1/jobs/{id}/events`

Stream a job's events

Server-sent events for one job: job.queued, job.started, job.progress, job.preview and job.requeued, then job.succeeded, job.failed, job.cancelled or job.expired. Each event's `data` is JSON with `jobId` and `createdAt`; job.preview carries the preview's outputs, and job.failed the error. Reconnect with `Last-Event-ID` (or `after`) to miss nothing; a stream closes after 10 minutes or once the job has ended. A browser's EventSource cannot send Authorization, so read it with fetch. Free.

Auth: `Authorization: Bearer` with an API key or a map.audio access token. Not an MCP tool: A server-sent event stream; MCP tools answer once, so poll get_job instead.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | A job id (job_…), from the response that created the job or GET /v1/jobs. Matches `^job_[0-9A-HJKMNP-TV-Z]{26}$`. |
| `after` | query | integer | no | Resume after this event id, as the Last-Event-ID header does. At least 0. |
| `Last-Event-ID` | header | string | no | The last event id received; the stream resumes after it. Matches `^\d{1,9}$`. |

## Example

```sh
curl -sS "https://api.map.audio/v1/jobs/job_01M6BPRE186QHP9QPYGDX5NNFP/events?after=2" \
  -H "Authorization: Bearer $MAP_API_KEY" \
  -H "Map-Version: 2026-11-01"
```

### 404: Not found

```json
{
  "error": {
    "type": "not_found",
    "code": "not_found",
    "message": "No job with that id; GET /v1/jobs lists this account's jobs.",
    "param": "id",
    "retryable": false,
    "jobId": null,
    "docUrl": "https://map.audio/developers/music-api/errors#not_found",
    "requestId": "9a3f7c2e5b1d8f40-LHR"
  }
}
```

## Responses

- `200`: The event stream.
- `404`: Not found
- `default`: Any other error: `error.code` names it, `error.param` the field at fault, and `error.docUrl` its entry in the error catalogue.

## Errors

- [`not_found`](https://map.audio/developers/music-api/errors#not_found)
- [`invalid_request`](https://map.audio/developers/music-api/errors#invalid_request)
