Get your first AI-generated image in under 5 minutes.
Open your terminal and run:
curl -X POST 'https://api.smavatar.com/api/v1/projects/YOUR_PROJECT_ID/jobs/avatars' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"style_id": "pixar-3d",
"quality": "standard",
"size": "square",
"parameters": {
"subject": "fox",
"theme": "warrior",
"gender": "female",
"color": "orange"
}
}'
You'll get a response like:
{
"success": true,
"job": {
"id": "abc123-def456-...",
"job_type": "avatar",
"status": "pending",
"estimated_token_cost": 50
},
"message": "Avatar job created successfully."
}
Poll for completion (jobs typically complete in ~10 seconds):
curl 'https://api.smavatar.com/api/v1/projects/YOUR_PROJECT_ID/jobs/avatars/JOB_ID' \
-H 'Authorization: Bearer YOUR_API_KEY'
When status is "completed", you'll get an image URL in the assets array.
The response includes a storage_path - construct the full URL:
https://hxqvyxnnppomqqwglxwo.supabase.co/storage/v1/object/public/avatars/{storage_path}
Open that URL to see your AI-generated avatar!
Want to generate a map? Here's how:
First, discover available locations:
curl 'https://api.smavatar.com/api/mcp/tools/list-locations?type=country'
This returns locations like:
{
"data": [
{
"id": "bdd56f14-e776-418a-ab18-89c8138df978",
"name": "United States of America",
"location_code": "us"
}
]
}
curl -X POST 'https://api.smavatar.com/api/v1/projects/YOUR_PROJECT_ID/jobs/maps' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"location_id": "bdd56f14-e776-418a-ab18-89c8138df978",
"width": 1400,
"height": 900,
"theme": "modern",
"output_format": "png"
}'
Maps complete in ~5 seconds. Poll for status the same way as avatars.