Skip to main content
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_KEY

Important: Keep your API key secret. Never expose it in client-side code or public repositories.

Endpoints

Generate an image from a text prompt

Parameters

promptstringrequired

The text prompt describing the image

modelstring

AI model to use (default: gemini-2.0-flash)

widthinteger

Image width in pixels (256-4096)

heightinteger

Image height in pixels (256-4096)

stylestring

Style 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