Image
Image Generation
Generate images through an enabled image model. The router selects an active provider/model or uses the model specified in the request.
Endpoint
POST
https://aiservice.prabisha.com/image
Request
Send JSON and include the X-API-Key header. A prompt is required.
curl -X POST https://aiservice.prabisha.com/image \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A small glass greenhouse in a rainy city at dusk",
"model": "gemini-3.1-flash-image",
"preferredProvider": "GEMINI",
"size": "1024x1024",
"quality": "standard",
"n": 1
}'
Fields
| Field | Type | Details |
|---|---|---|
| prompt | string, required | Description of the image to generate. |
| model | string | Enabled image model ID. If omitted, the router selects an active default. |
| preferredProvider | string | Optional provider name, such as OPENAI or GEMINI. |
| size | string | 256x256, 512x512, 1024x1024, 1792x1024, or 1024x1792. |
| quality | string | standard or hd. |
| n | integer | Requested count, from 1 to 10. Provider/model support may vary. |
Response
{
"images": ["data:image/png;base64,..."],
"provider": "GEMINI",
"model": "gemini-3.1-flash-image",
"providerId": "provider-id",
"providerModelId": "provider-model-id",
"latency": 1820
}
Each images entry is provider output and may be a data URL or URL. Handle large base64 data appropriately in your client.