API Quickstart¶
Make your first API call in under 5 minutes.
1. Get Your API Key¶
- Log in to your Vellocity dashboard
- Navigate to Settings > API Keys
- Click Generate New Key
- Copy the key — it is shown only once
2. Make Your First Request¶
All API requests use the base URL https://api.vell.ai/api/v1 and require a Bearer token in the Authorization header.
Expected response:
{
"success": true,
"data": {
"id": "partner_123",
"company_name": "Acme Corp",
"plan": "business",
"aws_account_connected": true
}
}
3. Try a Content Generation Call¶
Generate a blog post outline using the AI Writer:
import requests
resp = requests.post(
"https://api.vell.ai/api/v1/aiwriter/generate-output",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"prompt": "Write a blog post outline about cloud cost optimization",
"maximum_length": 500,
"creativity": 0.7,
},
)
# Response is streamed — read chunks
for chunk in resp.iter_content(chunk_size=None):
print(chunk.decode(), end="")
const resp = await fetch("https://api.vell.ai/api/v1/aiwriter/generate-output", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "Write a blog post outline about cloud cost optimization",
maximum_length: 500,
creativity: 0.7,
}),
});
const reader = resp.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
process.stdout.write(decoder.decode(value));
}
Streaming responses
AI generation endpoints return Server-Sent Events (SSE). The stream ends with data: [DONE]. See the AI Writer API for full details.
4. Understand the Response Format¶
All endpoints return a consistent JSON envelope:
Errors follow the same structure:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The prompt field is required"
}
}
See Errors & Rate Limits for the full error code reference.