{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}
{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}
{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}
Realtime sessions
End a session
Terminate a session immediately. Idempotent: calling on an already-terminal session returns 200 with the existing state. The session transitions to canceled if it had not yet started, or ending (then ended once the worker drains) if it was running.
{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}
{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}
{
"error": {
"code": "transport.unsupported",
"message": "transport.type=pipecat is not supported",
"param": "transport.type",
"request_id": "req_01HXY5K8E7QYG3X8Z6N9R7S0VR",
"type": "invalid_request"
}
}
Authorizations
Authorization
string
header
required
Production API key created at https://app.protoface.com for https://api.protoface.com; no activation step or environment switch. Pass the full secret shown once at creation as Authorization: Bearer sk_live_…, not the short dashboard identifier. HTTP 401 missing_authorization means the header did not parse; the key was not looked up. A token that passes parsing can return api_key.unknown, api_key.revoked, api_key.expired, or api_key.environment. See https://docs.protoface.com/reference/errors#authentication-codes.
Headers
X-Protoface-Session-Grant
string | null
Path Parameters
session_id
string
required
sess_… prefixed ULID.
Response
Successful Response
Public session resource — what GET /v1/sessions/{id} returns.
avatar_id
string
required
created_at
string<date-time>
required
id
string
required
sess_… prefixed ULID.
idle_timeout_seconds
integer
required
max_duration_seconds
integer
required
metadata
object
required
Show child attributes
quality
enum<string>
required
Video output quality tier: standard for SD (default on all plans) or high for 1080p HD on LiveKit sessions (requires a Launch, Scale, or Enterprise plan).
Available options:
standard,
high
status
enum<string>
required
Public session lifecycle.
Terminal states are ended, failed, canceled. ending is the
graceful-drain state while a worker finishes publishing in-flight frames.
Available options:
created,
queued,
starting,
running,
ending,
ended,
failed,
canceled
transport
LiveKitTransportConfig · object
required
BYO LiveKit transport.
The customer owns the room and mints worker_token; we never touch
their LiveKit API key or secret. The worker publishes
protoface-avatar video and protoface-avatar-audio output tracks.
In track mode, call the lk.clear_buffer RPC for barge-in after
stopping or clearing the upstream audio publisher.
Service that created the session. Use this to group usage reporting.
Available options:
api,
playground,
embed,
share,
public_demo,
pipecat,
agora,
video_generation
ended_at
string<date-time> | null
failed_at
string<date-time> | null
failure
SessionFailure · object | null
Populated when Session.status == failed.
Show child attributes
first_frame_at
string<date-time> | null
Set on session.first_frame.
object
string
default:session
Allowed value: "session"
started_at
string<date-time> | null
Set when worker emits session.starting.
usage
SessionUsage · object
Live usage counters embedded in the Session resource.
Eventually-consistent — lags the latest worker heartbeat by up to
one interval. Canonical billing data lives in UsageEvent.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Protoface","description":"The cheapest generative AI models and realtime avatars behind one API.","colors":{"primary":"#0c0d0e","light":"#fcfbfa","dark":"#0c0d0e"},"logo":{"light":"https://mintcdn.com/protoface/0sRnVmC0OnqZjnYE/images/brand/protoface-logo-light.png?fit=max\u0026auto=format\u0026n=0sRnVmC0OnqZjnYE\u0026q=85\u0026s=501a5ac654ad07dc00bfd5417b35e3f0","dark":"https://mintcdn.com/protoface/0sRnVmC0OnqZjnYE/images/brand/protoface-logo-dark.png?fit=max\u0026auto=format\u0026n=0sRnVmC0OnqZjnYE\u0026q=85\u0026s=bf25c59b3388515c399c26921607f406","href":"https://protoface.com"},"favicon":{"light":"https://mintcdn.com/protoface/wtuuUc7hzJcfLXHn/images/brand/protoface-mark-ink.png?fit=max\u0026auto=format\u0026n=wtuuUc7hzJcfLXHn\u0026q=85\u0026s=1358b6561c39bf28baf7510b8ba8fd78","dark":"https://mintcdn.com/protoface/wtuuUc7hzJcfLXHn/images/brand/protoface-mark-white.png?fit=max\u0026auto=format\u0026n=wtuuUc7hzJcfLXHn\u0026q=85\u0026s=b04ec8c7ea7f4e0c4a195f8fc3c437c4"},"api":{"openapi":"openapi.json","playground":{"display":"none"},"examples":{"defaults":"required","languages":["curl","python","javascript"],"prefill":true,"autogenerate":true},"url":"full"},"appearance":{"default":"light","strict":false},"navbar":{"links":[{"href":"https://protoface.discourse.group","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.protoface.com"}},"icons":{"library":"lucide"},"contextual":{"options":["copy","chatgpt","claude","cursor","vscode","download-spec"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Main Site","icon":"globe","href":"https://protoface.com"},{"anchor":"Dashboard","icon":"layout-dashboard","href":"https://app.protoface.com"},{"anchor":"Examples","icon":"github","href":"https://github.com/protoface-ai/protoface-quickstart"},{"anchor":"Support","icon":"life-buoy","href":"https://protoface.discourse.group/"},{"anchor":"Status","icon":"activity","href":"https://status.protoface.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"protoface","hasAudioNarration":false,"actualSubdomain":"protoface","customDomains":["docs.protoface.com"],"gitSource":{"type":"github","owner":"protoface-ai","repo":"protoface-docs","deployBranch":"master","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10f1719ffae5051c417cd5"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b12841c3b98091e75352dc3","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"API Reference","count":29},{"language":"default","tag":"Docs","count":22},{"language":"default","tag":"Model inference","count":10},{"language":"default","tag":"Inference","count":7},{"language":"default","tag":"Realtime","count":7},{"language":"default","tag":"Avatars","count":6},{"language":"default","tag":"Assets","count":5},{"language":"default","tag":"Realtime sessions","count":5},{"language":"default","tag":"Reference","count":4},{"language":"default","tag":"Account and platform","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/sessions/end-a-session","slug":"/api-reference/sessions/end-a-session","pageMetadata":{"title":"End a session","description":"Terminate a session immediately. Idempotent: calling on an already-terminal session returns 200 with the existing state. The session transitions to `canceled` if it had not yet started, or `ending` (then `ended` once the worker drains) if it was running.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/sessions/{session_id}/end","href":"/api-reference/sessions/end-a-session","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Terminate a session immediately. Idempotent: calling on an already-terminal session returns 200 with the existing state. The session transitions to \", _jsx(_components.code, {\n children: \"canceled\"\n }), \" if it had not yet started, or \", _jsx(_components.code, {\n children: \"ending\"\n }), \" (then \", _jsx(_components.code, {\n children: \"ended\"\n }), \" once the worker drains) if it was running.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"End a session","description":"Terminate a session immediately. Idempotent: calling on an already-terminal session returns 200 with the existing state. The session transitions to `canceled` if it had not yet started, or `ending` (then `ended` once the worker drains) if it was running.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/sessions/{session_id}/end","href":"/api-reference/sessions/end-a-session","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Terminate a session immediately. Idempotent: calling on an already-terminal session returns 200 with the existing state. The session transitions to `canceled` if it had not yet started, or `ending` (then `ended` once the worker drains) if it was running.","operationId":"end_session","parameters":["9a5f2941-5868-4fb5-b3df-5081916b63f2","0b71253c-7f74-4c40-891a-0e42d10714a4"],"responses":{"200":"11fc6bd8-bb12-4f1f-8519-60e6551d661f","401":"c627ff13-f656-4b3d-8098-99326abaf03e","404":"8b6bb051-f0db-4b2b-b665-aa0233e8e0e4","422":"70f21799-91a6-4c8c-beee-1ffcd6fbd569"},"security":["342f4742-b116-4c9d-9e2d-bd78d3b66faf"],"summary":"End a session","tags":["sessions"],"method":"post","type":"path","servers":["77bec806-8b5c-4476-84a6-e3c07cab81e5"],"path":"/v1/sessions/{session_id}/end","baseUrlOptions":["https://api.protoface.com"],"title":"End a session","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[],"urlDisplay":"full"},"dependencies":{"parameters":{"9a5f2941-5868-4fb5-b3df-5081916b63f2":{"description":"`sess_…` prefixed ULID.","in":"path","name":"session_id","required":true,"schema":{"description":"`sess_…` prefixed ULID.","title":"Session Id","type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"0b71253c-7f74-4c40-891a-0e42d10714a4":{"in":"header","name":"X-Protoface-Session-Grant","required":false,"schema":{"oneOf":[{"type":"string","title":"X-Protoface-Session-Grant","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"X-Protoface-Session-Grant","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}}},"responses":{"11fc6bd8-bb12-4f1f-8519-60e6551d661f":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Public session resource — what `GET /v1/sessions/{id}` returns.","examples":[{"avatar_id":"av_stock_001","billing_surface":"api","created_at":"2026-05-25T19:00:00.123Z","first_frame_at":"2026-05-25T19:00:02.001Z","id":"sess_01HXY5K8E7QYG3X8Z6N9R7S0VR","idle_timeout_seconds":30,"max_duration_seconds":600,"metadata":{"customer_session_id":"abc123"},"object":"session","quality":"standard","started_at":"2026-05-25T19:00:01.456Z","status":"running","transport":{"audio_source":"data_stream","room_name":"demo-room","type":"livekit","url":"wss://my-app.livekit.cloud"},"usage":{"billable_seconds":12,"frames":300}}],"properties":{"avatar_id":{"type":"string","isRequired":true,"uniqueKey":"avatar_id","typeLabel":"string"},"created_at":{"format":"date-time","type":"string","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"id":{"description":"`sess_…` prefixed ULID.","type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"idle_timeout_seconds":{"type":"integer","isRequired":true,"uniqueKey":"idle_timeout_seconds","typeLabel":"integer"},"max_duration_seconds":{"type":"integer","isRequired":true,"uniqueKey":"max_duration_seconds","typeLabel":"integer"},"metadata":{"additionalProperties":{"oneOf":[{"type":"string","uniqueKey":"metadata.additionalProperties.oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"metadata.additionalProperties.oneOf.1","typeLabel":"integer"},{"type":"number","uniqueKey":"metadata.additionalProperties.oneOf.2","typeLabel":"number"},{"type":"boolean","uniqueKey":"metadata.additionalProperties.oneOf.3","typeLabel":"boolean"},{"type":"null","uniqueKey":"metadata.additionalProperties.oneOf.4","typeLabel":"null"}],"uniqueKey":"metadata.additionalProperties","typeLabel":"string | integer | number | boolean | null"},"type":"object","isRequired":true,"uniqueKey":"metadata","typeLabel":"object"},"quality":{"description":"Video output quality tier: `standard` for SD (default on all plans) or `high` for 1080p HD on LiveKit sessions (requires a Launch, Scale, or Enterprise plan).","enum":["standard","high"],"title":"QualityTier","type":"string","isRequired":true,"uniqueKey":"quality","typeLabel":"enum\u003cstring>"},"status":{"description":"Public session lifecycle.\n\nTerminal states are `ended`, `failed`, `canceled`. `ending` is the\ngraceful-drain state while a worker finishes publishing in-flight frames.","enum":["created","queued","starting","running","ending","ended","failed","canceled"],"title":"SessionStatus","type":"string","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"transport":{"oneOf":[{"type":"object","title":"LiveKitTransportConfig","description":"BYO LiveKit transport.\n\nThe customer owns the room and mints `worker_token`; we never touch\ntheir LiveKit API key or secret. The worker publishes\n`protoface-avatar` video and `protoface-avatar-audio` output tracks.\n\nIn `track` mode, call the `lk.clear_buffer` RPC for barge-in after\nstopping or clearing the upstream audio publisher.","required":["url","room_name","worker_token"],"example":{"audio_source":"data_stream","room_name":"demo-room","type":"livekit","url":"wss://my-app.livekit.cloud"},"properties":{"room_name":{"description":"Name of the LiveKit room the worker should join.","type":"string","isRequired":true,"uniqueKey":"transport.oneOf.0.room_name","typeLabel":"string"},"url":{"description":"Customer's LiveKit URL, e.g. `wss://my-app.livekit.cloud`.","type":"string","isRequired":true,"uniqueKey":"transport.oneOf.0.url","typeLabel":"string"},"audio_source":{"description":"How the worker receives audio. Track input is statefully converted to 16 kHz mono PCM. See LiveKitAudioSource.","enum":["data_stream","track"],"title":"LiveKitAudioSource","type":"string","default":"data_stream","uniqueKey":"transport.oneOf.0.audio_source","typeLabel":"enum\u003cstring>"},"subscribe_to_identity":{"oneOf":[{"type":"string","description":"When `audio_source=track`, pin to this participant. If omitted, the first audio publisher is pinned for the session. Ignored otherwise.","uniqueKey":"transport.oneOf.0.subscribe_to_identity.oneOf.0","typeLabel":"string"},{"type":"null","description":"When `audio_source=track`, pin to this participant. If omitted, the first audio publisher is pinned for the session. Ignored otherwise.","uniqueKey":"transport.oneOf.0.subscribe_to_identity.oneOf.1","typeLabel":"null"}],"uniqueKey":"transport.oneOf.0.subscribe_to_identity","typeLabel":"string | null"},"synthetic_audio_if_no_input":{"default":false,"description":"If True and no participant joins within 10 s, the worker falls back to a synthetic sine generator. Demo aid only; default off.","type":"boolean","uniqueKey":"transport.oneOf.0.synthetic_audio_if_no_input","typeLabel":"boolean"},"type":{"const":"livekit","default":"livekit","type":"string","uniqueKey":"transport.oneOf.0.type","typeLabel":"string"},"worker_identity":{"default":"protoface-worker","description":"Identity the worker presents inside the room.","type":"string","uniqueKey":"transport.oneOf.0.worker_identity","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"transport.oneOf.0","typeLabel":"LiveKitTransportConfig · object"},{"type":"object","title":"WebSocketTransportConfig","description":"Reserved — raw WebSocket transport. **Not yet available.**\n\nListed in the schema so existing clients keep parsing future responses,\nbut `POST /v1/sessions` rejects it today with\n`invalid_request` / `code=transport.unsupported`.","properties":{"type":{"const":"websocket","default":"websocket","type":"string","uniqueKey":"transport.oneOf.1.type","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"transport.oneOf.1","typeLabel":"WebSocketTransportConfig · object"},{"type":"object","title":"PipecatTransportConfig","description":"Reserved — BYO Pipecat transport.\n\n`POST /v1/sessions` still rejects `transport.type=pipecat`; use\n`POST /v1/pipecat/sessions` for the Protoface Pipecat video service.","properties":{"type":{"const":"pipecat","default":"pipecat","type":"string","uniqueKey":"transport.oneOf.2.type","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"transport.oneOf.2","typeLabel":"PipecatTransportConfig · object"}],"isRequired":true,"uniqueKey":"transport","typeLabel":"LiveKitTransportConfig · object | WebSocketTransportConfig · object | PipecatTransportConfig · object"},"billing_surface":{"description":"Service that created the session. Use this to group usage reporting.","enum":["api","playground","embed","share","public_demo","pipecat","agora","video_generation"],"title":"BillingSurface","type":"string","default":"api","uniqueKey":"billing_surface","typeLabel":"enum\u003cstring>"},"ended_at":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","uniqueKey":"ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"ended_at","typeLabel":"string\u003cdate-time> | null"},"failed_at":{"oneOf":[{"type":"string","format":"date-time","uniqueKey":"failed_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","uniqueKey":"failed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"failed_at","typeLabel":"string\u003cdate-time> | null"},"failure":{"oneOf":[{"type":"object","title":"SessionFailure","description":"Populated when `Session.status == failed`.","required":["code","message"],"properties":{"code":{"description":"Stable lower_snake_case subcode.","type":"string","isRequired":true,"uniqueKey":"failure.oneOf.0.code","typeLabel":"string"},"message":{"description":"Human-readable summary; not stable.","type":"string","isRequired":true,"uniqueKey":"failure.oneOf.0.message","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"failure.oneOf.0","typeLabel":"SessionFailure · object"},{"type":"null","uniqueKey":"failure.oneOf.1","typeLabel":"null"}],"uniqueKey":"failure","typeLabel":"SessionFailure · object | null"},"first_frame_at":{"oneOf":[{"type":"string","description":"Set on `session.first_frame`.","format":"date-time","uniqueKey":"first_frame_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"Set on `session.first_frame`.","uniqueKey":"first_frame_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"first_frame_at","typeLabel":"string\u003cdate-time> | null"},"object":{"const":"session","default":"session","type":"string","uniqueKey":"object","typeLabel":"string"},"started_at":{"oneOf":[{"type":"string","description":"Set when worker emits `session.starting`.","format":"date-time","uniqueKey":"started_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"Set when worker emits `session.starting`.","uniqueKey":"started_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"started_at","typeLabel":"string\u003cdate-time> | null"},"usage":{"additionalProperties":false,"description":"Live usage counters embedded in the Session resource.\n\nEventually-consistent — lags the latest worker heartbeat by up to\none interval. Canonical billing data lives in `UsageEvent`.","properties":{"billable_seconds":{"minimum":0,"type":"integer","isRequired":true,"uniqueKey":"usage.billable_seconds","typeLabel":"integer"},"frames":{"minimum":0,"type":"integer","isRequired":true,"uniqueKey":"usage.frames","typeLabel":"integer"}},"required":["billable_seconds","frames"],"title":"SessionUsage","type":"object","uniqueKey":"usage","typeLabel":"SessionUsage · object"}},"required":["id","status","avatar_id","transport","quality","max_duration_seconds","idle_timeout_seconds","metadata","created_at"],"title":"Session","type":"object","uniqueKey":"","typeLabel":"Session · object"},"examples":{"Example":{"title":"Example","value":{"avatar_id":"av_stock_001","billing_surface":"api","created_at":"2026-05-25T19:00:00.123Z","first_frame_at":"2026-05-25T19:00:02.001Z","id":"sess_01HXY5K8E7QYG3X8Z6N9R7S0VR","idle_timeout_seconds":30,"max_duration_seconds":600,"metadata":{"customer_session_id":"abc123"},"object":"session","quality":"standard","started_at":"2026-05-25T19:00:01.456Z","status":"running","transport":{"audio_source":"data_stream","room_name":"demo-room","type":"livekit","url":"wss://my-app.livekit.cloud"},"usage":{"billable_seconds":12,"frames":300}}}},"exampleType":"generated"}},"description":"Successful Response","exampleType":"generated"},"c627ff13-f656-4b3d-8098-99326abaf03e":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Wire format for every non-2xx public API response.","examples":[{"error":{"code":"transport.unsupported","message":"transport.type=pipecat is not supported","param":"transport.type","request_id":"req_01HXY5K8E7QYG3X8Z6N9R7S0VR","type":"invalid_request"}}],"properties":{"error":{"additionalProperties":false,"description":"Concrete error returned inside `ApiErrorEnvelope.error`.","properties":{"code":{"description":"Stable machine-readable subcode (lower_snake_case). SDKs should switch on this, not `message`.","type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"description":"Human-readable summary. Not stable; do not parse.","type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"description":"Echo of the `X-Request-Id` response header for support.","type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"type":{"description":"Top-level error categories. Maps roughly to HTTP status.\n\n`code` (a free-form lower_snake_case string on `ApiError`) is the\nmachine-readable subcode SDKs should switch on; `type` is the broad\ncategory.","enum":["invalid_request","authentication","permission","not_found","conflict","unprocessable","rate_limit","quota_exceeded","internal","service_unavailable"],"title":"ErrorType","type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request field (dot-path), if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request field (dot-path), if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"required":["type","code","message","request_id"],"title":"ApiError","type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"ApiError · object"}},"required":["error"],"title":"ApiErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ApiErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"transport.unsupported","message":"transport.type=pipecat is not supported","param":"transport.type","request_id":"req_01HXY5K8E7QYG3X8Z6N9R7S0VR","type":"invalid_request"}}}},"exampleType":"generated"}},"description":"Missing or invalid API key.","exampleType":"generated"},"8b6bb051-f0db-4b2b-b665-aa0233e8e0e4":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Wire format for every non-2xx public API response.","examples":[{"error":{"code":"transport.unsupported","message":"transport.type=pipecat is not supported","param":"transport.type","request_id":"req_01HXY5K8E7QYG3X8Z6N9R7S0VR","type":"invalid_request"}}],"properties":{"error":{"additionalProperties":false,"description":"Concrete error returned inside `ApiErrorEnvelope.error`.","properties":{"code":{"description":"Stable machine-readable subcode (lower_snake_case). SDKs should switch on this, not `message`.","type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"description":"Human-readable summary. Not stable; do not parse.","type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"description":"Echo of the `X-Request-Id` response header for support.","type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"type":{"description":"Top-level error categories. Maps roughly to HTTP status.\n\n`code` (a free-form lower_snake_case string on `ApiError`) is the\nmachine-readable subcode SDKs should switch on; `type` is the broad\ncategory.","enum":["invalid_request","authentication","permission","not_found","conflict","unprocessable","rate_limit","quota_exceeded","internal","service_unavailable"],"title":"ErrorType","type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request field (dot-path), if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request field (dot-path), if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"required":["type","code","message","request_id"],"title":"ApiError","type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"ApiError · object"}},"required":["error"],"title":"ApiErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ApiErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"transport.unsupported","message":"transport.type=pipecat is not supported","param":"transport.type","request_id":"req_01HXY5K8E7QYG3X8Z6N9R7S0VR","type":"invalid_request"}}}},"exampleType":"generated"}},"description":"No session with that id.","exampleType":"generated"},"70f21799-91a6-4c8c-beee-1ffcd6fbd569":{"content":{"application/json":{"schema":{"additionalProperties":false,"description":"Wire format for every non-2xx public API response.","examples":[{"error":{"code":"transport.unsupported","message":"transport.type=pipecat is not supported","param":"transport.type","request_id":"req_01HXY5K8E7QYG3X8Z6N9R7S0VR","type":"invalid_request"}}],"properties":{"error":{"additionalProperties":false,"description":"Concrete error returned inside `ApiErrorEnvelope.error`.","properties":{"code":{"description":"Stable machine-readable subcode (lower_snake_case). SDKs should switch on this, not `message`.","type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"description":"Human-readable summary. Not stable; do not parse.","type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"description":"Echo of the `X-Request-Id` response header for support.","type":"string","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"type":{"description":"Top-level error categories. Maps roughly to HTTP status.\n\n`code` (a free-form lower_snake_case string on `ApiError`) is the\nmachine-readable subcode SDKs should switch on; `type` is the broad\ncategory.","enum":["invalid_request","authentication","permission","not_found","conflict","unprocessable","rate_limit","quota_exceeded","internal","service_unavailable"],"title":"ErrorType","type":"string","isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"param":{"oneOf":[{"type":"string","description":"Offending request field (dot-path), if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","description":"Offending request field (dot-path), if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"}},"required":["type","code","message","request_id"],"title":"ApiError","type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"ApiError · object"}},"required":["error"],"title":"ApiErrorEnvelope","type":"object","uniqueKey":"","typeLabel":"ApiErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"transport.unsupported","message":"transport.type=pipecat is not supported","param":"transport.type","request_id":"req_01HXY5K8E7QYG3X8Z6N9R7S0VR","type":"invalid_request"}}}},"exampleType":"generated"}},"description":"Request body or parameters failed validation.","exampleType":"generated"}},"security":{"342f4742-b116-4c9d-9e2d-bd78d3b66faf":{"ApiKey":{"bearerFormat":"sk_live_*","description":"Production API key created at https://app.protoface.com for https://api.protoface.com; no activation step or environment switch. Pass the full secret shown once at creation as `Authorization: Bearer sk_live_…`, not the short dashboard identifier. HTTP 401 `missing_authorization` means the header did not parse; the key was not looked up. A token that passes parsing can return `api_key.unknown`, `api_key.revoked`, `api_key.expired`, or `api_key.environment`. See https://docs.protoface.com/reference/errors#authentication-codes.","scheme":"bearer","type":"http","scopes":[],"schemeName":"ApiKey"}}},"servers":{"77bec806-8b5c-4476-84a6-e3c07cab81e5":{"description":"Production","url":"https://api.protoface.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"bearerFormat":"sk_live_*","description":"Production API key created at https://app.protoface.com for https://api.protoface.com; no activation step or environment switch. Pass the full secret shown once at creation as `Authorization: Bearer sk_live_…`, not the short dashboard identifier. HTTP 401 `missing_authorization` means the header did not parse; the key was not looked up. A token that passes parsing can return `api_key.unknown`, `api_key.revoked`, `api_key.expired`, or `api_key.environment`. See https://docs.protoface.com/reference/errors#authentication-codes.","scheme":"bearer","type":"http","scopes":[],"schemeName":"ApiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Production API key created at https://app.protoface.com for https://api.protoface.com; no activation step or environment switch. Pass the full secret shown once at creation as `Authorization: Bearer sk_live_…`, not the short dashboard identifier. HTTP 401 `missing_authorization` means the header did not parse; the key was not looked up. A token that passes parsing can return `api_key.unknown`, `api_key.revoked`, `api_key.expired`, or `api_key.environment`. See https://docs.protoface.com/reference/errors#authentication-codes.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKey","name":"Authorization"}],"title":"ApiKey"}]},"originalFileLocation":"openapi.json"},"subdomain":"protoface","siteName":"Protoface","title":"End a session - Protoface","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-24T03:21:52.154Z","originalFileLocation":"api-reference/sessions/end-a-session.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Terminate a session immediately. Idempotent: calling on an already-terminal session returns 200 with the existing state. The session transitions to canceled if it had not yet started, or ending (then ended once the worker drains) if it was running.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Protoface\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/protoface/kNGwZF1tnFO2BlVn/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/protoface/kNGwZF1tnFO2BlVn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/protoface/kNGwZF1tnFO2BlVn/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/protoface/kNGwZF1tnFO2BlVn/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/protoface/kNGwZF1tnFO2BlVn/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/protoface/kNGwZF1tnFO2BlVn/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/protoface/kNGwZF1tnFO2BlVn/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/protoface/kNGwZF1tnFO2BlVn/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/protoface/kNGwZF1tnFO2BlVn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"End a session - Protoface\">\u003cmeta data-mint-head property=\"og:description\" content=\"Terminate a session immediately. Idempotent: calling on an already-terminal session returns 200 with the existing state. The session transitions to canceled if it had not yet started, or ending (then ended once the worker drains) if it was running.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Protoface\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.protoface.com/api-reference/sessions/end-a-session\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://protoface.mintlify.site/_mintlify/api/og/v2?division=Realtime+sessions\u0026amp;title=End+a+session\u0026amp;description=Terminate+a+session+immediately.+Idempotent%3A+calling+on+an+already-terminal+session+returns+200+with+the+existing+state.+The+session+transitions+to+%60canceled%60+i\u0026amp;theme=319539acc2bc75b8fb8478e0\u0026amp;signature=245878042caa4d718b251b179f768656606fea4002941780629cb41a0c6f15c1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"End a session - Protoface\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Terminate a session immediately. Idempotent: calling on an already-terminal session returns 200 with the existing state. The session transitions to canceled if it had not yet started, or ending (then ended once the worker drains) if it was running.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://protoface.mintlify.site/_mintlify/api/og/v2?division=Realtime+sessions\u0026amp;title=End+a+session\u0026amp;description=Terminate+a+session+immediately.+Idempotent%3A+calling+on+an+already-terminal+session+returns+200+with+the+existing+state.+The+session+transitions+to+%60canceled%60+i\u0026amp;theme=319539acc2bc75b8fb8478e0\u0026amp;signature=245878042caa4d718b251b179f768656606fea4002941780629cb41a0c6f15c1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/protoface/kNGwZF1tnFO2BlVn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Protoface\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0c0d0e\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.protoface.com/api-reference/sessions/end-a-session\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/sessions/end-a-session.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.protoface.com/#organization\",\"name\":\"Protoface\",\"url\":\"https://docs.protoface.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/protoface/0sRnVmC0OnqZjnYE/images/brand/protoface-logo-light.png?fit=max\u0026auto=format\u0026n=0sRnVmC0OnqZjnYE\u0026q=85\u0026s=501a5ac654ad07dc00bfd5417b35e3f0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.protoface.com#website\",\"name\":\"Protoface\",\"url\":\"https://docs.protoface.com\",\"publisher\":{\"@id\":\"https://docs.protoface.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.protoface.com/api-reference/sessions/end-a-session#webpage\",\"url\":\"https://docs.protoface.com/api-reference/sessions/end-a-session\",\"name\":\"End a session\",\"description\":\"Terminate a session immediately. Idempotent: calling on an already-terminal session returns 200 with the existing state. The session transitions to canceled if it had not yet started, or ending (then ended once the worker drains) if it was running.\",\"dateModified\":\"2026-11-24T03:21:52.154Z\",\"isPartOf\":{\"@id\":\"https://docs.protoface.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.protoface.com/api-reference/sessions/end-a-session#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.protoface.com/api-reference/sessions/end-a-session#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Realtime sessions\",\"item\":\"https://docs.protoface.com/api-reference/pipecat/create-a-pipecat-avatar-media-session\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"End a session\",\"item\":\"https://docs.protoface.com/api-reference/sessions/end-a-session\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.protoface.com/api-reference/sessions/end-a-session#apireference\",\"headline\":\"End a session\",\"name\":\"End a session\",\"description\":\"Terminate a session immediately. Idempotent: calling on an already-terminal session returns 200 with the existing state. The session transitions to canceled if it had not yet started, or ending (then ended once the worker drains) if it was running.\",\"url\":\"https://docs.protoface.com/api-reference/sessions/end-a-session\",\"mainEntityOfPage\":{\"@id\":\"https://docs.protoface.com/api-reference/sessions/end-a-session#webpage\"},\"dateModified\":\"2026-11-24T03:21:52.154Z\",\"publisher\":{\"@id\":\"https://docs.protoface.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.protoface.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Protoface\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Protoface\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/sessions/end-a-session.md","siteName":"Protoface","nav":{"global":{"anchors":[{"anchor":"Main Site","icon":"globe","href":"https://protoface.com"},{"anchor":"Dashboard","icon":"layout-dashboard","href":"https://app.protoface.com"},{"anchor":"Examples","icon":"github","href":"https://github.com/protoface-ai/protoface-quickstart"},{"anchor":"Support","icon":"life-buoy","href":"https://protoface.discourse.group/"},{"anchor":"Status","icon":"activity","href":"https://status.protoface.com"}]},"tabs":[{"tab":"Docs","icon":"book-open","pages":[{"title":"Docs","href":""}]},{"tab":"API Reference","icon":"square-terminal","pages":[{"title":"API Reference","href":"/api-reference"},{"group":"Model inference","pages":[{"title":"List models","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/models","href":"/api-reference/models/list-models"},{"title":"Retrieve a model","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/models/{model_id}","href":"/api-reference/models/retrieve-a-model"},{"title":"Submit a run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/run/{model_id}","href":"/api-reference/runs/submit-a-run"},{"title":"List runs","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/runs","href":"/api-reference/runs/list-runs"},{"title":"Retrieve a run","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/runs/{run_id}","href":"/api-reference/runs/retrieve-a-run"},{"title":"Poll run status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/runs/{run_id}/status","href":"/api-reference/runs/poll-run-status"},{"title":"List run events","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/runs/{run_id}/events","href":"/api-reference/runs/list-run-events"},{"title":"Cancel a run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/runs/{run_id}/cancel","href":"/api-reference/runs/cancel-a-run"},{"title":"Delete a run's content","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/runs/{run_id}","href":"/api-reference/runs/delete-a-runs-content"},{"title":"Retrieve a run deletion receipt","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/runs/{run_id}/deletion","href":"/api-reference/runs/retrieve-a-run-deletion-receipt"}]},{"group":"Assets","pages":[{"title":"Upload an asset","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/assets","href":"/api-reference/assets/upload-an-asset"},{"title":"List assets","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/assets","href":"/api-reference/assets/list-assets"},{"title":"Retrieve an asset","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/assets/{asset_id}","href":"/api-reference/assets/retrieve-an-asset"},{"title":"Retrieve asset content","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/assets/{asset_id}/content","href":"/api-reference/assets/retrieve-asset-content"},{"title":"Delete an asset","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/assets/{asset_id}","href":"/api-reference/assets/delete-an-asset"}]},{"group":"Avatars","pages":[{"title":"List avatars","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/avatars","href":"/api-reference/avatars/list-avatars"},{"title":"Create a custom avatar from an image","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/avatars","href":"/api-reference/avatars/create-a-custom-avatar-from-an-image"},{"title":"Retrieve an avatar","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/avatars/{avatar_id}","href":"/api-reference/avatars/retrieve-an-avatar"},{"title":"Delete an avatar","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/avatars/{avatar_id}","href":"/api-reference/avatars/delete-an-avatar"}]},{"group":"Realtime sessions","pages":[{"title":"Create a Pipecat avatar media session","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/pipecat/sessions","href":"/api-reference/pipecat/create-a-pipecat-avatar-media-session"},{"title":"List sessions","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/sessions","href":"/api-reference/sessions/list-sessions"},{"title":"Create a session","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/sessions","href":"/api-reference/sessions/create-a-session"},{"title":"Retrieve a session","description":"Return the current state of a session, including timing and usage counters.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/sessions/{session_id}","href":"/api-reference/sessions/retrieve-a-session"},{"title":"End a session","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/sessions/{session_id}/end","href":"/api-reference/sessions/end-a-session"}]},{"group":"Account and platform","pages":[{"title":"List billing plans","description":"Return the current Protoface billing plan catalog. This endpoint is unauthenticated so signup and pricing UI can render the same catalog used by checkout and enforcement.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/billing/plans","href":"/api-reference/billing/list-billing-plans"},{"title":"Get quota limits","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/billing/quota","href":"/api-reference/billing/get-quota-limits"},{"title":"Get usage summary","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/usage","href":"/api-reference/usage/get-usage-summary"},{"title":"Platform status roll-up","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/status","href":"/api-reference/platform/platform-status-roll-up"}]}]}]},"basePath":"","title":"End a session - Protoface","deploymentId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","buildId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BuieBNTB.js","snippetPresets-alIv9Yoc.js","utils-BS41p-Nj.js","style-to-object-BY3JEAdk.js","utils-D0Za9LU_.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-Lx7TZ5XR.js","conditional-requirements-CFM0id0Q.js","cloneDeep-4e5CS5ZI.js","_Uint8Array-B2-W7EM3.js","isObject-FP1Yky1u.js","ApiExamples-sCe6z2hN.js","usePlaygroundInputsStore-cU_dFE5n.js","shallow-BwNCr__O.js","isEqual-Cnvzqd4L.js","CodeSnippets-CMIr49P8.js","CodeSnippet-BC-bKzyy.js","use-playground-group-access-c3bgmn-x.js","Page-Acw_JRP6.js","api-description-markdown-1o8U1kkQ.js","DynamicMarkdown-CvOkzads.js","SectionHeading-CJ97Kdt-.js","MethodPill-DynWltjQ.js","getPastedJson-CBCnXiWl.js","Check2Icon-CPHq_WNu.js","axios-CsQoIw0U.js","Markdown-4tjIF-hK.js","AssistantPageLink-BcChI7L3.js","dist-MIf_HGLZ.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}