Skip to content

API Reference

Last updated: 2025-08-25T18:53:28.182Z

This comprehensive API reference provides detailed documentation for all VibeCode platform endpoints.

The VibeCode API provides programmatic access to:

  • 🤖 AI-powered code generation and analysis
  • 📁 Project management and templates
  • 🤝 Real-time collaboration features
  • 📂 File operations and synchronization
  • 📊 Monitoring and observability
  • 🔒 Authentication and security
Production: https://vibecode.example.com/api
Development: http://localhost:3000/api

Most endpoints require authentication via one of these methods:

Authorization: Bearer <your_jwt_token>
x-api-key: <your_api_key>
Endpoint TypeRequests per Minute
Standard endpoints100
AI endpoints20
File upload endpoints10
  • /api/ai/chat - AI chat completions
  • /api/ai/generate-project - Generate projects from prompts
  • /api/ai/search - Vector search for RAG
  • /api/claude/chat - Claude-specific chat endpoint
  • /api/auth/[...nextauth] - NextAuth.js endpoints
  • /api/auth/mfa/setup - Multi-factor authentication setup
  • /api/auth/saml/sso - SAML SSO integration
  • /api/files - File CRUD operations
  • /api/files/sync - Real-time file synchronization
  • /api/monitoring/dashboard - Monitoring dashboard data
  • /api/monitoring/metrics - Performance metrics
  • /api/monitoring/security - Security monitoring
  • /api/code-server/session - Code server management
  • /api/terminal/session - Terminal sessions
  • /api/terminal/ws - WebSocket terminal connection
  • /api/chat/stream - Streaming chat
  • /api/chat/mongodb - Persistent chat storage
  • /api/projects/template - Template-based project generation
  • /api/templates - Template management
  • /api/health - Comprehensive health check
  • /api/health/simple - Simple health check

All API responses follow this standard format:

{
"success": true,
"data": {
// Response data here
},
"message": "Operation completed successfully",
"timestamp": "2025-08-22T10:30:00Z",
"requestId": "req_abc123"
}

Error responses include detailed information:

{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": {
"field": "workspaceId",
"issue": "Required field missing"
}
},
"timestamp": "2025-08-22T10:30:00Z",
"requestId": "req_abc123"
}
StatusCodeDescription
400INVALID_REQUESTRequest parameters are invalid
401UNAUTHORIZEDAuthentication required or invalid
403FORBIDDENInsufficient permissions
404NOT_FOUNDResource not found
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORServer error
Terminal window
curl -X POST \
"https://api.vibecode.com/ai/chat" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "Create a React component"}
]
}'
const response = await fetch('/api/ai/chat', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
messages: [
{ role: 'user', content: 'Create a React component' }
]
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.vibecode.com/ai/chat',
headers={
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
},
json={
'messages': [
{'role': 'user', 'content': 'Create a React component'}
]
}
)
data = response.json()
print(data)
  • TypeScript/JavaScript: npm install @vibecode/api-client
  • Python: pip install vibecode-api
  • Go: go get github.com/vibecode/go-client

For detailed endpoint documentation, refer to the auto-generated Postman collection published in the CI artifacts.


This documentation is automatically generated and kept in sync with the codebase.