Skip to main content
RuAPI gives you two families of image models: Gemini Image (widely known as Nano Banana) and GPT Image. They are called in completely different ways — that is the one thing to understand before you start. Billed in USDT, no foreign card required.
Gemini image models do not use /v1/images/generations. Send their requests to https://www.ruapi.ai/v1/chat/completions — the same address as a regular chat — and the generated image arrives inside the reply text. See “Method 1” below.

Available models

For exact prices, see the pricing page. The Gemini models are billed per call (one flat price per image); gpt-image-2 is billed per token (bigger and higher-quality images cost more).

URLs & auth

  • Gemini image models: POST https://www.ruapi.ai/v1/chat/completions
  • GPT Image: POST https://www.ruapi.ai/v1/images/generations (generate), POST https://www.ruapi.ai/v1/images/edits (edit)
  • Base URL: https://www.ruapi.ai/v1. With an SDK, this is the only address you enter — the SDK builds the full URLs above by itself
  • Auth: header Authorization: Bearer sk-YOUR_KEY (create one in the console under “API Keys”)
The curl examples below save the picture straight to a file in the current folder — just paste in your key. They work on macOS, Linux, and on Windows under Git Bash or WSL; in a plain Windows prompt (cmd, PowerShell), use the Python example instead. If the reply contains no image, the command prints the full API response, which says why.

Method 1: Gemini Image — via /v1/chat/completions

Requests for the Gemini image models go to https://www.ruapi.ai/v1/chat/completions. You write them exactly as you would for a text model — the only difference is that the reply contains an image.
The image arrives as a Markdown data URI inlined in choices[0].message.content — there is no separate image field. The response looks like this:
The base64 has to be pulled out of the text. The examples below do that for you and save the picture to a file.

Text to image

Sometimes the model replies with text only and no picture. That call is billed exactly like one that returns a picture. To avoid it, say it outright in the prompt: “Generate an image: …”. If there is still no picture, rephrase and try again.
A single response may contain several images, which is why the Python example uses findall rather than search; the curl command saves the first one. The model almost always adds a short caption alongside the picture.

Image to image (editing)

To edit an existing image, pass it the same way you would to a vision model: a content array with a text part and an image_url part. The url accepts either a public link or a data URI. The example below runs as is; for your own picture, replace the link in url.
The aspect ratio of the input image is preserved — the result is not cropped to a square.

Multi-turn editing

You can feed the model’s reply straight back into messages as an assistant message — the Markdown data URI is recognized and the image becomes input for the next turn. That is how you chain “make it black and white” → “now add a border”.
Every turn is a separate billable call. Also, a history full of base64 images inflates the request body fast — do not carry more than the last two or three frames in context.

Supported input image formats

image/png, image/jpeg, image/webp, image/heic, image/heif. Anything else is rejected with mime type is not supported by Gemini.

Google’s native format

If you already write against the Google GenAI SDK, the same key also works with Google’s own format, at https://www.ruapi.ai/v1beta/models/MODEL_ID:generateContent:
Here the image comes back structured — in candidates[0].content.parts[].inlineData.data (base64), with no Markdown to parse. If you do not need OpenAI SDK compatibility, this path is simpler.

Method 2: GPT Image — via /v1/images/generations

gpt-image-2 uses OpenAI’s standard image-generation format: requests go to https://www.ruapi.ai/v1/images/generations. There are no messages, just a prompt.

Parameters

Response

The picture comes back only in b64_json — it is the PNG file itself, base64-encoded. There is no image link in the response, and we do not store generated images: save the file right away, because you cannot fetch it again.
usage.output_tokens counts image tokens, and that is what you pay for. Dropping quality to low cuts it several-fold — handy for drafts and tests.

FAQ

Because in OpenAI’s terms it is not an image-generation model — it is a multimodal chat model that happens to emit images. Send the request to https://www.ruapi.ai/v1/chat/completions instead; see “Method 1”. If you send it to /v1/images/generations anyway, you get a 400 error that gives the correct address.
Your client is sending tools (tools) along with the request — agents and chat clients with MCP or plugins turned on do this. Image models don’t support tools. Turn off tools and MCP for this chat (or set up a separate assistant without them) and try again. Failed requests like these are not billed.
That is the image. When it comes back through /v1/chat/completions, the picture is inlined into the reply as ![image](data:image/png;base64,...). The examples above extract it and save it to a file for you. You can also switch to Google’s native format (see “Google’s native format” above), where the image is a separate field.
gemini-2.5-flash-image gives the best price-to-quality ratio for edits. For maximum detail, use gemini-3-pro-image-preview. gpt-image-2 can edit too, but its requests go to a different address: https://www.ruapi.ai/v1/images/edits.
Not at all. We do not store generated images: the picture is delivered once, in the response to your request. Save it right away — there is no way to fetch it again.
No. Gemini image models are billed per call: one flat price per call. The usage field is informational and does not affect what you are charged. Only gpt-image-2 is billed per token. A call where the model answers with text only is billed too, so ask for an image explicitly.
That is OpenAI’s moderation: it decided the gpt-image-2 request breaks its rules. It sometimes gets this wrong — for example, on descriptions of young children or well-known people. Rephrase the prompt and try again. Rejected requests are not billed.