Create a scoped key
In Studio → API keys, create a key with read and/or generate permissions. Save the token when it appears: it is shown once, expires in 90 days and can be revoked anytime.
Bring image creation into your own products and tools. Use our API directly or connect an MCP-compatible assistant, including Codex and Claude.
Image generation requires an active subscription, tokens and provider availability.
curl https://solmare.ai/api/v1/generations \
-H "Authorization: Bearer $SOLMARE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"prompt": "A chrome flower, cinematic studio light",
"quality": "1k",
"aspectRatio": "3:2",
"format": "png"
}'In Studio → API keys, create a key with read and/or generate permissions. Save the token when it appears: it is shown once, expires in 90 days and can be revoked anytime.
POST /api/v1/generations returns a job. Poll GET /api/v1/generations/:id until succeeded or failed. For retries, keep the same Idempotency-Key and identical payload. Use a new UUID for a new image.
Use the /api/mcp URL as a Streamable HTTP MCP server with a Bearer token. Available tools: image_generate, image_get, image_list and get_balance. Each client has its own setup format.
Completed jobs include an authenticated image endpoint. Follow its redirect to download: storage links expire in 60 seconds. A key can only access images belonging to its account. Never embed secret keys in public browser code.
While the GPU provider is not connected, generation returns 503 PROVIDER_UNAVAILABLE without deducting balance. Billing is also unavailable until Stripe is connected. API key management and account access remain available.