POST
POST /chatkit/sessions/{session_id}/cancel — OpenAI API
OpenAI API key (required); https://api.openai.com/v1
OpenAI APICancel a ChatKit session
- Base URL
- https://api.openai.com/v1
- Auth
- Authorization: Bearer <OPENAI_API_KEY>
- Last verified
- 2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 164 tokens · Vary: Accept
→ 164 tokens · Vary: Accept
Critical gotchas
The Responses API is the primary interface for new text and tool workflows; Chat Completions remains a separate compatibility API.
Audio transcription uploads use multipart form data rather than a JSON request body.
cURL
curl -X POST 'https://api.openai.com/v1/chatkit/sessions/cksess_123/cancel' \ -H "Authorization: Bearer $OPENAI_API_KEY"
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| session_id | path | string | Yes | Unique identifier for the ChatKit session to cancel. |
Response 200 OK
{
"id": "cksess_123",
"object": "chatkit.session",
"client_secret": "ek_token_123",
"expires_at": 1712349876,
"workflow": {
"id": "workflow_alpha",
"version": "2024-10-01",
"state_variables": {
"message": "hello"
},
"tracing": {
"enabled": true
}
},
"user": "user_789",
"rate_limits": {
"max_requests_per_1_minute": 60
},
"max_requests_per_1_minute": 60,
"status": "active",
"chatkit_configuration": {
"automatic_thread_titling": {
"enabled": true
},
"file_upload": {
"enabled": true,
"max_file_size": 16,
"max_files": 20
},
"history": {
"enabled": true,
"recent_threads": 10
}
}
} Get a free OpenAI API key → sponsored Affiliate link - we may earn a commission, at no extra cost to you.