Agnes Model API Guide

Call the Agnes video model directly via HTTP — no third-party tools, complete Python examples included

Prerequisites

Before calling the API, you need:

  • A valid Agnes API Key (obtain from Agnes Cloud Platform)
  • Basic HTTP request knowledge (Python examples provided, any language works)

API Endpoint

POST
https://api.agnes-ai.com/v1/video/generate

Authentication

All API requests require Bearer Token authentication in the header:

// Authorization header
Authorization: Bearer YOUR_API_KEY

Request Body

Send a POST request with the following JSON parameters:

{
  "prompt": "A cat walking through a neon-lit Tokyo alley",
  "duration": 5,
  "resolution": "1080p",
  "style": "cinematic",
  "narration": true,
  "narration_lang": "en",
  "subtitles": true
}

Parameter Reference

ParameterTypeRequiredDescription
promptstringYesVideo description text (English or Chinese), recommended 20-200 chars
durationnumberNoVideo duration in seconds, default 5, range 3-30
resolutionstringNoResolution: 720p / 1080p, default 1080p
stylestringNoVideo style: cinematic / anime / realistic / abstract
narrationbooleanNoGenerate AI narration, default false
narration_langstringNoNarration language: zh / en / ja / ko etc., requires narration=true
subtitlesbooleanNoGenerate subtitles, default false

Complete Python Example

A complete Python example — submit task, poll status, get video:

import requests

API_KEY = "your_api_key_here"
url = "https://api.agnes-ai.com/v1/video/generate"

headers = {"Authorization": f"Bearer {API_KEY}"}
payload = {
    "prompt": "A drone shot of a mountain lake at sunrise",
    "duration": 8,
    "resolution": "1080p",
}

resp = requests.post(url, json=payload, headers=headers)
task = resp.json()
print(f"Task ID: {task['task_id']}")

# Poll for result
status = requests.get(
    f"https://api.agnes-ai.com/v1/video/status/{task['task_id']}",
    headers=headers
)
print(status.json()['video_url'] if status.json().get('video_url')
      else "Still generating...")

Don''t want to write code?

All of the API calls above — authentication, parameter assembly, status polling, error retries — are already handled for you by Agnes Video Generator. Just open your browser, type your idea, and generate videos with one click. It is the simplest way to use the Agnes video model.

Try Agnes Video Generator online →

Related Pages

Ready to Start Creating?

"Making world-class AI belong to everyone." — Bruce Yang. Completely free, no credit card required, no high-end GPU needed. Start creating your first AI video at zero cost. Want to use Agnes AI's free video models? This is the easiest way.

Clone the GitHub repo and launch in 2 minutes