Skip to main content
POST
/
agent
/
v1
/
chat
Create interactive chat session
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"
}

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Body

application/json
title
string

Optional human-readable session title

model
string | null

Optional model override for the OpenCode session

idleTimeoutMs
integer | null

Idle timeout before session is eligible for snapshot/termination. Defaults to 15 minutes.

Response

Chat session created

id
string
status
string
idleTimeoutMs
integer
createdAt
string<date-time>