API Reference v2.0

ZETRAX REST API

The ZETRAX API provides programmatic access to our prompt generation engine. Build integrations, automate workflows, and scale AI-powered creativity in any stack.

Authentication

All API requests must be authenticated using a Bearer token in the Authorization header. You can create and manage API keys in your Dashboard → API Keys.

cURL
Authorization: Bearer zx_live_sk_1a2b3c4d5e6f7g8h9i0j

API keys are scoped to your account. Never share or commit them to version control. Use environment variables.

Base URL

All API requests must be made over HTTPS to the following base URL:

https://api.zetrax.app/v2

Generate a Prompt

POST/prompts/generate

Generate a high-quality AI prompt from the provided subject, style, and lighting parameters. Returns a structured prompt object with variants.

Request Body Parameters

ParameterTypeRequiredDescription
subjectstringRequiredThe primary subject of the prompt (e.g., "Portrait Photography")
stylestringRequiredThe artistic style modifier (e.g., "Cinematic Film", "Watercolor")
lightingstringRequiredLighting descriptor (e.g., "Golden Hour", "Studio Soft Box")
qualitystringOptionalOutput quality tier: "standard" | "premium" | "ultra". Default: "standard"
model_targetstringOptionalTarget AI model: "midjourney" | "dalle3" | "stablediffusion" | "universal"
variantsintegerOptionalNumber of prompt variations to return (1–5). Default: 1
temperaturefloatOptionalCreativity variance 0.0–1.0. Higher = more creative. Default: 0.7

Response

Returns a PromptObject with the generated text, metadata, and usage statistics.

List Prompts

GET/prompts

Returns a paginated list of all prompts generated by the authenticated user. Supports cursor-based pagination and filtering.

Query Parameters

ParameterTypeDescription
limitintegerNumber of results per page (1–100). Default: 20
cursorstringPagination cursor from previous response's next_cursor field
searchstringFull-text search query across prompt content
stylestringFilter by style modifier slug

Rate Limits

API rate limits are applied per API key. Exceeding the limit returns a 429 Too Many Requests response with a Retry-After header.

PlanRequests / minuteRequests / month
Hobby (Free)1050
Pro120Unlimited
EnterpriseCustomCustom

Error Codes

CodeHTTP StatusDescription
invalid_api_key401The provided API key is invalid or expired
rate_limit_exceeded429You've exceeded your plan's rate limit
invalid_params400One or more required parameters are missing or malformed
model_unavailable503The specified model_target is temporarily unavailable
internal_error500An unexpected server error occurred. Our team is notified.