跪拜 Guibai
← Back to the summary

Agnes AI Opens a Permanently Free Multimodal API with No Token Limits

Stop Paying for Large Models! Agnes AI's Permanently Free Multimodal API — Unlimited Token Calls for Code, Drawing, and Short Dramas

💥 Preliminary Preparations

This tutorial includes complete Python API call code development. If you haven't set up a Python runtime environment or installed development tools, please configure your environment in advance. I recommend choosing JetBrains PyCharm, which is completely free for personal use. I have already organized the environment and software configuration process. If you haven't configured the runtime environment, please read the following tutorial first! 👇👇👇👇 💫💫💫☄️☄️☄️ 【Must Read】PyCharm Free Download, Installation, and Configuration Tutorial + Python Environment Setup, Illustrated and Fully Armed to Learn Swiftly, Absolutely the Most Detailed!

🔥 What Can the Internet-Sensation Agnes AI Actually Do?

Are you still paying to call large model APIs? Today I've dug up a fully multimodal, permanently free AI — it's Agnes AI.

Agnes AI has quickly broken out of the niche with its free multimodal interface~

On some AI large model benchmark rankings, it can even trade blows with deepseek v4 Pro, holding its own — not bad at all!

As shown

The key is its three self-developed main models — text, image, video — which are currently open as permanently free APIs on Agnes AI with no call limits. Where else can you find that? Who would understand this?

Agnes-2.0-Flash (Text Large Model)

Supports dialogue, code writing, logical reasoning, and intelligent agent tool invocation. Suitable for writing copy, programs, long documents, and automated task orchestration~ Completely nails it.

Agnes-Image-2.1-Flash (Image Generation)

Text-to-image, image-to-image, supports high-definition output. Can be used for posters, materials, product renderings~~

Agnes-Video-V2.0 (Video Generation)

Native audio-video synchronization, self-media short drama materials at your fingertips~~ Just ask if you believe it....🤭🤭🤭

👉Click text to go to video: Video Address

Think about it~ A large amount of work and demand means a large consumption of tokens, which for ordinary people is money!

A large AI model that allows us unlimited free usage is truly rare!

While we're at it, let me popularize two basic concepts to facilitate learning Agnes AI!

What is an API

You can understand it this way: an API is the AI communication channel that service providers open to the outside world. Your AI Agent doesn't need to run massive large models locally; it sends text requests over the network, and the cloud AI computes the results and sends them back to your local machine!

What is an API Key

A string of keys in the style of sk-xxxx or sk-ant-xxxx can be understood as your exclusive access card. Its functions are as follows:

Identity Verification: The model service provider knows who is calling the AI.

Billing and Accounting: All consumption is bound to this Key, and fees are deducted per Token.

Of course, the most important thing is to protect your API Key and not leak it to others!

Free Application for Agnes AI API KEY

After all that talk, let's get to the main topic!~

We can directly register a free account on the Agnes AI official website using our email. No real-name verification, no need to bind a credit card~

Official Website

https://agnes-ai.com/

First, register an account yourself.

As shown

After successful application, it will automatically redirect to the backend. Under personal API Key, click create to apply!

As shown

Name it arbitrarily.

Then the applied API KEY will appear. Save it yourself first; you'll need it later when connecting to AI Agent or writing code!

As shown

Testing Agnes AI's Multimodal Interface Based on OpenAI SDK

Some friends might question the capabilities of this model, so let's test it first before integrating it into the corresponding AI Agent!

After successfully applying for the API Key, let's complete the API connectivity test through a Python script to verify whether Agnes AI's text, image, video multimodal interfaces are working properly~ For details, everyone can refer to the official documentation!

Development Guide

https://agnes-ai.com/zh-Hans/docs/quickstart

Agnes AI is an OpenAI-compatible interface. You can directly use the OpenAI Python SDK to call text, text-to-image, text-to-video simultaneously. With a single client, you can test by switching model names in the code~

OpenAI initially established a set of universal calling specifications:

The request address format, parameter passing format, and return data format all have standards.

Many third-party AI service providers, such as Tongyi, SiliconFlow, etc., use the same format!

The OpenAI Python SDK is the official pip install openai library. Normally, to call OpenAI, you would write:

client = OpenAI(
    api_key="OpenAI Key",
    # Default address points to OpenAI official website
)

So now, to connect to Agnes, just add one line of base_url, and the other function writing remains unchanged!

client = OpenAI(
    api_key="Your Agnes API KEY",
    base_url="https://apihub.agnes-ai.com/v1" # Change to Agnes gateway
)

First, install the dependencies needed for our testing.

pip install openai requests
pip install markdown

Then just give it a try~

Agnes AI Official Available Model IDs — Note that model names must be all lowercase.

Dialogue/Text/Code

model : agnes-2.0-flash/Agnes 2.5 Flash/Agnes 2.5 Pro Alpha

API Endpoint: https://apihub.agnes-ai.com/v1/chat/completions

Text-to-Image, Image-to-Image

model: agnes-image-2.0-flash / agnes-image-2.1-flash

API Endpoint: https://apihub.agnes-ai.com/v1/images/generations

Video Generation

model: agnes-video-2.0

API Endpoint: https://apihub.agnes-ai.com/v1/videos

Small Reminder

All cases in this article are entirely generated by Agnes AI. The complete code and prompt templates are inconvenient to paste and display in full within the text. The full set of materials, code, and prompt templates have been organized and archived. Friends who need them can follow me and send a private message to inquire about the acquisition channel, for technical learning exchange only.

Dialogue/Text/Code Generation

Mainly divided into the following models:

Agnes 2.0 Flash Basic general text model, stable, balanced response speed, suitable for regular dialogue, code generation, basic prompt writing, the first choice for daily testing. Agnes 2.5 Flash Iterative upgraded version, stronger logical reasoning, long text, and complex instruction understanding, suitable for writing long video prompts with storyboards and multiple lines of dialogue. Agnes 2.5 Pro Alpha Professional version, strongest capability for complex agent tasks and long-form plot conception. High load, prone to timeouts during peak hours, suitable for formal high-quality content creation.

Among them: Agnes 2.5 Pro Alpha is Agnes AI's paid inference model~ The others are all free!

Case Generation

Let's first look at the code capability~

Endpoint Address

https://apihub.agnes-ai.com/v1/chat/completions

Model Name: agnes-2.0-flash

Code as follows

from openai import OpenAI

API_KEY = "Your applied API KEY"
BASE_URL = "https://apihub.agnes-ai.com/v1/chat/completions"

client = OpenAI(api_key=API_KEY, base_url=BASE_URL)

prompt = """
Please write **standalone single-file HTML**, using native JS+Canvas to implement an advanced tech dynamic background, no external dependencies allowed:
1. Effect: Nebula particle system, particles drifting slowly, particles automatically generate glowing connecting lines when distance is below threshold; mouse position generates a gravitational field, attracting/repelling particles
2. Visual Style: Dark cosmic background, blue-purple gradient glimmer particles, lines with transparency gradients, motion with slight trailing, advanced minimalist cyberpunk style
3. Hard Specifications: Canvas fills the full screen, hide scrollbars, auto-adapt to window size changes, implement performance throttling to prevent lag
4. All CSS, JS fully embedded in one HTML file, copy and run directly by double-clicking in browser
5. Finally, only output the complete code, wrapped in ```html code block, no extra explanatory text
"""

resp = client.chat.completions.create(
    model="agnes-2.0-flash",
    messages=[
        {"role": "system", "content": "Professional frontend developer, only output complete runnable code, strictly wrap in markdown code block as required."},
        {"role": "user", "content": prompt}
    ],
    temperature=0.4
)

content = resp.choices[0].message.content


output_html = f"""
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Effect Code Result</title>
<style>
html,body{{background:#0a0a12;margin:0;padding:0;color:#fff;}}
.wrap{{width:95%;max-width:1400px;margin:40px auto;}}
pre{{padding:20px;border-radius:8px;background:#161622;overflow-x:auto;}}
code{{font-family:Consolas}}
</style>
</head>
<body>
<div class="wrap">
{content}
</div>
</body>
</html>
"""

with open("bg_effect_result.html", "w", encoding="utf-8") as fp:
    fp.write(output_html)

print("✅ Generated bg_effect_result.html, open to view!")

As shown

Effect as follows

This small case is definitely not satisfying enough, let's continue... Let's have it create a small game to see how the effect turns out~

Prompt

Develop a web casual game using the p5.js creative coding library. Write all code into a single HTML file, load p5.js via CDN, do not load any external image resources, and the page should support basic interactive controls.
Game theme set as Starry Sky Meteor Escape: The player controls a spacecraft moving in space, dodging continuously incoming meteors; the longer you survive, the higher the score.

Build a unified game state management system, including three major scenes: start interface, game running, and game over. Scene transitions use interpolation easing for smooth transitions, eliminating harsh screen jumps.
The code needs to implement particle effects, collision detection, Perlin noise to simulate irregular meteor movement, and object layered rendering logic. Reasonably control the number of elements on screen, optimize rendering performance, and ensure the browser runs smoothly without lag.

Code should be modularly split into player control module, meteor generation module, starry sky particle module, and UI score module, all sharing a single global state. Add detailed Chinese comments to the code, strictly using the standard setup(), draw() function structure.

Output requirements: First briefly introduce the gameplay, then output the complete full code in one go, do not omit or truncate content. After saving the file, it can be run directly by opening in a browser.

As shown

If you still think it's not cool enough, let's look at another one~ Let Agnes AI help us generate a cool website!

Effect as follows

This layered experience truly achieves silkiness~😘

Text-to-Image / Image-to-Image

Mainly divided into the following two models:

Agnes Image 2.0 Flash Focuses on image editing, suitable for partial retouching, background replacement, and original image fine-tuning, maximizing the preservation of the original character structure. Agnes Image 2.1 Flash Main image generation model, supports text-to-image and image-to-image; supports high resolution, stronger in image detail and art style restoration.

Let's see what effect image-to-image using natural language looks like~

Case Generation

Endpoint Address

https://apihub.agnes-ai.com/v1/images/generations

Model Name: agnes-image-2.1-flash

Code as follows

from openai import OpenAI
import base64
import webbrowser

# ====================== Configuration Area ======================
API_KEY = "Your API KEY"
BASE_URL = "https://apihub.agnes-ai.com/v1"
LOCAL_IMG_PATH = r"Your local image path"
STRENGTH = 0.72
IMAGE_MODEL = "agnes-image-2.1-flash"
# Official standard tier 2K, ratio 1:1
SIZE = "2K"
RATIO = "1:1"


client = OpenAI(
    api_key=API_KEY,
    base_url=BASE_URL
)

def file_to_base64(file_path):
    with open(file_path, "rb") as f:
        b64_data = base64.b64encode(f.read()).decode("utf-8")
    return f"data:image/png;base64,{b64_data}"

base64_img = file_to_base64(LOCAL_IMG_PATH)

prompt = """
Strictly reference the original image character's pose, composition, long black wavy hair, cream-colored knitted sweater, blue jeans, sitting on a coffee shop sofa holding a drink, turning head to look at the camera.
Gosho Aoyama art style, Detective Conan original anime art style, Japanese TV anime cel shading, clear black contour lines, Conan-style beautiful girl, delicate large eyes, facial features proportionally restoring Conan character traits;
Warm coffee shop indoor background, soft warm light, blurred bokeh;
Soft colors, classic anime flat shading lighting, clean picture, high-definition anime original art texture, ultimate detail, sharp lines, high clarity, no noise
"""

negative_prompt = "Real person photo, realistic, 3D rendering, Pixar, Q-version, impasto oil painting, blurred lines, soft contours, deformed facial features, extra fingers, garbled text, watermark, cluttered stickers, excessive filters, dark tones, blurry, low resolution, pixel blocks, noise"

# Initiate drawing request
response = client.images.generate(
    model=IMAGE_MODEL,
    prompt=prompt,
    n=1,
    extra_body={
        "size": SIZE,
        "ratio": RATIO,
        "tags": ["img2img"],
        "image": [base64_img],
        "strength": STRENGTH,
        "negative_prompt": negative_prompt
    }
)

result_url = response.data[0].url
print("✅ Image generation successful! Address:")
print(result_url)
webbrowser.open(result_url)

Effect

Let's do a few more text-to-image generations and see what stunning effects come out!

As shown below

Overall, Agnes AI being completely free and able to generate to this level of effect without watermarks is already quite good~ If you don't want it, I do 🤪🤪🤪

Experience the Power of Agnes Video v2.0 AI Video Model

Agnes Video V2.0 is the only video generation model in Agnes AI, supporting text-to-video and image-to-animation. It natively supports audio-video synchronization, character dialogue, and storyboard narrative. This model is too powerful, where else can you find this~ It simultaneously supports text-to-video and image-to-video, natively comes with sound effects and audio-video synchronization effects~ Post-production dubbing and editing are saved!

Come... let's see how the video generation effect turns out~

Case Generation

Endpoint Address

https://apihub.agnes-ai.com/v1/videos

Model Name: agnes-video-v2.0

Code as follows

import requests
import time

API_KEY = "Your API KEY"
BASE_URL = "https://apihub.agnes-ai.com/v1/videos"
prompt_text = "City dusk street, camera slowly pushes forward, cinematic lighting, smooth camera movement, realistic style"


headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

payload = {
    "model": "agnes-video-v2.0",
    "prompt": prompt_text,
    "width": 1152,
    "height": 768,
    "frame_rate": 24,
    "num_frames": 441  
}

print("Submitting video task...")
res = requests.post(BASE_URL, headers=headers, json=payload)
task_data = res.json()

if "id" not in task_data:
    print("Task submission failed:", task_data)
else:
    task_id = task_data["id"]
    print(f"Task ID: {task_id}, generating a video up to approx 18.4 seconds, waiting for processing")

    while True:
        status_res = requests.get(f"{BASE_URL}/{task_id}", headers=headers)
        info = status_res.json()
        status = info.get("status")
        progress = info.get("progress", 0)
        print(f"Current Status: {status} | Progress: {progress}%")

        if status == "completed":
            print("\n【DEBUG Complete Return Data】")
            print(info)
            video_url = info.get("remixed_from_video_id") or info.get("url")
            if "metadata" in info and video_url is None:
                video_url = info["metadata"].get("url")

            if video_url:
                print("\n✅ Video generation complete! Duration ≈18.4s")
                print("Video download address:", video_url)
            else:
                print("\n❌ Failed to get video link")
            break
        elif status == "failed":
            print("❌ Generation failed", info)
            break
        time.sleep(6)

Effect as follows

👉Click text to go to video: Video Address

Of course, if we need image-to-video, we just need to add the "image": field to represent your image's public URL" in the payload~

For example

payload = {
    "model": "agnes-video-v2.0",
    "prompt": "Prompt",
    "image": "Image Address",
    "width": 1152,
    "height": 768,
    "frame_rate": 24
}

Note

Local images cannot be directly passed to the API; they must first be uploaded to an image hosting service to obtain a network link before generating the video~

Additionally, I think Prompts in English are recommended for better results. Chinese is also supported, but stability is slightly worse.

Let's look at another image-to-video case.

Code as follows

import requests
import time


API_KEY = "Your API KEY"
IMAGE_URL = "Fill in the public network image link after uploading this picture"
SAVE_FILE_NAME = "Custom Name.mp4"


NUM_FRAMES = 441
FRAME_RATE = 24

POSITIVE_PROMPT = """Dark suspense horror animated film, 18 seconds 6-segment coherent storyboard smooth switching, audio-video synchronization, character lip-syncs speech,自带环境音效, maintains original character appearance, clothing, coffee shop basic scene unchanged.
Shot 1 (0-3s Wide Shot): Girl lowers head to stare at coffee cup, mutters line to herself: "Is someone staring at me?" Fingertips tremble slightly;
Shot 2 (3-6s Face Medium Shot): Girl slowly raises head, eyes stiff, softly asks line: "Where exactly are you?" Pupils contract;
Shot 3 (6-9s Hand Close-up): Fingers tightly clutch coffee cup, line: "Don't hide, come out!" Cup wall trembles slightly;
Shot 4 (9-12s Side Long Shot): Blurry figure appears outside window, girl turns head in panic, line: "Who!" Indoor lights dim suddenly;
Shot 5 (12-15s Face Close-up): Girl's lips tremble, speechless with fear, line: "Don't come near me..." Coffee surface ripples with eerie waves;
Shot 6 (15-18s Slow Push-in on Face): Girl's eyes widen in terror, line: Save me, cold wind brushes through hair, shadows inside shop slowly creep towards character, gloomy oppressive horror atmosphere, 24 frames smooth camera movement, eerie lighting, character facial features stable without collapse, shot transitions soft without abruptness."""

NEGATIVE_PROMPT = """Character facial features deformed, limbs collapsed, art style突变, bright sunlight, vivid colors, cheerful atmosphere, violent camera shake, abrupt jump cuts, screen flickering, composition大幅偏移, lip-sync and dialogue脱节, silent picture, extra monsters, blurry image quality"""

BASE_URL = "https://apihub.agnes-ai.com/v1/videos"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

payload = {
    "model": "agnes-video-v2.0",
    "prompt": POSITIVE_PROMPT,
    "negative_prompt": NEGATIVE_PROMPT,
    "image": IMAGE_URL,
    "width": 960,
    "height": 960,
    "num_frames": NUM_FRAMES,
    "frame_rate": FRAME_RATE
}

print(f"✅ Submitting image-to-video task...")
print(f"📌 num_frames: {NUM_FRAMES}")
print(f"📌 frame_rate: {FRAME_RATE}")
print(f"📌 Target Duration: {NUM_FRAMES / FRAME_RATE:.1f} seconds")

resp = requests.post(BASE_URL, headers=headers, json=payload)
result = resp.json()

if "id" not in result:
    print("❌ Task submission failed:", result)
else:
    task_id = result["id"]
    print(f"📌 Task ID: {task_id}, waiting for rendering...")

    while True:
        task_resp = requests.get(f"{BASE_URL}/{task_id}", headers=headers)
        task_info = task_resp.json()
        status = task_info.get("status")
        progress = task_info.get("progress", 0)
        print(f"⏳ Current Status: {status} | Progress: {progress}%")

        if status == "completed":
            print("\n【API Complete Return JSON】")
            print(task_info)

            video_link = None

            if "metadata" in task_info:
                metadata = task_info["metadata"]
                video_link = (
                    metadata.get("url")
                    or metadata.get("video_url")
                    or metadata.get("output_url")
                )

            if not video_link and "video_url" in task_info:
                video_link = task_info["video_url"]

            if video_link:
                print("\n🎉 Video generation successful! Download address:")
                print(video_link)

                print("🔽 Starting video download...")
                video_data = requests.get(video_link, timeout=120)
                with open(SAVE_FILE_NAME, "wb") as f:
                    f.write(video_data.content)
                print(f"✅ File saved as: {SAVE_FILE_NAME}")
            else:
                print("❌ Successful status but no video link found! Check the JSON above.")
            break

        elif status == "failed":
            print("❌ Video generation failed:", task_info)
            break

        time.sleep(6)

Let's see how the effect turns out.

👉Click text to go to video: Video Address

Let's continue generating some videos through text natural language to see the effect~~

For example

import requests
import time


API_KEY = "Your API KEY"
SAVE_FILE_NAME = "Video Name.mp4"


NUM_FRAMES = 441
FRAME_RATE = 24


POSITIVE_PROMPT = """A chubby little hamster holding a sunflower seed, sitting on a wooden table, nibbling the seed slowly, looking around from time to time. Macro lens slowly pushes forward, soft gentle ambient lighting, healing 3D cartoon style, fluffy delicate fur, natural subtle body movements, smooth motion, shallow depth of field, warm tone, cinematic rendering, ultra-detailed, Pixar animation texture"""

NEGATIVE_PROMPT = """distorted limbs, deformed body, blurry, ugly, extra limbs, messy background, bright harsh flash, dark gloomy atmosphere, human, text, watermark, fast violent movement, flickering frame, bad anatomy, overexposure, low resolution, noisy image, realistic photograph, gore"""

BASE_URL = "https://apihub.agnes-ai.com/v1/videos"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

payload = {
    "model": "agnes-video-v2.0",
    "prompt": POSITIVE_PROMPT,
    "negative_prompt": NEGATIVE_PROMPT,
    "width": 960,
    "height": 960,
    "num_frames": NUM_FRAMES,
    "frame_rate": FRAME_RATE
}

print(f"✅ Submitting text-to-video task...")
print(f"📌 num_frames: {NUM_FRAMES}")
print(f"📌 frame_rate: {FRAME_RATE}")
print(f"📌 Target Duration: {NUM_FRAMES / FRAME_RATE:.1f} seconds")

resp = requests.post(BASE_URL, headers=headers, json=payload)
result = resp.json()

if "id" not in result:
    print("❌ Task submission failed:", result)
else:
    task_id = result["id"]
    print(f"📌 Task ID: {task_id}, waiting for rendering...")

    while True:
        task_resp = requests.get(f"{BASE_URL}/{task_id}", headers=headers)
        task_info = task_resp.json()
        status = task_info.get("status")
        progress = task_info.get("progress", 0)
        print(f"⏳ Current Status: {status} | Progress: {progress}%")

        if status == "completed":
            print("\n【API Complete Return JSON】")
            print(task_info)

            video_link = None

            if "metadata" in task_info:
                metadata = task_info["metadata"]
                video_link = (
                    metadata.get("url")
                    or metadata.get("video_url")
                    or metadata.get("output_url")
                )

            if not video_link and "video_url" in task_info:
                video_link = task_info["video_url"]

            if video_link:
                print("\n🎉 Video generation successful! Download address:")
                print(video_link)

                print("🔽 Starting video download...")
                video_data = requests.get(video_link, timeout=120)
                with open(SAVE_FILE_NAME, "wb") as f:
                    f.write(video_data.content)
                print(f"✅ File saved as: {SAVE_FILE_NAME}")
            else:
                print("❌ Successful status but no video link found! Check JSON")
            break

        elif status == "failed":
            print("❌ Video generation failed:", task_info)
            break

        time.sleep(6)

Effect

👉Click text to go to video: Video Address

Based on your imagination and ideas, you can completely create mind-blowing short videos freely~

For example

👉Click text to go to video: Video Address

Overall, Agnes Video V2.0 is a low-cost multimodal video API主打音画一体生成, suitable for short drama shots within 18 seconds. Personally, I think it's already quite good, and you can completely start your AI video creation journey~

Agnes Video V2.0 Video Duration Calculation Rule

Here I want to highlight the time issue for text-to-video and image-to-video in Agnes AI's Agnes Video V2.0!

Actually, regarding video duration control, the official documentation also provides definitions and standards.

As shown

In the cases above, we also used these two parameters num_frames and frame_rate.

The formula for calculating video length here is:

seconds = num_frames ÷ frame_rate
Video Duration = Total Frames ÷ Frame Rate

That is number of frames (num_frames) and frame rate (frame_rate).

For example

num_frames = 441
frame_rate = 24
seconds = 18

Because: 441 ÷ 24 = 18 seconds

Small Knowledge

num_frames (Total Frames) = The total number of static images in the entire animation.

frame_rate (Frame Rate 24) = Continuously playing 24 images per second. This is hard-coded in the official documentation!

So Total number of images ÷ Number of images played per second calculates how many seconds it needs to play, which is the video duration.

If you've done post-production video editing, you're definitely familiar with this principle!

⚠️ Small Reminder:

This model has a hard rule: the total frame count upper limit is 441, and it must also satisfy the 8n+1 rule, so the maximum video length achievable is 18 seconds. This is a hard requirement of the model's underlying computation slicing, and there's no way to change it~~ If you write 4K 60fps in the prompt, it might just throw an error~~

Finally

How is it~ Not bad, right? As of now, fully multimodal AIs that are completely free are already very rare. Everyone, use it and cherish it while you can!

Maybe in a couple of days, it'll be "see you in the Jianghu"! You know what I mean!

If you've read this far, I believe you can already use Agnes AI to create some AI works you like!

Hurry up and give it a try. If anyone has any fun creative ideas, come chat in the comments section!

Comments

Top 1 of 2 from juejin.cn, machine-translated. The original thread is authoritative.

wussrc

I thought it was paid? I registered and got $0.088, tested it integrated into claude-cli for a while and the balance dropped. Once the balance is gone you can't use it, right?

极客小俊

I've been using it for free anyway... it's always worked [embarrassed] Not sure what you did.