Skip to main content

API Overview

Base URL

https://api.worldflowai.com

For local development:

http://localhost:8080

Authentication

All requests require a JWT bearer token in the Authorization header:

Authorization: Bearer <token>

See Authentication for how to obtain tokens.

Content Type

All request and response bodies use JSON:

Content-Type: application/json

Field Naming Convention

All JSON fields use camelCase:

{
"projectId": "my-project",
"branchName": "main",
"branchPurpose": "Initial setup",
"cumulativeProgress": "Completed onboarding",
"thisContribution": "Added first milestone",
"agentId": "my-agent",
"agentType": "custom"
}

Error Responses

All errors follow this envelope format:

{
"error": {
"message": "Human-readable error description",
"type": "error_type_identifier"
}
}

Rate limit errors include a retry_after_secs field:

{
"error": {
"message": "rate limit exceeded: try again in 60 seconds",
"type": "rate_limit_error",
"retry_after_secs": 60
}
}

See Error Codes for the full list of error types.

HTTP Status Codes

StatusMeaning
200Success
201Created (new resource)
400Bad request (validation failed)
401Unauthorized (missing or invalid token)
403Forbidden (insufficient permissions)
404Resource not found
429Rate limit exceeded
500Internal server error
502Bad gateway (proxy upstream error)
503Service unavailable (embedding service down)
504Gateway timeout

Pagination

Endpoints that return lists support pagination via query parameters:

ParameterTypeDefaultDescription
limitintegervariesMaximum results to return
offsetinteger0Number of results to skip

Response Headers

HeaderDescription
X-Cache-StatusHIT or MISS (proxy endpoints only)
X-Request-IDUnique request identifier for debugging

API Groups

Memory API

All memory endpoints are prefixed with /api/v1/memory.

GroupPath PrefixEndpoints
Projects/projects4
Store/projects/{id}/store1
Recall/projects/{id}/recall1
Branches/projects/{id}/branches4
Merge/projects/{id}/merge1
Log/projects/{id}/log1
Roadmap/projects/{id}/roadmap1
Search/projects/{id}/search, /search2
Metrics/projects/{id}/metrics2
Promote/projects/{id}/promote1
Contributors/contributors5
Sources/sources6
Intelligence/intelligence2

Proxy API

Drop-in replacements for LLM provider APIs.

ProviderEndpointDescription
OpenAIPOST /v1/chat/completionsChat completions with caching
OpenAIGET /v1/modelsList available models
AnthropicPOST /v1/messagesMessages API with caching
GeminiPOST /v1beta/models/{model}/generateContentContent generation with caching
GeminiPOST /v1beta/models/{model}/streamGenerateContentStreaming content generation
GeminiPOST /v1beta/models/{model}/countTokensToken counting
GeminiPOST /v1beta/models/{model}/embedContentEmbeddings
GeminiGET /v1beta/modelsList available models
GeminiGET /v1beta/models/{model}Get model info
CoherePOST /v1/chatChat with caching
CoherePOST /v1/generateText generation (legacy)
CoherePOST /v1/embedEmbeddings

Authentication API

EndpointDescription
POST /api/v1/auth/tokenExchange API key for JWT

Versioning

The API is versioned via URL path (/v1/). Breaking changes will increment the version number. Non-breaking additions (new fields, new endpoints) are made to the current version.