OpenAI-compatible REST API. Chat, Image, Video, Music, Agents, Council, Knowledge, Face Swap — all in one platform.
Go to API Marketplace and create a new key. Keys start with sk-sun-
curl https://suncore.asia/api/v1/chat/completions \
-H "Authorization: Bearer sk-sun-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "suncore-1",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
}'/api/v1/chat/completionsGenerate conversational responses. OpenAI-compatible format with 1,000+ specialized AI models.
/api/v1/images/generationsGenerate images from text prompts. Returns URL to generated image.
/api/v1/audio/transcriptionsTranscribe audio files to text. Supports multiple languages and formats.
/api/v1/modelsList available AI models.
/api/v1/videos/generateGenerate AI videos from text prompts. Returns job ID for async polling.
/api/v1/music/generateAI music composition with genre, mood, and tempo control. Multi-track output.
/api/v1/agents/invokeInvoke autonomous AI agents with 46+ capabilities (code, research, data viz, etc.).
/api/v1/council/consultMulti-expert AI consultation. Routes to specialized departments for comprehensive answers.
/api/v1/knowledge/querySearch the SunCore knowledge base using semantic similarity (RAG).
/api/v1/face-swapAI face swap using InsightFace + CodeFormer. Accepts base64 images, returns swapped result.
/api/v1/usageGet your API usage statistics and remaining credits.
| Parameter | Type | Required | Description |
|---|---|---|---|
| messages | array | Required | Array of message objects with role and content |
| model | string | Optional | Model ID (default: suncore-1) |
| temperature | number | Optional | Sampling temperature (0-2, default: 0.7) |
| max_tokens | integer | Optional | Maximum tokens to generate (default: 4096) |
{
"id": "chatcmpl-abc123def456",
"object": "chat.completion",
"created": 1714300000,
"model": "suncore-1",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 20,
"completion_tokens": 10,
"total_tokens": 30
}
}curl https://suncore.asia/api/v1/images/generations \
-H "Authorization: Bearer sk-sun-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A futuristic city at sunset, cyberpunk style"
}'{
"created": 1714300000,
"data": [
{
"url": "https://suncore.asia/manus-storage/generated-image-abc123.png"
}
]
}curl https://suncore.asia/api/v1/music/generate \
-H "Authorization: Bearer sk-sun-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Upbeat electronic dance track with synth leads",
"genre": "EDM",
"mood": "energetic",
"tempo": 128
}'{
"data": {
"content": "<!-- SUNCORE_MUSIC_DATA:... -->",
"model": "suncore-music"
},
"usage": { "credits_used": 10, "balance_remaining": 490 }
}curl https://suncore.asia/api/v1/agents/invoke \
-H "Authorization: Bearer sk-sun-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Analyze this CSV data and create a summary report",
"capability": "data_viz",
"language": "en"
}'code_gendata_vizweb_searchdeep_researchcreative_writingmath_sciencedoc_analysistranslationdiagramspreadsheetpdf_generationemail_automationbrowser_automationfinancial_analysisseo_optimizationproject_managementcurl https://suncore.asia/api/v1/council/consult \
-H "Authorization: Bearer sk-sun-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What is the best marketing strategy for a SaaS startup?",
"language": "en"
}'{
"data": {
"answer": "Based on analysis from our Marketing, Strategy, and Finance departments...",
"departments": [
{ "id": "marketing", "name": "Marketing", "emoji": "📊" },
{ "id": "strategy", "name": "Strategy", "emoji": "🎯" }
],
"model": "suncore-council"
},
"usage": { "credits_used": 5, "balance_remaining": 495 }
}curl https://suncore.asia/api/v1/knowledge/query \
-H "Authorization: Bearer sk-sun-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "How to set up SunCore API?",
"limit": 5
}'{
"data": {
"results": [
{
"question": "How do I get started with SunCore API?",
"answer": "Visit the API Marketplace to create your API key...",
"category": "getting-started",
"relevance_score": 0.95
}
],
"total": 1
},
"usage": { "credits_used": 1, "balance_remaining": 499 }
}curl https://suncore.asia/api/v1/face-swap \
-H "Authorization: Bearer sk-sun-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source_image": "<base64_encoded_source_face>",
"target_image": "<base64_encoded_target_image>",
"face_restore": true
}'{
"data": {
"image": "<base64_encoded_result>",
"format": "JPEG",
"execution_time_ms": 12500
},
"usage": { "credits_used": 8, "balance_remaining": 492 }
}{
"data": {
"job_id": "abc123-def456",
"status": "processing",
"poll_url": "/api/v1/face-swap/status/abc123-def456"
}
}curl https://suncore.asia/api/v1/audio/transcriptions \
-H "Authorization: Bearer sk-sun-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"audio_url": "https://example.com/audio.mp3",
"language": "th"
}'{
"text": "สวัสดีครับ วันนี้อากาศดีมาก",
"language": "th",
"duration": 3.5,
"segments": [
{
"start": 0.0,
"end": 1.5,
"text": "สวัสดีครับ"
},
{
"start": 1.5,
"end": 3.5,
"text": "วันนี้อากาศดีมาก"
}
]
}| Status | Code | Description |
|---|---|---|
| 401 | invalid_api_key | Missing, invalid, or revoked API key |
| 402 | credits_exhausted | Insufficient credits — top up at /pricing |
| 403 | tier_required | Endpoint requires higher tier (Starter/Pro/Enterprise) |
| 429 | rate_limit_exceeded | Too many requests per minute |
| 429 | quota_exceeded | Monthly request quota exceeded |
| 500 | server_error | Internal server error |
{
"error": {
"message": "Invalid or revoked API key",
"type": "authentication_error",
"code": "invalid_api_key"
}
}$0/mo
Rate: 60/min
Quota: 1,000/mo
$9.99/mo
Rate: 120/min
Quota: 10,000/mo
$19.99/mo
Rate: 300/min
Quota: 100,000/mo
$49.99/mo
Rate: 1,000/min
Quota: Unlimited
Get your API key and start building in minutes.
Search conversations and navigate