Back to API Keys

API Documentation

Everything you need to integrate with the CodeVF API. SDKs coming soon.

Main hours: 8am–10pm EST. We’re actively working toward 24/7 availability; responses may be slower outside these hours for now.

Quick Start

1

Get Your API Key

Create an API key from your dashboard

2

Create a Project

curl -X POST https://codevf.com/api/v1/projects/create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My API Project"
  }'
3

Create a Task

curl -X POST https://codevf.com/api/v1/tasks/create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Review this auth flow for security issues",
    "projectId": 123,
    "mode": "fast",
    "maxCredits": 50
  }'
4

Poll for Results

curl https://codevf.com/api/v1/tasks/TASK_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Authentication

All API requests require authentication using an API key sent in the Authorization header:

Authorization: Bearer cvf_test_your_key_here

Keep Your API Key Secret

Never commit API keys to version control or expose them in client-side code.

API Endpoints

Submit a task for review by a human engineer.

Request Body

ParameterTypeRequiredDescription
promptstringRequiredYour question or review request (10-10,000 chars)
maxCreditsnumberRequiredMaximum credits to spend (1-1920)
projectIdnumberRequiredProject to attach this task to (from POST /projects/create)
modeenumOptionalService level: realtime_answer, fast, standard (default: standard)
metadataobjectOptionalCustom metadata for your reference
idempotencyKeystringOptionalUUID for idempotent requests
attachmentsarrayOptionalFile attachments (max 5)
tagIdnumberOptionalEngineer expertise level (see GET /tags for options). Affects final cost via multiplier.

Service Modes

realtime_answer (2x multiplier)
Instant human response • 1-10 credits
fast (1.5x multiplier)
Response within 4 hours • 4-1920 credits
standard (1x multiplier)
Response within 24 hours • 4-1920 credits

File Attachments

Attach screenshots, error logs, design mockups, or code files to your tasks. Each attachment must include:

PropertyTypeDescription
fileNamestringFile name (e.g., "screenshot.png")
contentstringBase64 for binary files, raw text for code/logs
mimeTypestringMIME type (e.g., "image/png", "text/plain")
✅ Supported File Types
Images: PNG, JPG, GIF, WebP (10MB max, base64 encoded)
Documents: PDF (10MB max, base64 encoded)
Source Code: JS, TS, PY, Java, C++, etc. (1MB max, raw text)
Text Files: JSON, XML, CSV, TXT, logs (1MB max, raw text)
📋 Attachment Limits
Maximum 5 attachments per task • Engineers can view/download all files

Example Request (with Attachments)

{
  "prompt": "Review this React component for security issues",
  "projectId": 123,
  "mode": "fast",
  "maxCredits": 75,
  "metadata": {
    "environment": "production"
  },
  "attachments": [
    {
      "fileName": "screenshot.png",
      "content": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJ...",
      "mimeType": "image/png"
    },
    {
      "fileName": "error.log",
      "content": "Error: Cannot read property 'user' of undefined...",
      "mimeType": "text/plain"
    }
  ]
}

Response

{
  "id": "task_abc123xyz",
  "status": "pending",
  "mode": "fast",
  "maxCredits": 50,
  "createdAt": "2025-12-18T10:00:00Z"
}

Code Examples

import requests
import base64
import time

API_KEY = "cvf_test_your_key_here"
BASE_URL = "https://codevf.com/api/v1"

# Read and encode image file
with open("screenshot.png", "rb") as f:
    image_base64 = base64.b64encode(f.read()).decode()

# Create task with attachments
response = requests.post(
    f"{BASE_URL}/tasks/create",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "prompt": "Review this UI flow and check the screenshot",
        "projectId": 123,
        "mode": "fast",
        "maxCredits": 75,
        "attachments": [
            {
                "fileName": "screenshot.png",
                "content": image_base64,
                "mimeType": "image/png"
            },
            {
                "fileName": "error.log",
                "content": "Error: Authentication failed at login.py:42",
                "mimeType": "text/plain"
            }
        ]
    }
)
task = response.json()
task_id = task["id"]

# Poll for completion
while True:
    response = requests.get(
        f"{BASE_URL}/tasks/{task_id}",
        headers={"Authorization": f"Bearer {API_KEY}"}
    )
    task = response.json()

    if task["status"] == "completed":
        print("Result:", task["result"]["message"])
        break
    elif task["status"] == "cancelled":
        print("Task was cancelled")
        break

    time.sleep(10)

Error Codes

400
Bad Request
Invalid parameters or malformed request
401
Unauthorized
Invalid or missing API key
402
Payment Required
Insufficient credits in your account
404
Not Found
Task does not exist or you lack access
409
Conflict
Idempotency key already used by different API key
413
Payload Too Large
Request body exceeds 150KB limit
429
Too Many Requests
Rate limit exceeded (1 req/sec / 3,600/hour)
500
Internal Server Error
Something went wrong on our end

Error Response Format

{
  "error": "Insufficient credits",
  "status": 402
}