SAPPLANTA API
The SAPPLANTA API allows you to integrate our multi-model AI platform into your own applications. Use it to build AI-powered products, automate workflows, and integrate AI into your applications.
Base URL
https://www.sapplanta.site/apiAuthentication
All API requests require authentication using a Bearer token. Generate your API key from the Developer Dashboard.
Header
Authorization: Bearer sk-sap-your-key-hereAPI keys are only available on paid plans (Starter and above). Free plan users can use the web interface at sapplanta.site.
Chat
/api/chatAuth requiredSend a message and receive an AI-generated response
Request Body
{
"messages": [
{ "role": "user", "content": "Write a Laravel controller for products" }
],
"domain": "laravel", // optional: laravel|nextjs|python|react|node|mobile|swahili|general
"model": "auto" // optional: auto|reasoning|default
}Response
{
"content": "Here is a complete ProductController...",
"model": "anthropic/claude-3.5-sonnet",
"modelType": "reasoning",
"creditsUsed": 5
}/api/chatsAuth requiredList all chat conversations for the authenticated user
Response
[
{
"id": "clx...",
"title": "Laravel product controller",
"createdAt": "2026-03-21T12:00:00Z",
"updatedAt": "2026-03-21T12:05:00Z"
}
]Credits & Usage
/api/creditsAuth requiredGet remaining credits for the authenticated user
Response
{
"reasoningCredits": 145,
"imageCredits": 48,
"videoCredits": 7
}/api/usageAuth requiredGet today's usage stats for the authenticated user
Response
{
"used": 12,
"limit": 999999,
"plan": "pro",
"remaining": 999987
}Image, Video & Music
/api/generate-imageAuth requiredGenerate an image using Flux Schnell AI (requires image credits)
Request Body
{
"prompt": "Nairobi skyline at golden hour, photorealistic, 8K"
}Response
{
"imageUrl": "https://...",
"creditsUsed": 2,
"remainingCredits": 48
}/api/generate-videoAuth requiredGenerate a short video using FAL.ai (Elite plan only)
Request Body
{
"prompt": "A timelapse of Mount Kenya at sunrise"
}Response
{
"videoUrl": "https://...",
"creditsUsed": 20
}Rate Limits
| Plan | Requests/min | Daily Messages | Concurrent |
|---|---|---|---|
| Trader | 30 | Unlimited | 3 |
| Pro | 60 | Unlimited | 5 |
| Elite | 120 | Unlimited | 10 |
Code Examples
const response = await fetch('https://www.sapplanta.site/api/chat', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sk-sap-your-key-here',
},
body: JSON.stringify({
messages: [{ role: 'user', content: 'Write a REST API in FastAPI' }],
domain: 'python',
}),
})
const data = await response.json()
console.log(data.content)import requests
response = requests.post(
'https://www.sapplanta.site/api/chat',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer sk-sap-your-key-here',
},
json={
'messages': [{'role': 'user', 'content': 'Build a Laravel API with authentication'}],
'domain': 'laravel',
}
)
print(response.json()['content'])$response = Http::withHeaders([
'Authorization' => 'Bearer sk-sap-your-key-here',
])->post('https://www.sapplanta.site/api/chat', [
'messages' => [
['role' => 'user', 'content' => 'Generate an Eloquent model']
],
'domain' => 'laravel',
]);
echo $response->json()['content'];curl -X POST https://www.sapplanta.site/api/chat \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-sap-your-key-here" \
-d '{
"messages": [{"role": "user", "content": "Hello!"}],
"domain": "general"
}'Error Codes
| Code | Meaning | Common Cause |
|---|---|---|
200 | Success | Request completed successfully |
400 | Bad Request | Missing or invalid parameters |
401 | Unauthorized | Missing or invalid API key |
403 | Forbidden | Plan doesn't support this feature |
404 | Not Found | Resource does not exist |
429 | Rate Limited | Too many requests — slow down |
500 | Server Error | Something went wrong on our end |
502 | Provider Error | AI provider temporarily unavailable |
CLI Tool
Use SAPPLANTA directly from your terminal. Works on Windows, Mac and Linux.
npm install -g sapplanta # Setup your API key sapplanta login --key sk-or-v1-your-key
# Interactive chat sapplanta chat --domain laravel --mode elite # Ask a question sapplanta ask "Write a Laravel controller for products" --domain laravel # Analyze a file sapplanta analyze app.js --instruction "Fix the bugs" --mode elite # Generate code to files sapplanta generate "Build a restaurant website" --output ./my-site
sapplanta chatsapplanta asksapplanta analyzesapplanta generateReady to build?
Get your API key and start integrating in minutes