- OpenAPI Version:
3.1.0 - API Version:
0.3.0
Documentation for gen.pollinations.ai - the pollinations.ai API gateway.
Get your API key at https://enter.pollinations.ai
curl 'https://gen.pollinations.ai/image/a%20cat?model=flux' \
-H 'Authorization: Bearer YOUR_API_KEY'curl 'https://gen.pollinations.ai/v1/chat/completions' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model": "openai", "messages": [{"role": "user", "content": "Hello"}]}'curl 'https://gen.pollinations.ai/v1/chat/completions' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model": "openai", "messages": [{"role": "user", "content": [{"type": "text", "text": "Describe this image"}, {"type": "image_url", "image_url": {"url": "https://example.com/image.jpg"}}]}]}'Gemini Tools: gemini, gemini-large have code_execution enabled (can generate images/plots). gemini-search has google_search enabled. Responses may include content_blocks with image_url, text, or thinking types.
curl 'https://gen.pollinations.ai/text/hello?key=YOUR_API_KEY'curl 'https://gen.pollinations.ai/v1/chat/completions' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"model": "openai", "messages": [{"role": "user", "content": "Write a poem"}], "stream": true}' \
--no-bufferAlways check available models before testing:
- Image models: /image/models
- Text models: /v1/models
Two key types (both consume Pollen from your balance):
- Publishable Keys (
pk_):⚠️ Beta - not yet ready for production use. For client-side apps, IP rate-limited (1 pollen per IP per hour). Warning: Exposing in public code will consume your Pollen if your app gets traffic. - Secret Keys (
sk_): Server-side only, no rate limits. Keep secret - never expose publicly.
Auth methods:
- Header:
Authorization: Bearer YOUR_API_KEY - Query param:
?key=YOUR_API_KEY
Check your balance and usage:
# Check pollen balance
curl 'https://gen.pollinations.ai/account/balance' \
-H 'Authorization: Bearer YOUR_API_KEY'
# Get profile info
curl 'https://gen.pollinations.ai/account/profile' \
-H 'Authorization: Bearer YOUR_API_KEY'
# View usage history
curl 'https://gen.pollinations.ai/account/usage' \
-H 'Authorization: Bearer YOUR_API_KEY'- URL:
https://gen.pollinations.ai
- Method:
GET - Path:
/account/profile - Tags: gen.pollinations.ai
Get user profile info (name, email, GitHub username, tier, createdAt, nextResetAt). Requires account:profile permission for API keys.
-
createdAt(required)string, format:date-time— Account creation timestamp (ISO 8601) -
email(required)object— User's email address -
githubUsername(required)object— GitHub username if linked -
image(required)object— Profile picture URL (e.g. GitHub avatar) -
name(required)object— User's display name -
nextResetAt(required)object— Next daily pollen reset timestamp (ISO 8601) -
tier(required)string, possible values:"anonymous", "microbe", "spore", "seed", "flower", "nectar", "router"— User's current tier level
Example:
{
"name": "",
"email": "",
"githubUsername": "",
"image": "",
"tier": "anonymous",
"createdAt": "",
"nextResetAt": ""
}- Method:
GET - Path:
/account/balance - Tags: gen.pollinations.ai
Get pollen balance. Returns the key's remaining budget if set, otherwise the user's total balance. Requires account:balance permission for API keys.
-
balance(required)number— Remaining pollen balance (combines tier, pack, and crypto balances)
Example:
{
"balance": 1
}- Method:
GET - Path:
/account/usage - Tags: gen.pollinations.ai
Get request history and spending data. Supports JSON and CSV formats. Requires account:usage permission for API keys.
-
count(required)number— Number of records returned -
usage(required)array— Array of usage recordsItems:
-
api_key(required)object— API key identifier used (masked) -
api_key_type(required)object— Type of API key ('secret', 'publishable') -
cost_usd(required)number— Cost in USD for this request -
input_audio_tokens(required)number— Number of input audio tokens -
input_cached_tokens(required)number— Number of cached input tokens -
input_image_tokens(required)number— Number of input image tokens -
input_text_tokens(required)number— Number of input text tokens -
meter_source(required)object— Billing source ('tier', 'pack', 'crypto') -
model(required)object— Model used for generation -
output_audio_tokens(required)number— Number of output audio tokens -
output_image_tokens(required)number— Number of output image tokens (1 per image) -
output_reasoning_tokens(required)number— Number of reasoning tokens (for models with chain-of-thought) -
output_text_tokens(required)number— Number of output text tokens -
response_time_ms(required)object— Response time in milliseconds -
timestamp(required)string— Request timestamp (YYYY-MM-DD HH:mm:ss format) -
type(required)string— Request type (e.g., 'generate.image', 'generate.text')
-
Example:
{
"usage": [
{
"timestamp": "",
"type": "",
"model": "",
"api_key": "",
"api_key_type": "",
"meter_source": "",
"input_text_tokens": 1,
"input_cached_tokens": 1,
"input_audio_tokens": 1,
"input_image_tokens": 1,
"output_text_tokens": 1,
"output_reasoning_tokens": 1,
"output_audio_tokens": 1,
"output_image_tokens": 1,
"cost_usd": 1,
"response_time_ms": 1
}
],
"count": 1
}- Method:
GET - Path:
/account/usage/daily - Tags: gen.pollinations.ai
Get daily aggregated usage data (last 90 days). Supports JSON and CSV formats. Requires account:usage permission for API keys. Results are cached for 1 hour.
-
count(required)number— Number of records returned -
usage(required)array— Array of daily usage recordsItems:
-
cost_usd(required)number— Total cost in USD -
date(required)string— Date (YYYY-MM-DD format) -
meter_source(required)object— Billing source ('tier', 'pack', 'crypto') -
model(required)object— Model used -
requests(required)number— Number of requests
-
Example:
{
"usage": [
{
"date": "",
"model": "",
"meter_source": "",
"requests": 1,
"cost_usd": 1
}
],
"count": 1
}- Method:
GET - Path:
/account/key - Tags: gen.pollinations.ai
Get API key status and information. Returns key validity, type, expiry, permissions, and remaining budget. This endpoint allows validating keys without making expensive generation requests. Requires API key authentication.
-
expiresAt(required)object— Expiry timestamp in ISO 8601 format, null if never expires -
expiresIn(required)object— Seconds until expiry, null if never expires -
name(required)object— Display name of the API key -
permissions(required)object— API key permissions-
account(required)object— List of account permissions, null = no account access -
models(required)object— List of allowed model IDs, null = all models allowed
-
-
pollenBudget(required)object— Remaining pollen budget for this key, null = unlimited (uses user balance) -
rateLimitEnabled(required)boolean— Whether rate limiting is enabled for this key -
type(required)string, possible values:"publishable", "secret"— Type of API key -
valid(required)boolean— Whether the API key is valid and active
Example:
{
"valid": true,
"type": "publishable",
"name": "",
"expiresAt": "",
"expiresIn": 1,
"permissions": {
"models": [
""
],
"account": [
""
]
},
"pollenBudget": 1,
"rateLimitEnabled": true
}- Method:
GET - Path:
/v1/models - Tags: gen.pollinations.ai
Get available text models (OpenAI-compatible). If an API key with model restrictions is provided, only allowed models are returned.
-
data(required)arrayItems:
-
created(required)number -
id(required)string -
object(required)string
-
-
object(required)string
Example:
{
"object": "list",
"data": [
{
"id": "",
"object": "model",
"created": 1
}
]
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 500,
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Oh snap, something went wrong on our end. We're on it!",
"timestamp": "",
"requestId": "",
"cause": null
}
}- Method:
GET - Path:
/image/models - Tags: gen.pollinations.ai
Get a list of available image generation models with pricing, capabilities, and metadata. If an API key with model restrictions is provided, only allowed models are returned.
Array of:
Example:
[]-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 500,
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Oh snap, something went wrong on our end. We're on it!",
"timestamp": "",
"requestId": "",
"cause": null
}
}- Method:
GET - Path:
/text/models - Tags: gen.pollinations.ai
Get a list of available text generation models with pricing, capabilities, and metadata. If an API key with model restrictions is provided, only allowed models are returned.
Array of:
Example:
[]-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 500,
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Oh snap, something went wrong on our end. We're on it!",
"timestamp": "",
"requestId": "",
"cause": null
}
}- Method:
GET - Path:
/audio/models - Tags: gen.pollinations.ai
Get a list of available audio models with pricing, capabilities, and metadata. If an API key with model restrictions is provided, only allowed models are returned.
Array of:
Example:
[]-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 500,
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Oh snap, something went wrong on our end. We're on it!",
"timestamp": "",
"requestId": "",
"cause": null
}
}- Method:
POST - Path:
/v1/chat/completions - Tags: gen.pollinations.ai
OpenAI-compatible chat completions endpoint.
Legacy endpoint: /openai (deprecated, use /v1/chat/completions instead)
Authentication (Secret Keys Only):
Include your API key in the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEY
API keys can be created from your dashboard at enter.pollinations.ai. Both key types consume Pollen. Secret keys have no rate limits.
-
messages(required)arrayItems:
Any of:
-
content(required)object -
role(required)string -
cache_controlobject-
type(required)string, possible values:"ephemeral"
-
-
namestring
-
content(required)object -
role(required)string -
cache_controlobject-
type(required)string, possible values:"ephemeral"
-
-
namestring
-
content(required)object -
role(required)string -
namestring
-
role(required)string -
cache_controlobject-
type(required)string, possible values:"ephemeral"
-
-
contentobject -
function_callobject -
namestring -
tool_callsarrayItems:
-
function(required)object-
arguments(required)string -
name(required)string
-
-
id(required)string -
type(required)string
-
-
content(required)object -
role(required)string -
tool_call_id(required)string -
cache_controlobject-
type(required)string, possible values:"ephemeral"
-
-
content(required)object -
name(required)string -
role(required)string
-
-
audioobject-
format(required)string, possible values:"wav", "mp3", "flac", "opus", "pcm16" -
voice(required)string, possible values:"alloy", "echo", "fable", "onyx", "shimmer", "coral", "verse", "ballad", "ash", "sage", "amuch", "dan"
-
-
frequency_penaltyobject, default:0 -
function_callobject -
functionsarrayItems:
-
name(required)string -
descriptionstring -
parametersobject
-
-
logit_biasobject, default:null -
logprobsobject, default:false -
max_tokensobject -
modalitiesarrayItems:
string, possible values:"text", "audio" -
modelstring, default:"openai"— AI model for text generation. See /v1/models for full list. -
parallel_tool_callsboolean, default:true -
presence_penaltyobject, default:0 -
reasoning_effortstring, possible values:"none", "minimal", "low", "medium", "high", "xhigh" -
repetition_penaltyobject -
response_formatobject -
seedobject -
stopobject -
streamobject, default:false -
stream_optionsobject -
temperatureobject, default:1 -
thinkingobject -
thinking_budgetinteger -
tool_choiceobject -
toolsarrayItems:
Any of:
-
function(required)object-
name(required)string -
descriptionstring -
parametersobject -
strictobject, default:false
-
-
type(required)string
-
type(required)string, possible values:"code_execution", "google_search", "google_maps", "url_context", "computer_use", "file_search"
-
-
top_logprobsobject -
top_pobject, default:1 -
userstring
Example:
{
"messages": [
{
"content": "",
"role": "system",
"name": "",
"cache_control": {
"type": "ephemeral"
}
}
],
"model": "openai",
"modalities": [
"text"
],
"audio": {
"voice": "alloy",
"format": "wav"
},
"frequency_penalty": 0,
"repetition_penalty": 0,
"logit_bias": null,
"logprobs": false,
"top_logprobs": 0,
"max_tokens": 0,
"presence_penalty": 0,
"response_format": {
"type": "text"
},
"seed": -1,
"stop": "",
"stream": false,
"stream_options": {
"include_usage": true
},
"thinking": {
"type": "disabled",
"budget_tokens": 1
},
"reasoning_effort": "none",
"thinking_budget": 0,
"temperature": 1,
"top_p": 1,
"tools": [
{
"type": "function",
"function": {
"description": "",
"name": "",
"parameters": {
"propertyName*": "anything"
},
"strict": false
}
}
],
"tool_choice": "none",
"parallel_tool_calls": true,
"user": "",
"function_call": "none",
"functions": [
{
"description": "",
"name": "",
"parameters": {
"propertyName*": "anything"
}
}
]
}-
choices(required)arrayItems:
-
content_filter_resultsobject -
finish_reasonobject -
indexinteger -
logprobsobject -
messageobject-
role(required)string -
audioobject -
contentobject -
content_blocksobject -
function_callobject -
reasoning_contentobject -
tool_callsobject
-
-
-
created(required)integer -
id(required)string -
model(required)string -
object(required)string -
usage(required)object -
citationsarrayItems:
string -
prompt_filter_resultsobject -
system_fingerprintobject -
user_tierstring, possible values:"anonymous", "seed", "flower", "nectar"
Example:
{
"id": "",
"choices": [
{
"finish_reason": "",
"index": 0,
"message": {
"content": "",
"tool_calls": [
{
"id": "",
"type": "function",
"function": {
"name": "",
"arguments": ""
}
}
],
"role": "assistant",
"function_call": {
"arguments": "",
"name": ""
},
"content_blocks": [
{
"type": "text",
"text": "",
"cache_control": {
"type": "ephemeral"
}
}
],
"audio": {
"transcript": "",
"data": "",
"id": "",
"expires_at": -9007199254740991
},
"reasoning_content": ""
},
"logprobs": {
"content": [
{
"token": "",
"logprob": 1,
"bytes": [
"[Max Depth Exceeded]"
],
"top_logprobs": [
{
"token": "[Max Depth Exceeded]",
"logprob": "[Max Depth Exceeded]",
"bytes": "[Max Depth Exceeded]"
}
]
}
]
},
"content_filter_results": null
}
],
"prompt_filter_results": [
{
"prompt_index": 0
}
],
"created": -9007199254740991,
"model": "",
"system_fingerprint": "",
"object": "chat.completion",
"user_tier": "anonymous",
"citations": [
""
]
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 400,
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Something was wrong with the input data, check the details for more info.",
"timestamp": "",
"requestId": "",
"cause": null
}
}Status: 401 Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.
-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 401,
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 402,
"success": false,
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Insufficient pollen balance or API key budget exhausted.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 403,
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Access denied! You don't have the required permissions for this resource or model.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 500,
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Oh snap, something went wrong on our end. We're on it!",
"timestamp": "",
"requestId": "",
"cause": null
}
}- Method:
GET - Path:
/text/{prompt} - Tags: gen.pollinations.ai
Generates text from text prompts.
Authentication:
Include your API key either:
- In the
Authorizationheader as a Bearer token:Authorization: Bearer YOUR_API_KEY - As a query parameter:
?key=YOUR_API_KEY
API keys can be created from your dashboard at enter.pollinations.ai.
string
Example:
true-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 400,
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Something was wrong with the input data, check the details for more info.",
"timestamp": "",
"requestId": "",
"cause": null
}
}Status: 401 Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.
-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 401,
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 402,
"success": false,
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Insufficient pollen balance or API key budget exhausted.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 403,
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Access denied! You don't have the required permissions for this resource or model.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 500,
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Oh snap, something went wrong on our end. We're on it!",
"timestamp": "",
"requestId": "",
"cause": null
}
}- Method:
GET - Path:
/image/{prompt} - Tags: gen.pollinations.ai
Generate an image or video from a text prompt.
Image Models: flux (default), turbo, gptimage, kontext, seedream, nanobanana, nanobanana-pro
Video Models: veo, seedance
veo: Text-to-video only (4-8 seconds)seedance: Text-to-video and image-to-video (2-10 seconds)
Authentication:
Include your API key either:
- In the
Authorizationheader as a Bearer token:Authorization: Bearer YOUR_API_KEY - As a query parameter:
?key=YOUR_API_KEY
API keys can be created from your dashboard at enter.pollinations.ai.
string, format: binary
Example:
{}string, format: binary
Example:
{}string, format: binary
Example:
{}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 400,
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Something was wrong with the input data, check the details for more info.",
"timestamp": "",
"requestId": "",
"cause": null
}
}Status: 401 Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.
-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 401,
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 402,
"success": false,
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Insufficient pollen balance or API key budget exhausted.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 403,
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Access denied! You don't have the required permissions for this resource or model.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 500,
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Oh snap, something went wrong on our end. We're on it!",
"timestamp": "",
"requestId": "",
"cause": null
}
}- Method:
GET - Path:
/audio/{text} - Tags: gen.pollinations.ai
Generate audio from text — speech (TTS) or music.
Models: Use model query param to select:
- TTS (default):
elevenlabs,tts-1, etc. - Music:
elevenmusic(ormusic)
TTS Voices: alloy, echo, fable, onyx, nova, shimmer, ash, ballad, coral, sage, verse, rachel, domi, bella, elli, charlotte, dorothy, sarah, emily, lily, matilda, adam, antoni, arnold, josh, sam, daniel, charlie, james, fin, callum, liam, george, brian, bill
Output Formats (TTS only): mp3, opus, aac, flac, wav, pcm
Music options: duration in seconds (3-300), instrumental=true
Authentication:
Include your API key either:
- In the
Authorizationheader as a Bearer token:Authorization: Bearer YOUR_API_KEY - As a query parameter:
?key=YOUR_API_KEY
API keys can be created from your dashboard at enter.pollinations.ai.
string, format: binary
Example:
{}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 400,
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Something was wrong with the input data, check the details for more info.",
"timestamp": "",
"requestId": "",
"cause": null
}
}Status: 401 Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.
-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 401,
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 402,
"success": false,
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Insufficient pollen balance or API key budget exhausted.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 403,
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Access denied! You don't have the required permissions for this resource or model.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 500,
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Oh snap, something went wrong on our end. We're on it!",
"timestamp": "",
"requestId": "",
"cause": null
}
}- Method:
POST - Path:
/v1/audio/speech - Tags: gen.pollinations.ai
Generate audio from text — speech (TTS) or music.
This endpoint is OpenAI TTS API compatible. Set model to elevenmusic (or alias music) to generate music instead of speech.
TTS Voices: alloy, echo, fable, onyx, nova, shimmer, ash, ballad, coral, sage, verse, rachel, domi, bella, elli, charlotte, dorothy, sarah, emily, lily, matilda, adam, antoni, arnold, josh, sam, daniel, charlie, james, fin, callum, liam, george, brian, bill
Output Formats (TTS only): mp3, opus, aac, flac, wav, pcm
-
input(required)string— The text to generate audio for. Maximum 4096 characters. -
durationnumber— Music duration in seconds, 3-300 (elevenmusic only) -
instrumentalboolean— If true, guarantees instrumental output (elevenmusic only) -
modelstring -
response_formatstring, possible values:"mp3", "opus", "aac", "flac", "wav", "pcm", default:"mp3"— The audio format for the output. -
speednumber, default:1— The speed of the generated audio. 0.25 to 4.0, default 1.0. -
voicestring, default:"alloy"— The voice to use. Can be any preset name (alloy, echo, fable, onyx, nova, shimmer, ash, ballad, coral, sage, verse, rachel, domi, bella, elli, charlotte, dorothy, sarah, emily, lily, matilda, adam, antoni, arnold, josh, sam, daniel, charlie, james, fin, callum, liam, george, brian, bill) OR a custom ElevenLabs voice ID (UUID from your dashboard).
Example:
{
"model": "",
"input": "Hello, welcome to Pollinations!",
"voice": "rachel",
"response_format": "mp3",
"speed": 1,
"duration": 30,
"instrumental": false
}string, format: binary
Example:
{}string, format: binary
Example:
{}string, format: binary
Example:
{}string, format: binary
Example:
{}string, format: binary
Example:
{}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 400,
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Something was wrong with the input data, check the details for more info.",
"timestamp": "",
"requestId": "",
"cause": null
}
}Status: 401 Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.
-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 401,
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 500,
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Oh snap, something went wrong on our end. We're on it!",
"timestamp": "",
"requestId": "",
"cause": null
}
}- Method:
POST - Path:
/v1/audio/transcriptions - Tags: gen.pollinations.ai
Transcribe audio to text using Whisper or ElevenLabs Scribe.
This endpoint is OpenAI Whisper API compatible.
Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm
Models: whisper-large-v3 (default), whisper-1, scribe
-
file(required)string, format:binary— The audio file to transcribe. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm. -
languagestring— Language of the audio in ISO-639-1 format (e.g. `en`, `fr`). Improves accuracy. -
modelstring, default:"whisper-large-v3"— The model to use. Options: `whisper-large-v3`, `whisper-1`, `scribe`. -
promptstring— Optional text to guide the model's style or continue a previous segment. -
response_formatstring, possible values:"json", "text", "srt", "verbose_json", "vtt", default:"json"— The format of the transcript output. -
temperaturenumber— Sampling temperature between 0 and 1. Lower is more deterministic.
Example:
{
"file": {},
"model": "whisper-large-v3",
"language": "",
"prompt": "",
"response_format": "json",
"temperature": 1
}-
textstring
Example:
{
"text": ""
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 400,
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Something was wrong with the input data, check the details for more info.",
"timestamp": "",
"requestId": "",
"cause": null
}
}Status: 401 Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.
-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 401,
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required. Please provide an API key via Authorization header (Bearer token) or ?key= query parameter.",
"timestamp": "",
"requestId": "",
"cause": null
}
}-
error(required)object-
code(required)string -
details(required)object -
message(required)object -
timestamp(required)string -
causeobject -
requestIdstring
-
-
status(required)number -
success(required)boolean
Example:
{
"status": 500,
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "Oh snap, something went wrong on our end. We're on it!",
"timestamp": "",
"requestId": "",
"cause": null
}
}- Method:
POST - Path:
/upload - Tags: media.pollinations.ai
Upload an image, audio, or video file. Supports multipart/form-data, raw binary, or base64 JSON. Returns a content-addressed hash URL. Duplicate files return the existing hash.
-
contentType(required)string -
duplicate(required)boolean -
id(required)string -
size(required)integer -
url(required)string
Example:
{
"id": "",
"url": "",
"contentType": "",
"size": 1,
"duplicate": true
}-
error(required)string
Example:
{
"error": ""
}-
error(required)string
Example:
{
"error": ""
}-
error(required)string
Example:
{
"error": ""
}- Method:
SERVERS - Path:
/upload
- Method:
GET - Path:
/{hash} - Tags: media.pollinations.ai
Get a file by its content hash. No authentication required. Responses are cached immutably.
-
error(required)string
Example:
{
"error": ""
}-
error(required)string
Example:
{
"error": ""
}- Method:
HEAD - Path:
/{hash} - Tags: media.pollinations.ai
Check existence and metadata without downloading the file.
- Method:
SERVERS - Path:
/{hash}
- Type:
object
-
type(required)string, possible values:"ephemeral"
Example:
{
"type": "ephemeral"
}- Type:
Example:
- Type:
object
-
input(required)string— The text to generate audio for. Maximum 4096 characters. -
durationnumber— Music duration in seconds, 3-300 (elevenmusic only) -
instrumentalboolean— If true, guarantees instrumental output (elevenmusic only) -
modelstring -
response_formatstring, possible values:"mp3", "opus", "aac", "flac", "wav", "pcm", default:"mp3"— The audio format for the output. -
speednumber, default:1— The speed of the generated audio. 0.25 to 4.0, default 1.0. -
voicestring, default:"alloy"— The voice to use. Can be any preset name (alloy, echo, fable, onyx, nova, shimmer, ash, ballad, coral, sage, verse, rachel, domi, bella, elli, charlotte, dorothy, sarah, emily, lily, matilda, adam, antoni, arnold, josh, sam, daniel, charlie, james, fin, callum, liam, george, brian, bill) OR a custom ElevenLabs voice ID (UUID from your dashboard).
Example:
{
"model": "",
"input": "Hello, welcome to Pollinations!",
"voice": "rachel",
"response_format": "mp3",
"speed": 1,
"duration": 30,
"instrumental": false
}