Skip to main content
POST
/
api
/
v1
/
sessions
Create session (REQUESTED)
curl --request POST \
  --url https://api.luxxon.dev/api/v1/api/v1/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "lat": 4.66,
  "lng": -74.05,
  "maxDurationSeconds": 600,
  "workspaceId": "8c3a5b6f-1d2e-4f7a-9b8c-d1e2f3a4b5c6",
  "waitTimeoutSeconds": 300,
  "quoteId": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
}
'
{
  "statusCode": 200,
  "message": "Request successful",
  "data": {
    "id": "b1e2f3a4-5b6c-7d8e-9f0a-1b2c3d4e5f6a",
    "consumerWorkspaceId": "8c3a5b6f-1d2e-4f7a-9b8c-d1e2f3a4b5c6",
    "operatorWorkspaceId": "9d4b6c7f-2e3f-5a8b-0c1d-e2f3a4b5c6d7",
    "state": "REQUESTED",
    "maxDurationSeconds": 600,
    "waitTimeoutSeconds": 300,
    "ratePerSecondMicroUsdc": "1000",
    "holdMicroUsdc": "600000",
    "startedAt": null,
    "endedAt": null,
    "cleanSeconds": 0,
    "chargedMicroUsdc": "0",
    "settlementTxHash": null,
    "videoBackendRef": "6a7aab6e273b40251e8ee72d7ca05719",
    "createdAt": "2026-05-13T11:30:00.000Z",
    "requestedLat": 4.711234,
    "requestedLng": -74.072456,
    "authorized": false,
    "consistencyToken": "GgEAAAAA...",
    "whepUrl": "https://customer-CODE.cloudflarestream.com/UID/webRTC/play",
    "whipUrl": "https://customer-CODE.cloudflarestream.com/SECRETkUID/webRTC/publish"
  },
  "timestamp": "2026-05-13T12:00:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-lx-consistency-token
string

Body

application/json
lat
number
required
Example:

4.66

lng
number
required
Example:

-74.05

maxDurationSeconds
number
required

Upper bound on session duration in seconds.

Example:

600

workspaceId
string

Optional — defaults to the caller's workspace; required for wallet sessions if it disagrees.

Example:

"8c3a5b6f-1d2e-4f7a-9b8c-d1e2f3a4b5c6"

waitTimeoutSeconds
number

Seconds the consumer is willing to wait for media to start. After created_at + waitTimeoutSeconds with no first decoded frame, the session transitions to EXPIRED without a meter or settlement. Independent of maxDurationSeconds. Must satisfy 5 ≤ n ≤ 3600. Defaults to 300 (5 minutes).

Example:

300

quoteId
string

Optional pre-fetched LxPriceQuote id to lock the rate.

Example:

"a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"

Response

Request successful

statusCode
number
required
Example:

200

message
string
required
Example:

"Request successful"

data
object
required

Endpoint-specific payload. See the per-endpoint schema.

timestamp
string
required
Example:

"2026-05-13T12:00:00.000Z"