توثيق API
ادمج توليد صور الذكاء الاصطناعي من AuraGraph في تطبيقاتك.
Quick Start
- Create an account at
/register - Get your API key from your
/profilepage - Use the API key as a Bearer token in your requests
- Start generating images!
Authentication
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEYEndpoints
POST
/api/generate
Generate a new image from a text prompt.
Request Body
{
"prompt": "A sunset over mountains",
"style": "realistic",
"aspectRatio": "16:9",
"format": "webp"
}Response
{
"id": "gen_abc123",
"status": "processing",
"estimatedTime": 10
}cURL Example
curl -X POST https://auragraph.ai/api/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"A sunset over mountains","style":"realistic"}'JavaScript Example
const response = await fetch('https://auragraph.ai/api/generate', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
prompt: 'A sunset over mountains',
style: 'realistic',
aspectRatio: '16:9',
}),
});
const { id } = await response.json();GET
/api/generate/status/[id]
Poll for the generation status.
{
"id": "gen_abc123",
"status": "completed",
"url": "https://cdn.auragraph.ai/images/abc123.webp",
"width": 1024,
"height": 576
}GET
/api/gallery
List your generated images.
curl https://auragraph.ai/api/gallery?page=1&limit=20 \ -H "Authorization: Bearer YOUR_API_KEY"
GET
/api/subscription
Get your current subscription status.
curl https://auragraph.ai/api/subscription \ -H "Authorization: Bearer YOUR_API_KEY"
Rate Limits
| Plan | Daily Limit | Requests/min | Max Image Size |
|---|---|---|---|
| Free | 100 | 5 | 1024×1024 |
| Pro | 1,000 | 20 | 2048×2048 |
| Enterprise | Unlimited | 100 | 4096×4096 |
Available Styles
realistic
anime
digital-art
oil-painting
watercolor
3d-render
pixel
sketch
cartoon
cinematic
Aspect Ratios
1:1
16:9
9:16
4:3
3:4