Creates a persistent OpenCode chat session in a Modal sandbox. Session state is retained and can be resumed across requests.
curl --request POST \
--url https://api.case.dev/agent/v1/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"model": "<string>",
"idleTimeoutMs": 123
}
'{
"id": "<string>",
"status": "<string>",
"idleTimeoutMs": 123,
"createdAt": "2023-11-07T05:31:56Z"
}API key starting with sk_case_
Was this page helpful?
curl --request POST \
--url https://api.case.dev/agent/v1/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"model": "<string>",
"idleTimeoutMs": 123
}
'{
"id": "<string>",
"status": "<string>",
"idleTimeoutMs": 123,
"createdAt": "2023-11-07T05:31:56Z"
}