Fency.ai
Sessions

Create stream session

POST
/v1/sessions

Create a session for real-time streaming. Use the returned clientToken with FencyProvider via fetchCreateStreamClientToken.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/sessions" \  -H "Content-Type: application/json" \  -d '{    "createStream": {}  }'
{  "id": "example-session-id",  "createdAt": "2024-04-08T17:02:27.887295Z",  "type": "CREATE_STREAM",  "clientToken": "client token"}