Skip to main content
POST
/
tasks
/
{task_id}
/
rehydrate
Rehydrate Task
curl --request POST \
  --url https://api.example.com/tasks/{task_id}/rehydrate \
  --header 'Content-Type: application/json' \
  --data '
{
  "task_id": "<string>",
  "messages": [
    {
      "task_id": "<string>",
      "content": {
        "content": "<string>",
        "type": "text",
        "style": "static",
        "format": "plain",
        "attachments": [
          {
            "file_id": "<string>",
            "name": "<string>",
            "size": 123,
            "type": "<string>"
          }
        ]
      },
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "task_states": [
    {
      "task_id": "<string>",
      "agent_id": "<string>",
      "state": {},
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "snapshot_url": "<string>"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

task_id
string
required

Body

application/json

Either provide inline content (messages + task_states) or a snapshot_url pointing at a presigned JSON download. Mixing both is rejected.

The inline form is the canonical shape used by export's GET response, so snapshot → clean → rehydrate round-trips cleanly without serialization changes.

task_id
string
required
messages
TaskMessageEntity · object[]
task_states
StateEntity · object[]
snapshot_url
string<uri> | null

Presigned GET URL whose body is a JSON-encoded TaskSnapshotEntity. Must be https; must resolve to a public address. When set, messages/task_states must be empty.

Required string length: 1 - 2083

Response

Successful Response