Create scoped API keys, configure rotation, and set rate limits through the API or dashboard.
import { V100 } from 'v100-sdk';
const v100 = new V100('YOUR_ADMIN_API_KEY');
// Create a scoped API key for a transcription service
const key = await v100.apiKeys.create({
name: 'Transcription Service - Production',
scopes: [
'transcript:read',
'transcript:write',
'recording:read' // Read recordings to transcribe them
],
rateLimit: {
requestsPerSecond: 100,
requestsPerDay: 500000
},
rotation: {
auto: true,
intervalDays: 90, // Rotate every 90 days
gracePeriodHours: 24 // Old key valid for 24h after rotation
}
});
console.log(key);
// {
// id: "key_pq_abc123",
// apiKey: "v100_sk_live_...", // Shown once, never stored plaintext
// scopes: ["transcript:read", "transcript:write", "recording:read"],
// encryption: "kyber-aes256gcm",
// verification: "ml-dsa-65",
// rotationSchedule: "90d",
// createdAt: "2026-03-28T14:00:00Z"
// }
// Manually rotate a key (zero downtime)
const rotated = await v100.apiKeys.rotate('key_pq_abc123');
// Old key valid for 24h grace period
// New key active immediately
// Check usage for a key
const usage = await v100.apiKeys.usage('key_pq_abc123');
// {
// requests: { today: 12847, thisMonth: 387291 },
// bandwidth: { today: "2.3 GB", thisMonth: "67.1 GB" },
// lastUsed: "2026-03-28T15:42:00Z",
// topEndpoints: ["/v1/transcripts", "/v1/recordings"]
// }
// Revoke a key (immediate propagation)
await v100.apiKeys.revoke('key_pq_abc123');
// Key is invalid on the NEXT request (31ns cache invalidation)
# Create a scoped API key
curl -X POST https://api.v100.ai/v1/api-keys \
-H "Authorization: Bearer YOUR_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Transcription Service",
"scopes": ["transcript:read", "transcript:write", "recording:read"],
"rateLimit": { "requestsPerSecond": 100 },
"rotation": { "auto": true, "intervalDays": 90 }
}'
# Rotate a key
curl -X POST https://api.v100.ai/v1/api-keys/key_pq_abc123/rotate \
-H "Authorization: Bearer YOUR_ADMIN_KEY"
# Revoke a key (immediate)
curl -X DELETE https://api.v100.ai/v1/api-keys/key_pq_abc123 \
-H "Authorization: Bearer YOUR_ADMIN_KEY"