Skip to content
Hayonix

API reference · Schema

ServerlessJobStream

  • objectstringrequired

    Always `serverless_job_stream`: the type of this object

    One ofserverless_job_stream

  • job_idstringrequired

    ID of the job

  • attemptintegerrequired

    Chunks belong to this attempt; after a retry the stream starts over

  • statestringrequired

    The job's state (see `ServerlessJob.state`)

  • chunksarray of objectrequired

    Up to 200 chunks, in order

    Show 3 fields of chunks
    • seqintegerrequired

      Position of the chunk in the attempt, increasing

    • dataany JSON

      Details; their shape depends on the kind of entry

    • created_atstring (date-time)required

      When it was created (ISO 8601, UTC)

  • next_afterintegerrequired

    Pass as `after` to read the following chunks (unchanged when none arrived)

  • donebooleanrequired

    True when the job has finished and every chunk has been returned

Example
{
  "object": "serverless_job_stream",
  "job_id": "string",
  "attempt": 1,
  "state": "string",
  "chunks": [
    {
      "seq": 1,
      "data": {},
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "next_after": 1,
  "done": true
}

Used by