Skip to content

API Quickstart

Make your first API call in under 5 minutes.


1. Get Your API Key

  1. Log in to your Vellocity dashboard
  2. Navigate to Settings > API Keys
  3. Click Generate New Key
  4. 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.

curl -s https://api.vell.ai/api/v1/partners/profile \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" | python3 -m json.tool
import requests

resp = requests.get(
    "https://api.vell.ai/api/v1/partners/profile",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(resp.json())
const resp = await fetch("https://api.vell.ai/api/v1/partners/profile", {
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});
console.log(await resp.json());

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:

curl -X POST https://api.vell.ai/api/v1/aiwriter/generate-output \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Write a blog post outline about cloud cost optimization",
    "maximum_length": 500,
    "creativity": 0.7
  }'
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:

{
  "success": true,
  "data": { },
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 100
  }
}

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.


What's Next?

AI Content

Generate blog posts, social copy, and marketing content.

AI Writer API | AI Chat API

AI Images

Generate images with DALL-E, Stable Diffusion, and Flux.

AI Image API

GTM Automation

Schedule events, manage workflows, and automate campaigns.

Content Workflow API | GTM Schedule API

Partner Integration

Manage listings, co-sell deals, and analytics programmatically.

Partner API | Webhooks