Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manage cloud storage buckets and objects using the S3-compatible Telnyx Storage API. This skill provides JavaScript SDK examples.
.claude/skills/team-telnyx-telnyx-storage-javascript/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 34% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 2% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -3% | 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).
Returns the stored certificate detail of a bucket, if applicable.
GET /storage/buckets/{bucketName}/ssl_certificate
javascriptconst sslCertificate = await client.storage.buckets.sslCertificate.retrieve(''); console.log(sslCertificate.data);
Returns: created_at (date-time), id (string), issued_by (object), issued_to (object), valid_from (date-time), valid_to (date-time)
Uploads an SSL certificate and its matching secret so that you can use Telnyx's storage as your CDN.
PUT /storage/buckets/{bucketName}/ssl_certificate
javascriptimport fs from 'fs'; const sslCertificate = await client.storage.buckets.sslCertificate.create(''); console.log(sslCertificate.data);
Returns: created_at (date-time), id (string), issued_by (object), issued_to (object), valid_from (date-time), valid_to (date-time)
Deletes an SSL certificate and its matching secret.
DELETE /storage/buckets/{bucketName}/ssl_certificate
javascriptconst sslCertificate = await client.storage.buckets.sslCertificate.delete(''); console.log(sslCertificate.data);
Returns: created_at (date-time), id (string), issued_by (object), issued_to (object), valid_from (date-time), valid_to (date-time)
Returns the detail on API usage on a bucket of a particular time period, group by method category.
GET /storage/buckets/{bucketName}/usage/api
javascriptconst response = await client.storage.buckets.usage.getAPIUsage('', { filter: { end_time: '2019-12-27T18:11:19.117Z', start_time: '2019-12-27T18:11:19.117Z' }, }); console.log(response.data);
Returns: categories (arrayobject]), timestamp (date-time), total (object)
Returns the amount of storage space and number of files a bucket takes up.
GET /storage/buckets/{bucketName}/usage/storage
javascriptconst response = await client.storage.buckets.usage.getBucketUsage(''); console.log(response.data);
Returns: num_objects (integer), size (integer), size_kb (integer), timestamp (date-time)
Returns a timed and authenticated URL to download (GET) or upload (PUT) an object. This is the equivalent to AWS S3’s “presigned” URL. Please note that Telnyx performs authentication differently from AWS S3 and you MUST NOT use the presign method of AWS s3api CLI or SDK to generate the presigned URL.
Refer to: https://developers.telnyx.com/docs/cloud-storage/presigned-urls
POST /storage/buckets/{bucketName}/{objectName}/presigned_url
Optional: ttl (integer)
javascriptconst response = await client.storage.buckets.createPresignedURL('', { bucketName: '' }); console.log(response.content);
Returns: content (object)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 17,385 | 8,692 | -50% | 1 | 1 | 0% | 3,314 | 3,189 | -4% | 0 | 0 | — |
case-02 | fail→pass | 16,552 | 8,112 | -51% | 1 | 1 | 0% | 3,200 | 2,931 | -8% | 0 | 0 | — |
case-03 | fail→pass | 11,798 | 8,815 | -25% | 1 | 1 | 0% | 2,310 | 3,102 | +34% | 0 | 0 | — |
case-04 | fail→pass | 12,292 | 6,229 | -49% | 1 | 1 | 0% | 2,557 | 2,601 | +2% | 0 | 0 | — |
case-05 | fail→pass | 17,817 | 5,025 | -72% | 1 | 1 | 0% | 2,362 | 2,293 | -3% | 0 | 0 | — |
case-06 | fail→pass | 8,014 | 18,126 | +126% | 1 | 1 | 0% | 1,435 | 2,168 | +51% | 0 | 0 | — |
case-07 | fail→pass | 12,519 | 11,911 | -5% | 1 | 1 | 0% | 2,410 | 2,787 | +16% | 0 | 0 | — |
case-08 | fail→pass | 16,928 | 11,441 | -32% | 1 | 1 | 0% | 2,969 | 3,472 | +17% | 0 | 0 | — |
case-09 | fail→pass | 11,079 | 5,699 | -49% | 1 | 1 | 0% | 2,220 | 2,243 | +1% | 0 | 0 | — |
case-10 | fail→pass | 10,477 | 3,785 | -64% | 1 | 1 | 0% | 1,966 | 1,982 | +1% | 0 | 0 | — |
case-11 | fail→pass | 9,349 | 2,398 | -74% | 1 | 1 | 0% | 1,734 | 1,679 | -3% | 0 | 0 | — |
case-12 | fail→pass | 9,225 | 2,585 | -72% | 1 | 1 | 0% | 1,648 | 1,700 | +3% | 0 | 0 | — |
case-13 | fail→pass | 11,487 | 2,175 | -81% | 1 | 1 | 0% | 2,090 | 1,692 | -19% | 0 | 0 | — |
case-14 | pass→pass | 8,228 | 5,112 | -38% | 1 | 1 | 0% | 1,628 | 2,366 | +45% | 0 | 0 | — |
case-15 | pass→pass | 5,740 | 2,405 | -58% | 1 | 1 | 0% | 1,065 | 1,650 | +55% | 0 | 0 | — |
case-16 | fail→pass | 10,915 | 5,676 | -48% | 1 | 1 | 0% | 2,229 | 2,381 | +7% | 0 | 0 | — |
case-17 | pass→pass | 23,814 | 4,827 | -80% | 1 | 1 | 0% | 2,397 | 2,252 | -6% | 0 | 0 | — |
case-18 | fail→pass | 12,625 | 1,669 | -87% | 1 | 1 | 0% | 2,205 | 1,502 | -32% | 0 | 0 | — |
case-19 | fail→pass | 8,364 | 4,191 | -50% | 1 | 1 | 0% | 1,790 | 2,070 | +16% | 0 | 0 | — |
case-20 | fail→pass | 3,936 | 4,378 | +11% | 1 | 1 | 0% | 782 | 2,173 | +178% | 0 | 0 | — |
case-21 | pass→pass | 8,948 | 6,021 | -33% | 1 | 1 | 0% | 1,764 | 2,535 | +44% | 0 | 0 | — |
case-22 | pass→pass | 9,767 | 8,901 | -9% | 1 | 1 | 0% | 1,835 | 2,878 | +57% | 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. 22 cases were attempted. The headline lift of +77 percentage points is the difference between those two pass rates over the 22 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.