Generate Images and Videos Directly in the Playground
·4 min read
🎨

Generate Images and Videos Directly in the Playground

ANT now routes to image and video generation models natively. Use Gemini Image, GPT-5 Image, and more — all through the same unified API. No separate endpoints needed.

featureimage generationvideoplayground

You can now generate images and videos directly from the ANT Playground and API. No separate endpoints, no special SDKs — just send a prompt and get media back in the same chat format you already use.

How It Works

ANT treats image and video generation as a routing capability. When you use ant:image-gen or ant:video-gen, the router automatically selects the best available model that can generate that type of media. The response comes back as a standard chat completion with the generated content inline.

  • •Select ant:image-gen or click the image button in the Playground
  • •Type your prompt — describe what you want to see
  • •ANT routes to the best image generation model available
  • •The generated image appears directly in the chat
  • •Same flow for video with ant:video-gen

Supported Models

ANT automatically discovers and routes to any model in the catalog that supports image or video generation. As new models are added by providers, they become available without any configuration. Current image generation models include:

  • •Google Gemini 2.5 Flash Image (Nano Banana) — fastest, lowest cost
  • •Google Gemini 3 Pro Image Preview (Nano Banana Pro) — higher quality
  • •Google Gemini 3.1 Flash Image Preview (Nano Banana 2) — latest
  • •OpenAI GPT-5 Image — premium quality
  • •OpenAI GPT-5 Image Mini — cost-effective

When new image or video generation models are released by any provider, ANT detects them during catalog sync and makes them available automatically through the same routing system.

In the Playground

Logged-in users see two new buttons next to the send button: a pink image generation button and a cyan video generation button. Type your prompt, click the button, and the media appears in the chat. You can also select ant:image-gen or ant:video-gen from the model dropdown.

Via the API

Use ant:image-gen or ant:video-gen as the model name in any OpenAI-compatible request. The router handles the rest.

python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.antbase.ai/v1",
    api_key="your-ant-api-key",
)

# Generate an image
response = client.chat.completions.create(
    model="ant:image-gen",
    messages=[{"role": "user", "content": "A serene Japanese garden with cherry blossoms at sunset"}],
)
print(response.choices[0].message.content)  # Contains the generated image
bash
curl https://api.antbase.ai/v1/chat/completions \
  -H "Authorization: Bearer $ANT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ant:image-gen",
    "messages": [{"role": "user", "content": "A fluffy sheep in a meadow"}]
  }'

Routing Intelligence

ANT's router scores all available image generation models and picks the best one based on quality, speed, and cost — the same way it routes text requests. If a provider is down or rate-limited, it fails over to the next best option automatically.

Availability

Image and video generation is available to all logged-in users with credits. The feature uses paid models — it does not currently work on the free tier (ant:free) since no free image generation models are available yet. When free providers add image generation models, they will automatically become available through ant:free as well.

Try It Now

Open the Playground, type a description, and hit the image generation button. Or select ant:image-gen from the model dropdown.

Try ANT routing today

Drop-in OpenAI-compatible API. Change your base URL and every request gets intelligent routing across 30+ providers.