API Documentation
Generative AIs API
Integrate AI image generation into your applications with our simple and powerful REST API.
Quick Start
Example Request
curl -X POST https://api.generativeais.com/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "A beautiful sunset"}'Authentication
All API requests require an API key. Include your key in the Authorization header:
Authorization: Bearer YOUR_API_KEYImportant: Keep your API key secret. Never expose it in client-side code or public repositories.
Endpoints
Generate an image from a text prompt
Parameters
promptstringrequiredThe text prompt describing the image
modelstringAI model to use (default: gemini-2.0-flash)
widthintegerImage width in pixels (256-4096)
heightintegerImage height in pixels (256-4096)
stylestringStyle preset to apply
Example Request
curl -X POST https://api.generativeais.com/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A majestic mountain at sunset",
"width": 1024,
"height": 1024,
"style": "photorealistic"
}'Rate Limits
Free
10 req/min
50 images/month
Creator
60 req/min
500 images/month
Pro
120 req/min
Unlimited images