Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create and manage video rooms for real-time video communication and conferencing. This skill provides JavaScript SDK examples.
.claude/skills/team-telnyx-telnyx-video-javascript/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 164% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 87% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 122% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 440% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 155% | 0% |
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
bashnpm install telnyx@6.74.2
javascriptimport Telnyx from 'telnyx'; const client = new Telnyx({ apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted });
All examples below assume client is already initialized as shown above.
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
javascripttry { const result = await client.messages.send({ to: '+13125550001', from: '+13125550002', text: 'Hello' }); } catch (err) { if (err instanceof Telnyx.APIConnectionError) { console.error('Network error — check connectivity and retry'); } else if (err instanceof Telnyx.RateLimitError) { // 429: rate limited — wait and retry with exponential backoff const retryAfter = err.headers?.['retry-after'] || 1; await new Promise(r => setTimeout(r, retryAfter * 1000)); } else if (err instanceof Telnyx.APIError) { console.error(`API error ${err.status}: ${err.message}`); if (err.status === 422) { console.error('Validation error — check required fields and formats'); } } }
Common error codes: 401 invalid API key, 403 insufficient permissions, 404 resource not found, 422 validation error (check field formats), 429 rate limited (retry with exponential backoff).
GET /room_compositions
javascript// Automatically fetches more pages as needed. for await (const roomComposition of client.roomCompositions.list()) { console.log(roomComposition.id); }
Returns: completed_at (date-time), created_at (date-time), download_url (string), duration_secs (integer), ended_at (date-time), format (enum: mp4), id (uuid), record_type (string), resolution (string), room_id (uuid), session_id (uuid), size_mb (float), started_at (date-time), status (enum: completed, enqueued, processing), updated_at (date-time), user_id (uuid), video_layout (object), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer)
Asynchronously create a room composition.
POST /room_compositions
Optional: format (string), resolution (string), session_id (uuid), video_layout (object), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer)
javascriptconst roomComposition = await client.roomCompositions.create(); console.log(roomComposition.data);
Returns: completed_at (date-time), created_at (date-time), download_url (string), duration_secs (integer), ended_at (date-time), format (enum: mp4), id (uuid), record_type (string), resolution (string), room_id (uuid), session_id (uuid), size_mb (float), started_at (date-time), status (enum: completed, enqueued, processing), updated_at (date-time), user_id (uuid), video_layout (object), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer)
GET /room_compositions/{room_composition_id}
javascriptconst roomComposition = await client.roomCompositions.retrieve( '5219b3af-87c6-4c08-9b58-5a533d893e21', ); console.log(roomComposition.data);
Returns: completed_at (date-time), created_at (date-time), download_url (string), duration_secs (integer), ended_at (date-time), format (enum: mp4), id (uuid), record_type (string), resolution (string), room_id (uuid), session_id (uuid), size_mb (float), started_at (date-time), status (enum: completed, enqueued, processing), updated_at (date-time), user_id (uuid), video_layout (object), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer)
Synchronously delete a room composition.
DELETE /room_compositions/{room_composition_id}
javascriptawait client.roomCompositions.delete('5219b3af-87c6-4c08-9b58-5a533d893e21');
GET /room_participants
javascript// Automatically fetches more pages as needed. for await (const roomParticipant of client.roomParticipants.list()) { console.log(roomParticipant.id); }
Returns: context (string), id (uuid), joined_at (date-time), left_at (date-time), record_type (string), session_id (uuid), updated_at (date-time)
GET /room_participants/{room_participant_id}
javascriptconst roomParticipant = await client.roomParticipants.retrieve( '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', ); console.log(roomParticipant.data);
Returns: context (string), id (uuid), joined_at (date-time), left_at (date-time), record_type (string), session_id (uuid), updated_at (date-time)
GET /room_recordings
javascript// Automatically fetches more pages as needed. for await (const roomRecordingListResponse of client.roomRecordings.list()) { console.log(roomRecordingListResponse.id); }
Returns: codec (string), completed_at (date-time), created_at (date-time), download_url (string), duration_secs (integer), ended_at (date-time), id (uuid), participant_id (uuid), record_type (string), room_id (uuid), session_id (uuid), size_mb (float), started_at (date-time), status (enum: completed, processing), type (enum: audio, video), updated_at (date-time)
DELETE /room_recordings
javascriptconst response = await client.roomRecordings.deleteBulk(); console.log(response.data);
Returns: room_recordings (integer)
GET /room_recordings/{room_recording_id}
javascriptconst roomRecording = await client.roomRecordings.retrieve('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0'); console.log(roomRecording.data);
Returns: codec (string), completed_at (date-time), created_at (date-time), download_url (string), duration_secs (integer), ended_at (date-time), id (uuid), participant_id (uuid), record_type (string), room_id (uuid), session_id (uuid), size_mb (float), started_at (date-time), status (enum: completed, processing), type (enum: audio, video), updated_at (date-time)
Synchronously delete a Room Recording.
DELETE /room_recordings/{room_recording_id}
javascriptawait client.roomRecordings.delete('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0');
GET /room_sessions
javascript// Automatically fetches more pages as needed. for await (const roomSession of client.rooms.sessions.list0()) { console.log(roomSession.id); }
Returns: active (boolean), created_at (date-time), ended_at (date-time), id (uuid), participants (arrayobject]), record_type (string), room_id (uuid), updated_at (date-time)
GET /room_sessions/{room_session_id}
javascriptconst session = await client.rooms.sessions.retrieve('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0'); console.log(session.data);
Returns: active (boolean), created_at (date-time), ended_at (date-time), id (uuid), participants (arrayobject]), record_type (string), room_id (uuid), updated_at (date-time)
Note: this will also kick all participants currently present in the room
POST /room_sessions/{room_session_id}/actions/end
javascriptconst response = await client.rooms.sessions.actions.end('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0'); console.log(response.data);
Returns: result (string)
POST /room_sessions/{room_session_id}/actions/kick
Optional: exclude (arraystring]), participants (object)
javascriptconst response = await client.rooms.sessions.actions.kick('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0'); console.log(response.data);
Returns: result (string)
POST /room_sessions/{room_session_id}/actions/mute
Optional: exclude (arraystring]), participants (object)
javascriptconst response = await client.rooms.sessions.actions.mute('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0'); console.log(response.data);
Returns: result (string)
POST /room_sessions/{room_session_id}/actions/unmute
Optional: exclude (arraystring]), participants (object)
javascriptconst response = await client.rooms.sessions.actions.unmute('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0'); console.log(response.data);
Returns: result (string)
GET /room_sessions/{room_session_id}/participants
javascript// Automatically fetches more pages as needed. for await (const roomParticipant of client.rooms.sessions.retrieveParticipants( '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', )) { console.log(roomParticipant.id); }
Returns: context (string), id (uuid), joined_at (date-time), left_at (date-time), record_type (string), session_id (uuid), updated_at (date-time)
GET /rooms
javascript// Automatically fetches more pages as needed. for await (const room of client.rooms.list()) { console.log(room.id); }
Returns: active_session_id (uuid), created_at (date-time), enable_recording (boolean), id (uuid), max_participants (integer), record_type (string), sessions (arrayobject]), unique_name (string), updated_at (date-time), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer)
Synchronously create a Room.
POST /rooms
Optional: enable_recording (boolean), max_participants (integer), unique_name (string), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer)
javascriptconst room = await client.rooms.create({ unique_name: 'my-meeting-room', max_participants: 10, }); console.log(room.data);
Returns: active_session_id (uuid), created_at (date-time), enable_recording (boolean), id (uuid), max_participants (integer), record_type (string), sessions (arrayobject]), unique_name (string), updated_at (date-time), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer)
GET /rooms/{room_id}
javascriptconst room = await client.rooms.retrieve('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0'); console.log(room.data);
Returns: active_session_id (uuid), created_at (date-time), enable_recording (boolean), id (uuid), max_participants (integer), record_type (string), sessions (arrayobject]), unique_name (string), updated_at (date-time), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer)
Synchronously update a Room.
PATCH /rooms/{room_id}
Optional: enable_recording (boolean), max_participants (integer), unique_name (string), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer)
javascriptconst room = await client.rooms.update('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0'); console.log(room.data);
Returns: active_session_id (uuid), created_at (date-time), enable_recording (boolean), id (uuid), max_participants (integer), record_type (string), sessions (arrayobject]), unique_name (string), updated_at (date-time), webhook_event_failover_url (uri), webhook_event_url (uri), webhook_timeout_secs (integer)
Synchronously delete a Room. Participants from that room will be kicked out, they won't be able to join that room anymore, and you won't be charged anymore for that room.
DELETE /rooms/{room_id}
javascriptawait client.rooms.delete('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0');
Synchronously create an Client Token to join a Room. Client Token is necessary to join a Telnyx Room. Client Token will expire after token_ttl_secs, a Refresh Token is also provided to refresh a Client Token, the Refresh Token expires after refresh_token_ttl_secs.
POST /rooms/{room_id}/actions/generate_join_client_token
Optional: refresh_token_ttl_secs (integer), token_ttl_secs (integer)
javascriptconst response = await client.rooms.actions.generateJoinClientToken( '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', ); console.log(response.data);
Returns: refresh_token (string), refresh_token_expires_at (date-time), token (string), token_expires_at (date-time)
Synchronously refresh an Client Token to join a Room. Client Token is necessary to join a Telnyx Room. Client Token will expire after token_ttl_secs.
POST /rooms/{room_id}/actions/refresh_client_token — Required: refresh_token
Optional: token_ttl_secs (integer)
javascriptconst response = await client.rooms.actions.refreshClientToken( '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', { refresh_token: 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ0ZWxueXhfdGVsZXBob255IiwiZXhwIjoxNTkwMDEwMTQzLCJpYXQiOjE1ODc1OTA5NDMsImlzcyI6InRlbG55eF90ZWxlcGhvbnkiLCJqdGkiOiJiOGM3NDgzNy1kODllLTRhNjUtOWNmMi0zNGM3YTZmYTYwYzgiLCJuYmYiOjE1ODc1OTA5NDIsInN1YiI6IjVjN2FjN2QwLWRiNjUtNGYxMS05OGUxLWVlYzBkMWQ1YzZhZSIsInRlbF90b2tlbiI6InJqX1pra1pVT1pNeFpPZk9tTHBFVUIzc2lVN3U2UmpaRmVNOXMtZ2JfeENSNTZXRktGQUppTXlGMlQ2Q0JSbWxoX1N5MGlfbGZ5VDlBSThzRWlmOE1USUlzenl6U2xfYURuRzQ4YU81MHlhSEd1UlNZYlViU1ltOVdJaVEwZz09IiwidHlwIjoiYWNjZXNzIn0.gNEwzTow5MLLPLQENytca7pUN79PmPj6FyqZWW06ZeEmesxYpwKh0xRtA0TzLh6CDYIRHrI8seofOO0YFGDhpQ', }, ); console.log(response.data);
Returns: token (string), token_expires_at (date-time)
GET /rooms/{room_id}/sessions
javascript// Automatically fetches more pages as needed. for await (const roomSession of client.rooms.sessions.list1( '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0', )) { console.log(roomSession.id); }
Returns: active (boolean), created_at (date-time), ended_at (date-time), id (uuid), participants (arrayobject]), record_type (string), room_id (uuid), updated_at (date-time)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 11,663 | 5,723 | -51% | 1 | 1 | 0% | 2,373 | 6,268 | +164% | 0 | 0 | — |
case-02 | fail→pass | 16,948 | 6,733 | -60% | 1 | 1 | 0% | 3,447 | 6,436 | +87% | 0 | 0 | — |
case-03 | fail→pass | 14,750 | 6,747 | -54% | 1 | 1 | 0% | 2,890 | 6,425 | +122% | 0 | 0 | — |
case-04 | fail→pass | 6,062 | 5,681 | -6% | 1 | 1 | 0% | 1,154 | 6,227 | +440% | 0 | 0 | — |
case-05 | pass→pass | 14,070 | 8,512 | -40% | 1 | 1 | 0% | 2,506 | 6,592 | +163% | 0 | 0 | — |
case-06 | pass→pass | 9,074 | 8,839 | -3% | 1 | 1 | 0% | 1,849 | 6,790 | +267% | 0 | 0 | — |
case-07 | fail→pass | 12,404 | 5,969 | -52% | 1 | 1 | 0% | 2,431 | 6,210 | +155% | 0 | 0 | — |
case-08 | fail→pass | 7,778 | 4,826 | -38% | 1 | 1 | 0% | 1,527 | 5,996 | +293% | 0 | 0 | — |
case-09 | fail→pass | 7,887 | 3,912 | -50% | 1 | 1 | 0% | 1,423 | 5,742 | +304% | 0 | 0 | — |
case-10 | fail→pass | 9,085 | 5,013 | -45% | 1 | 1 | 0% | 1,812 | 5,954 | +229% | 0 | 0 | — |
case-11 | fail→pass | 9,570 | 4,290 | -55% | 1 | 1 | 0% | 1,816 | 5,692 | +213% | 0 | 0 | — |
case-12 | fail→pass | 9,061 | 2,973 | -67% | 1 | 1 | 0% | 1,717 | 5,542 | +223% | 0 | 0 | — |
case-13 | pass→pass | 5,920 | 4,811 | -19% | 1 | 1 | 0% | 1,142 | 5,990 | +425% | 0 | 0 | — |
case-14 | pass→pass | 5,906 | 3,423 | -42% | 1 | 1 | 0% | 1,126 | 5,613 | +398% | 0 | 0 | — |
case-15 | fail→pass | 4,757 | 2,519 | -47% | 1 | 1 | 0% | 896 | 5,405 | +503% | 0 | 0 | — |
case-16 | pass→pass | 12,369 | 2,907 | -76% | 1 | 1 | 0% | 2,323 | 5,480 | +136% | 0 | 0 | — |
case-17 | pass→pass | 6,882 | 5,707 | -17% | 1 | 1 | 0% | 1,211 | 6,112 | +405% | 0 | 0 | — |
case-18 | pass→pass | 10,161 | 5,089 | -50% | 1 | 1 | 0% | 1,880 | 5,993 | +219% | 0 | 0 | — |
case-19 | pass→pass | 4,865 | 2,874 | -41% | 1 | 1 | 0% | 941 | 5,545 | +489% | 0 | 0 | — |
case-20 | fail→pass | 6,523 | 3,966 | -39% | 1 | 1 | 0% | 1,252 | 5,751 | +359% | 0 | 0 | — |
case-21 | pass→pass | 6,436 | 3,104 | -52% | 1 | 1 | 0% | 1,195 | 5,571 | +366% | 0 | 0 | — |
case-22 | fail→pass | 4,957 | 4,007 | -19% | 1 | 1 | 0% | 960 | 5,810 | +505% | 0 | 0 | — |
case-23 | pass→pass | 5,476 | 4,848 | -11% | 1 | 1 | 0% | 1,082 | 6,014 | +456% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +57 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.