AI for imagesWrite what you want and get the image
Describe the image you want and get it ready to use, in the Playground, through the API or in your coding agent.
One image
- ✓From a description
- ✓In the size you choose
- ✓Pay only when it is ready
- ✓Free Sandbox

openai/gpt-image-2/text-to-imageA bright, modern office with plants and soft morning light.

Write what you want and get the image
The clearer the description, the better the result: the place, the light, the colours and the style.

A bright, modern office with plants and soft morning light
- openai/gpt-image-2/text-to-image
- size: 1024x1024
- 2 credits per image (example)
Three ways to create images
The same models and the same credits, wherever suits you best.

In the Playground
On the «Image» tab in Meu Interweb: type, choose the model and see the result, no code.
Through the API
With POST /v1/media/generations, from your website or system, also in bulk.
In your agent
In Claude Code, Codex or Cursor via our MCP server, or in the terminal with aio.
From the request to the finished image
The request answers at once, with the id and the reserved credits. Then you check the status every 5 seconds until the image is ready.
processingGenerating
The request returns 202, the generation id and the reserved credits in credits_reserved.
completedReady
Images in outputs, real cost in credits_charged. The rest of the reservation comes back.
failedFailed
The reason is in error. Nothing is charged and the whole reservation goes back to your balance.
An image in a few lines
The OpenAI SDK does not have these operations: use plain HTTP requests. The model fields go in input, and you can see them in GET /v1/models/{id}.
- Request:
POST /v1/media/generations - Status:
GET /v1/media/generations/{id} - Retries: with the Idempotency-Key header you never pay twice for the same image.
import os, time, requests
API = "https://api.interweb.ao/v1"
H = {"Authorization": "Bearer " + os.environ["INTERWEB_API_KEY"]}
job = requests.post(API + "/media/generations", headers=H, timeout=30, json={
"model": "openai/gpt-image-2/text-to-image",
"input": {"prompt": "A bright, modern office with plants and soft morning light",
"size": "1024x1024"},
}).json()["data"]
while job["status"] == "processing":
time.sleep(5)
job = requests.get(API + "/media/generations/" + job["id"],
headers=H, timeout=30).json()["data"]
print(job["status"], job["outputs"], job["credits_charged"])# in the terminal, with the aio command aio generate image "a lighthouse at sunset" --opt size=1024x1024 --out images/ # see the image models and their prices aio models --type image
# in Claude Code, Codex or Cursor, after associating the MCP "Generate a square image of a modern office with plants and morning light, and save it to public/img/hero.png." # the agent uses the generate_image tool
Before you generate in bulk
What helps you get good images without wasting credits.

Do
- Try the description in the Playground before putting it in your code.
- Check the model price in GET /v1/models and your balance in GET /v1/ai/balance.
- Download the finished images and keep your own copy.
- Write your program with the sandbox_ key: the generation completes at once, with 0 credits.
Avoid
- Checking the status more often than every 5 seconds.
- Keeping only the outputs link: it is not permanent.
- Repeating a request without Idempotency-Key after a network failure.
- Putting the key in code that runs in the browser.
Everything All in One AI does
The same account, the same key and the same credits on every page.
Articles to get started
Step by step, with prices and the most common errors.
01Creating your first AI image in the All in One AI Playground, step by stepIn short: in Meu Interweb, open All in One AI, go to the «Playground» tab and choose «Image». You describe what you want to see, pick the model,…Read the article →
02What an AI image costs in credits: the price per image, the reserve and the refundIn short: every image model has a price in credits per image , which you see before you generate. When you generate, the expected cost is reserved.…Read the article →
03Asking AI for an image: what to describe, with examples for a small businessIn short: tell the AI what you want to see, where, in what light and in what style, in one or two concrete sentences. The more concrete the request,…Read the article →
04Creating AI images through the API: the request, the status and saving the fileIn short: send the request to POST /v1/media/generations , with the model and, in input , the description. The answer comes straight back, with the…Read the article →
05Choosing an image model in All in One AI: the Models tab, the price and the optionsIn short: on the «Models» tab of All in One AI, choose «Image» and compare the models by price per image and by the job each one does. The ones that…Read the article →
AI images
The price of each image, how long it takes and what happens when a generation fails.

Talk to us or look for the answer in the Knowledge Base.
How much does an image cost?
It depends on the model. Each image model has a price in credits per image, shown on the «Models» tab or in GET /v1/models.
For example, openai/gpt-image-2/text-to-image costs 2 credits per image.
How do I create my first image?
- Open All in One AI in Meu Interweb and go to the «Playground» tab.
- Choose «Image» and the model.
- Type the description and see the result, with no code.
The 100 free credits are enough to try it.
How long does it take?
From a few seconds to a few minutes, depending on the model.
The request answers at once with the generation id, and you check the status every 5 seconds until it is ready.
Do I pay if the generation fails?
No. A failed generation is not charged and the reserved credits go back to your balance. The reason is in the error field.
Do the image links last forever?
No. The outputs links are not permanent. Download the images and keep your own copy.
Can I choose the size?
Yes, on models that accept it. The fields of each model, such as size, are in GET /v1/models/{id}, with the accepted values and the default.
Can I generate images in Claude Code or Cursor?
Yes. Associate the tool with our MCP server and ask for the image in the conversation.
The agent uses the generate_image tool and can save it in your project.
Can I test without spending?
Yes, with a sandbox_ key. The API answers in the same format, but it calls no model and charges nothing:
- the chat always answers «Resposta de teste (sandbox).»;
- an image, video or voice is completed straight away, with a sample link and 0 credits;
- the model list, the prices and the balance are the real ones.
When your program is ready, switch to the prod_ key.
What happens if I run out of credits?
The request does not go ahead and the API answers 402 with insufficient_credits. Nothing is charged, and the error says how much you need and how much you have.
Buy more on the «Buy credits» tab and try again. The credits arrive as soon as the payment is confirmed. In chat, a lower max_tokens also lowers the reservation.

Need help?
If you still have questions or need more information, we have expert people ready to help you.
- ChatOpen the chat →
- TicketOpen a ticket →
- Phone+244 942 011 191
- Opening hoursSupport from Monday to Friday, 08:00 to 16:00.
Your first image is one description away
Activate All in One AI, get 100 credits and create an image in the Playground.
- 100 free credits on activation
- A Sandbox to test without spending
- One key for everything





