> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rawchunks.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Generation events

> Follow generation progress as newline-delimited JSON.

The content type is `application/x-ndjson`. Each nonempty line is a JSON object. This is not an EventSource stream. Terminal states are `ready` and `error`. Reconnect with the same IDs or use [status polling](/dev/guides/jobs).

## Headers and parameters

<ParamField path="taskId" type="string" required>
  Resource ID.
</ParamField>

<ParamField query="songId" type="string" required>
  Song ID returned by the same submission.
</ParamField>

## Response (200)

Success.

<ResponseField name="result" type="string">
  One GenerationStatus object per line.
</ResponseField>

## Errors

Failed JSON responses contain an `error` string. Check the HTTP status before reading a successful result. See [job handling](/dev/guides/jobs) for interrupted or uncertain submissions.

| Status | Meaning |
| - | - |
| `400` | Invalid request. |
| `500` | Request failed. |

<RequestExample>
  ```bash cURL theme={null}
  curl --fail-with-body -X GET "$RAWCHUNKS_API/api/generation/events/$(jq -nr --arg v "$TASK_ID" '$v|@uri')?songId=$(jq -nr --arg v "$SONG_ID" '$v|@uri')"
  ```
</RequestExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.