Skip to main content
POST
Create a WebSocket session

承認

Authorization
string
header
デフォルト:$CARTESIA_API_KEY
必須

Cartesia API key (sk_car_...). Get one at play.cartesia.ai/keys.

ヘッダー

Cartesia-Version
enum<string>
デフォルト:2026-08-14
必須

API version header.

利用可能なオプション:
2026-08-14
例:

"2026-08-14"

パスパラメータ

agent_id
string
必須

Unique identifier for the agent.

Minimum string length: 1

ボディ

application/json
dynamic_variables
object

Trusted values that Cartesia stores on the call and supplies to the agent.

config_overrides
object

Per-call overrides using the same field structure as agent configuration. Omitted fields use the agent's published configuration.

レスポンス

The pre-created call and its browser session token

call_id
string
必須

ID of the pre-created call. The session_ready event returns the same value.

url
string<uri>
必須

WebSocket URL for this agent. Append the returned session token as the access_token query parameter.

token
string
必須

Opaque, short-lived, single-use session token. Do not inspect or log it.

expires_at
string<date-time>
必須

Connection deadline, currently four minutes after creation. Use this timestamp rather than calculating the deadline.