AI image generation API: Nano Banana, Flux and Seedream in one place
The Image studio in your apillms console lets you generate images from a prompt without writing any code. This post walks through each setting, what the image models cost, how to call the same models from the API, and where your generated files end up.
Where to find it
After you log in, the Image studio is one of the console pages alongside Overview, Playground, Video studio and Voice studio. New accounts get 50 free starter credits, so you can try a few generations before paying anything. You'll need an API key only if you want the API route instead of the UI; it's created automatically at sign-up and visible on the API keys page.
Picking a model
The studio gives you a dropdown of image models. Each one has a credit cost per image at its cheapest tier, shown before you generate. Here's the current lineup:
| Model | Credits per image (cheapest tier) |
|---|---|
| nano-banana-2 | 13 |
| nano-banana | 22 |
| nano-banana-pro | 22 |
| image-gpt-2.5-flare | 22 |
| image-gpt-2 | 30 |
| kling-3.0-omni-image | 30 |
| flux-2-pro | 32 |
| grok-image | 32 |
| kling-o1-image | 32 |
| seedream-4.5 | 32 |
| seedream-5-lite | 32 |
| seedream-5-pro | 81 |
| image-gpt-2.5-sunburst | 85 |
Since 1 credit = $0.005, a nano-banana-2 image at 13 credits costs $0.065, while an image-gpt-2.5-sunburst image at 85 credits costs $0.425. These are the cheapest-tier prices; higher size or quality settings on the same model move it into a higher credit tier, which the studio reflects in the estimate before you generate. If you're not sure which model fits your style, generating a handful of test images across a few models at the cheapest tier is affordable enough to just compare results directly.
Setting up the generation
Once you've picked a model, the studio exposes:
- Prompt — your text description of the image.
- Aspect ratio — square, portrait, landscape, etc., depending on what the model supports.
- Size / quality — resolution and quality tier, which is what moves a model between its credit tiers.
- Reference image URLs — paste in one or more URLs if the model supports image-to-image or style/character references.
Before you hit generate, the studio shows an estimated cost based on your current settings. That estimate updates as you change size, quality or model, so you can see the tradeoff before spending credits. Failed jobs are not billed, so a generation that errors out doesn't cost you anything.
A typical workflow
- Write a clear, specific prompt — describe subject, style, lighting, composition.
- Choose an aspect ratio that matches where the image will be used (square for social, landscape for banners, portrait for mobile).
- If you want the output to resemble an existing photo or character, add its URL under reference images.
- Check the estimated cost, then generate.
- Review the result in the studio, and regenerate with a tweaked prompt or different model if needed.
Writing prompts that actually use the settings
A few habits make the dropdown settings worth having:
- Put style and medium early in the prompt ("studio product photo, soft lighting, white background") rather than at the end — some models weight earlier tokens more heavily.
- If you're using reference image URLs for a character or product, keep the prompt focused on what should change (pose, background, outfit) rather than re-describing the subject the reference already shows.
- Match aspect ratio to the final use case before generating rather than cropping afterward — cropping a square render into a banner usually loses the composition you asked for.
- When a result is close but not right, regenerate with a smaller edit to the prompt instead of rewriting it from scratch. It's cheaper to iterate at a low-tier model first, then re-run your final prompt at a higher-quality tier once you're happy with the composition.
Troubleshooting common issues
- Reference image not reflected in output — confirm the URL is publicly reachable (not behind login or expiring soon) and points directly to the image file, not an HTML page.
- Job fails outright — failed jobs are not billed, so check the prompt for anything the model might reject, then retry. If it keeps failing, try a different model from the dropdown.
- Cost estimate higher than expected — check size/quality; higher tiers of the same model (for example seedream-5-lite vs seedream-5-pro) carry different credit costs even though both are "seedream."
- Can't find a past generation — check the Media library first; if it's been a while, it may have aged out since items are kept only for a limited time.
Using the API instead
If you want to generate images from code rather than the console, the same models are reachable over the API using your single API key against the OpenAI-compatible base URL https://apillms.com/v1. If you're new to calling apillms from code, the Python quickstart and Node.js quickstart cover authentication and request basics that apply here too — the pattern is the same key and base URL, you just swap the chat completion call for an image generation call on your chosen model id. A quick cURL check that your key works at all looks like:
curl https://apillms.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"ping"}]}'
Once that returns a response, you know your key and base URL are correct, and you can point the same credentials at an image generation request for any model from the table above. The full list of available models, including which support reference images, is on the Models & API page with capability filters.
Using images as part of an agent workflow
You can also drive image generation as a tool call from an AI agent using the apillms MCP server, which exposes generate_image and list_image_models tools alongside chat, video and voice tools. That's covered in the MCP server guide, useful if you want an agent (in Claude Code, Cursor, or another MCP client) to generate images as a step in a larger task — for example, generating a texture or reference image and then handing it to Blender over its own MCP integration, as described in the Blender guide.
To add the MCP server in Claude Code:
claude mcp add --transport http apillms https://apillms.com/mcp --header "Authorization: Bearer YOUR_KEY"
Once connected, the agent can call list_image_models to see what's available and generate_image with a model id, prompt, and any reference images, then job_status to check whether the generation finished. This is the same underlying job system as the studio UI, so cost and billing behavior (failed jobs not charged) is identical either way.
Finding your images afterward
Every image you generate — through the studio or the API — lands in the Media library. It holds generated images, videos and audio together, but only for a limited time, so download anything you want to keep rather than relying on the library as permanent storage.
If you're generating a lot of images and want to track spend, the Usage page breaks activity down by today, 7 days, and 30 days, with filters by product type and status, and a CSV export if you need the raw numbers for a report or to reconcile against a client invoice.
Keeping an eye on cost
Image generation is paid out of the same credit balance as chat and video. Credits never expire, so there's no pressure to use them up before a deadline. If you're estimating a budget for a batch of images, multiply the model's credit cost by the number of images and by $0.005 per credit — the studio's cost estimate does this for you per image before you commit.
For reference, the Starter pack ($5) gives 1000 credits, Builder ($20) gives 4200 credits, Pro ($50) gives 11000 credits, and Scale ($100) gives 23000 credits. At 13 credits per image, a Starter pack covers roughly 76 nano-banana-2 images; at 81 credits per image, the same pack covers roughly 12 seedream-5-pro images. For a side-by-side of what packs cost and how far credits go across other products too, check pricing, and compare has a live comparison view if you're coming from another gateway.
Takeaway
The Image studio is a straightforward way to try image models without code: pick a model, set your prompt and aspect ratio, optionally add reference images, check the estimated cost, and generate. For automated or agent-driven workflows, the same models are available through the API or the MCP server's generate_image tool. Either way, failed jobs aren't billed and your results land in the media library for download, so pull them out before they age out.
Try apillms
One API key for Claude, GPT, Grok, DeepSeek and Kimi. OpenAI- and Anthropic-compatible, prompt caching included, pay-as-you-go from $5 with PayPal or card. Credits never expire.
FAQ
Which image model is cheapest on apillms?
nano-banana-2 is the cheapest at 13 credits per image at its lowest tier, which works out to $0.065 per image since 1 credit equals $0.005.
Does the Image studio tell me the cost before I generate?
Yes, the studio shows an estimated cost based on your selected model, size and quality before you generate, and it updates as you change those settings.
What happens if an image generation fails?
Failed jobs are not billed, so you only pay for images that are successfully generated, whether you use the studio, the API, or the MCP server's generate_image tool.
How long are generated images stored, and can I generate them from code?
Generated images are kept in the Media library for a limited time, so download what you want to keep. You can also generate the same models from code via the OpenAI-compatible base URL at https://apillms.com/v1, or as an agent tool through the MCP server.