Documentation
Quickstart
Get started with Codve in under 5 minutes. Verify your first function with a single API call.
Authentication
All API requests require authentication via an API key. Generate one from your dashboard.
Authorization Header
Authorization: Bearer vk_live_xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxYour First Verification
Send a POST request to verify a function. Include the code, function name, and input schema.
Request
curl -X POST https://api.codve.ai/api/v1/verify \
-H "Authorization: Bearer vk_live_xxx.xxx" \
-H "Content-Type: application/json" \
-d '{
"code": "function add(a, b) { return a + b; }",
"functionName": "add",
"inputSchema": {
"a": { "type": "number" },
"b": { "type": "number" }
},
"expectedBehavior": "Returns the sum of two numbers"
}'Response
{
"verificationId": "ver_abc123",
"status": "completed",
"confidence": 94,
"verdict": "likely_correct",
"findings": [
{
"strategy": "property-based",
"status": "passed",
"confidence": 98,
"message": "Verified commutativity: add(a,b) === add(b,a)"
}
]
}POST /api/v1/verify
Submit code for verification. Returns a verification result with confidence score and findings.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | The code to verify (max 100KB) |
| functionName | string | No | Name of the function to verify |
| inputSchema | object | No | JSON schema for function inputs |
| expectedBehavior | string | No | Natural language description |
| strategies | string[] | No | Strategies to use (defaults to all) |
| language | string | No | Code language (default: javascript) |
GET /api/v1/verifications
List your verification history with pagination and filtering.
Request
curl https://api.codve.ai/api/v1/verifications?limit=10&status=completed \
-H "Authorization: Bearer vk_live_xxx.xxx"API Keys
API keys are prefixed with vk_live_ and consist of a prefix and secret separated by a dot.
- Generate keys from the dashboard
- Keys are shown once at creation - store them securely
- Revoke compromised keys immediately