Generate images and search free stock - from your code
One bearer key. A clean, credit-metered REST API. An OpenAPI 3.1 spec and agent-ready docs at /llms.txt. Built agentic-first so your tools - and your agents - feel at home.
Generate
Text-to-image across multiple models.
Search stock
Browse a free, commercial-use library.
Metadata
Prompt, SEO, license, download URL.
Authentication
Every request is authenticated with a bearer key. Create and revoke keys in your dashboard. Your key is shown once at creation and only its hash is stored - keep it secret.
Authorization: Bearer pf_live_...Quickstart
Generate an image (consumes the free daily allowance first, then credits)
curl -X POST https://pixelforgeai.dev/api/v1/images/generate \
-H "Authorization: Bearer pf_live_..." \
-H "Content-Type: application/json" \
-d '{"prompt":"a serene Swiss mountain lake at golden hour","aspectRatio":"16:9"}'Search the free stock library (no credits charged)
curl "https://pixelforgeai.dev/api/v1/images?filter=style:watercolor&sort=popular&limit=24" \
-H "Authorization: Bearer pf_live_..."Generation is synchronous: the call returns when the image is ready (typically a few seconds). Responses use a consistent envelope - { "data": ... } on success, { "error": { "code", "message" } } on failure.
Endpoints
| Method | Path | Description | Cost |
|---|---|---|---|
| POST | /api/v1/images/generate | Generate an image | Credits |
| GET | /api/v1/images/{idOrSlug} | Get image metadata | Free |
| GET | /api/v1/images | Browse / search images | Free |
| GET | /api/v1/models | List available models | Free |
| GET | /api/v1/me | Get key owner info | Free |
Pricing
Image generation consumes credits - your free daily allowance is always used first, then credits from your plan. Browsing, search, image metadata, the models list, and account info are free. See pricing for plans and credit packs.
Licensing
Every approved image is free to use under the PixelForge Free License - free for commercial and personal use, no attribution required.