> ## 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.

# Edit status

> Poll an edit and retrieve its candidate or stems.

Poll by the task/song/user binding. A ready candidate has `take` and `audioUrl`; ready separation has `stems`. There is no edit event stream.

[Follow jobs](/dev/guides/jobs).

## Headers and parameters

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

<ParamField query="songId" type="string" required>
  Same song as submission.
</ParamField>

<ParamField query="userAddress" type="string" required>
  Same selected account as submission.
</ParamField>

<ParamField query="task" type="string" required>
  Task kind returned by submission. Values: `repaint`, `lego`, `complete`, `extend`, `cover`, `extract`.
</ParamField>

<ParamField query="stemId" type="string">
  Same target stem if supplied.
</ParamField>

<ParamField query="prompt" type="string">
  Optional original prompt.
</ParamField>

<ParamField query="repaintingStart" type="string">
  Optional original start, decimal seconds.
</ParamField>

<ParamField query="repaintingEnd" type="string">
  Optional original end, decimal seconds.
</ParamField>

<ParamField header="x-session-user-address" type="string" required>
  Selected account address. Required for owner-scoped reads and writes. It identifies the account; your product must authenticate its own users.
</ParamField>

## Response (200)

Success.

<ResponseField name="status" type="string" required>
  Values: `pending`, `processing`, `ready`, `error`.
</ResponseField>

<ResponseField name="progress" type="number" />

<ResponseField name="error" type="string" />

<ResponseField name="take" type="object | null">
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required />

    <ResponseField name="song_id" type="string" required />

    <ResponseField name="stem_id" type="string | null" />

    <ResponseField name="take_number" type="integer" />

    <ResponseField name="model" type="string" />

    <ResponseField name="task" type="string" />

    <ResponseField name="url" type="string" required />

    <ResponseField name="is_active" type="boolean" required />

    <ResponseField name="prompt" type="string | null" />

    <ResponseField name="lyrics" type="string | null" />

    <ResponseField name="repainting_start" type="number | null" />

    <ResponseField name="repainting_end" type="number | null" />

    <ResponseField name="seed" type="integer | null" />

    <ResponseField name="provenance" type="object | null">
      <Expandable title="Properties">
        <ResponseField name="target" type="string">
          Values: `master`, `stem`, `layer`.
        </ResponseField>

        <ResponseField name="targetStemId" type="string | null" />

        <ResponseField name="region" type="object | null">
          <Expandable title="Properties">
            <ResponseField name="start" type="number" required>
              Start on the song timeline, in seconds. Minimum: `0`.
            </ResponseField>

            <ResponseField name="end" type="number" required>
              End on the song timeline, in seconds. Must exceed start. Minimum: `0`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="regions" type="object[]">
          <Expandable title="Properties">
            <ResponseField name="start" type="number" required>
              Start on the song timeline, in seconds. Minimum: `0`.
            </ResponseField>

            <ResponseField name="end" type="number" required>
              End on the song timeline, in seconds. Must exceed start. Minimum: `0`.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="audioOffset" type="number">
          Source-buffer offset for the eligible section, in seconds.
        </ResponseField>

        <ResponseField name="outputDuration" type="number | null" />

        <ResponseField name="mergedInto" type="string" />

        <ResponseField name="layerName" type="string" />
      </Expandable>
    </ResponseField>

    <ResponseField name="created_at" type="string" />
  </Expandable>
</ResponseField>

<ResponseField name="audioUrl" type="string" />

<ResponseField name="audioUrls" type="string[]" />

<ResponseField name="stems" type="object[]">
  <Expandable title="Properties">
    <ResponseField name="id" type="string" required />

    <ResponseField name="song_id" type="string" required />

    <ResponseField name="name" type="string" required />

    <ResponseField name="url" type="string" required />

    <ResponseField name="volume" type="number">
      Linear gain, 1 is unity. Minimum: `0`.
    </ResponseField>

    <ResponseField name="pan" type="number">
      Range: `-1` to `1`.
    </ResponseField>

    <ResponseField name="is_muted" type="boolean" />

    <ResponseField name="is_solo" type="boolean" />

    <ResponseField name="waveform_peaks_url" type="string | null" />

    <ResponseField name="created_at" type="string" />
  </Expandable>
</ResponseField>

<ResponseField name="versionState" type="string">
  Candidate state. Initially pending; later reads can report merged or discarded. Values: `pending`, `merged`, `discarded`.
</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. |
| `403` | Account does not match resource. |
| `404` | Resource not found. |
| `409` | Resource conflict; reload state or open an editable version. |
| `500` | Request failed. |

<RequestExample>
  ```bash cURL theme={null}
  curl --fail-with-body -X GET "$RAWCHUNKS_API/api/editing/status/$(jq -nr --arg v "$TASK_ID" '$v|@uri')?songId=$(jq -nr --arg v "$SONG_ID" '$v|@uri')&userAddress=$(jq -nr --arg v "$USER_ADDRESS" '$v|@uri')&task=$(jq -nr --arg v "$TASK" '$v|@uri')" \
    -H "x-session-user-address: $USER_ADDRESS"
  ```
</RequestExample>


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