Vinci uses API keys for authentication. Include your key in every request.
Authorization : Bearer sk-your-api-key-here
Keep your API keys secure and never expose them in client-side code. Use environment variables or a secret manager.
Get your first API key
The easiest way to get started is by creating your first API key through the Vinci Dashboard .
Sign in to your Vinci account
Navigate to the API Keys page
Click “Create New API Key”
Give your key a descriptive name (e.g., “Development”, “Production”)
Copy and securely store your API key
Your API key will only be shown once. Make sure to copy it immediately and store it securely.
Create API key
Authorization : Bearer sk-existing-api-key
{
"key_id" : "vinci_abc123..." ,
"name" : "Production API Key" ,
"api_key" : "sk-your-new-api-key-here" ,
"rate_limit" : 10 ,
"created_at" : "2024-01-01T00:00:00Z"
}
cURL
create_key.py
create_key.js
curl -X POST "https://tryvinci.com/api/v1/keys" \
-H "Authorization: Bearer sk-existing-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "Production API Key",
"rate_limit": 20
}'
Tip
Store the full API key securely as it will not be shown again.
List API keys
Authorization : Bearer sk-your-api-key-here
{
"api_keys" : [
{
"key_id" : "vinci_abc123..." ,
"name" : "Production API Key" ,
"is_active" : true ,
"created_at" : "2024-01-01T00:00:00Z" ,
"last_used" : "2024-01-01T12:00:00Z" ,
"key_preview" : "sk-...abc123..." ,
"rate_limit" : 10
}
],
"count" : 1
}
cURL
list_keys.py
list_keys.js
curl -X GET "https://tryvinci.com/api/v1/keys" \
-H "Authorization: Bearer sk-your-api-key-here"
Revoke API key
DELETE /api/v1/keys/{key_id}
Authorization : Bearer sk-your-api-key-here
{
"message" : "API key revoked successfully" ,
"key_id" : "vinci_abc123..."
}
cURL
revoke_key.py
revoke_key.js
curl -X DELETE "https://tryvinci.com/api/v1/keys/vinci_abc123..." \
-H "Authorization: Bearer sk-your-api-key-here"
Rate limits
Default: 10 requests/min. Max: 100 requests/min.
X-RateLimit-Limit : 10
X-RateLimit-Remaining : 7
X-RateLimit-Reset : 1640995200
rate_limit_handling.py
rate_limit_handling.js
import time, requests
def get_with_retry ( url , headers , max_retries = 3 ):
for attempt in range (max_retries):
r = requests.get(url, headers = headers)
if r.status_code == 429 :
time.sleep( 60 )
continue
r.raise_for_status()
return r
raise RuntimeError ( "Max retries exceeded" )
Best practices
Rotate keys regularly.
Use different keys per environment.
Monitor last_used to identify stale keys.