Skip to main content
GET
/
api
/
v2
/
sessions
/
{id}
Retrieve a session
curl --request GET \
  --url https://agp.eu.hcompany.ai/api/v2/sessions/{id} \
  --header 'Authorization: Bearer <token>'
Retrieves the complete Session object, including the original request, current status, and execution metadata. Auth is optional: supports public shares. Returns the Session object if the ID is valid and you have access. Returns 404 otherwise.

Path parameters

id
string
required
The session ID returned when the session was created.

Examples

curl https://agp.eu.hcompany.ai/api/v2/sessions/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer $H_API_KEY"
Response
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "request": {
    "agent": "h/web-surfer-holo3-1-35b",
    "messages": [
      {"type": "user_message", "message": "Find the top 3 stories on Hacker News"}
    ]
  },
  "status": {
    "status": "completed",
    "error": null,
    "steps": 12,
    "usage_per_model": [
      {
        "name": "holo3-35b-a3b",
        "input_tokens": 24800,
        "output_tokens": 1420,
        "reasoning_tokens": 0
      }
    ],
    "subagent_session_ids": []
  },
  "created_at": "2026-05-07T14:30:00Z",
  "started_at": "2026-05-07T14:30:02Z",
  "finished_at": "2026-05-07T14:31:15Z"
}

Errors

StatusCause
404Session not found, or you don’t have access to it.
Use the status endpoint for polling. If you only need to know whether the session has finished, use GET /sessions/{id}/status instead. It’s lighter and faster.