SAPPLANTA AI API
The SAPPLANTA AI API allows you to integrate our multi-model AI platform into your own applications. Use it to build AI-powered products, automate workflows, or access our marketplace programmatically.
Base URL
https://www.sapplanta.site/apiAuthentication
All API requests (except public marketplace browsing) require authentication using a Bearer token. Generate your API key from the Developer Dashboard.
Header
Authorization: Bearer sk-sap-your-key-here⚠️API keys are only available on paid plans (Starter and above). Free plan users can use the web interface at sapplanta.site.
Chat
/api/chat🔒 Auth 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|trading|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/chats🔒 Auth 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"
}
]Marketplace
/api/marketplace/products🌐 PublicBrowse public marketplace products
Response
{
"success": true,
"data": {
"products": [...],
"total": 42,
"page": 1,
"pages": 2
}
}/api/marketplace/buy🌐 PublicInitiate a crypto payment to purchase a marketplace product
Request Body
{
"productId": "clx...",
"currency": "usdttrc20" // usdttrc20|btc|eth|sol|ltc
}Response
{
"success": true,
"data": {
"paymentUrl": "https://nowpayments.io/payment/...",
"orderId": "MKT-abc12345-1711234567",
"price": 9.99,
"platformFee": 2.00,
"creatorProfit": 7.99
}
}Credits & Usage
/api/credits🔒 Auth requiredGet remaining credits for the authenticated user
Response
{
"reasoningCredits": 145,
"imageCredits": 48,
"videoCredits": 7
}/api/usage🔒 Auth requiredGet today's usage stats for the authenticated user
Response
{
"used": 12,
"limit": 999999,
"plan": "pro",
"remaining": 999987
}Image & Video
/api/generate-image🔒 Auth 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-video🔒 Auth requiredGenerate a short video using FAL.ai (Creator/Team 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 |
|---|---|---|---|
| Free | 10 | 100/month | 1 |
| Starter | 30 | Unlimited | 2 |
| Pro | 60 | Unlimited | 3 |
| Creator | 100 | Unlimited | 5 |
| Team | 200 | 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': 'Write a trading bot strategy'}],
'domain': 'trading',
}
)
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 |
Ready to build?
Get your API key and start integrating in minutes