How to generate videos on anex.sh

Optimized for AI agents: give yours an API key and ask for a video.

With your AI agent

anex.sh is built to be driven by an AI agent. Three steps:

  1. Create an account in the console and add credit on its Billing page. A new account has no credit.
  2. Create an API key on the console's Keys page.
  3. Give the key to your AI agent (Claude, Codex, Copilot, Cursor or any other that can make HTTP requests or run a shell) and tell it to generate videos on anex.sh with it. Point it at these docs.

A prompt you can paste, with the key saved as ANEX_API_KEY:

Use my anex.sh API key in the ANEX_API_KEY environment variable to make a
10-second 2K video with MiniMax H3: a red fox trots across fresh snow at dawn.
The API is documented at https://anex.sh/docs/video and https://anex.sh/llms.txt.
Download the finished clip to fox.mp4 and tell me what it cost.

llms.txt is the whole site in one plain-text file, written for agents: every endpoint, limit and price.

What your agent can do

  • Make clips from a prompt, from a first and last frame, or from reference images, audio and videos, and edit a clip you give it (video API).
  • Wait for a clip, or take a callback when it is ready, and download it.
  • Upscale a clip to 2K or 4K (SeedVR2 upscaling).
  • Report your spend: each finished task carries its billed seconds, and GET https://console.anex.sh/api/billing/balance answers with your credit balance.
  • Ask for a payment link when the credit runs low, for you to pay: POST https://console.anex.sh/api/billing/topup-link. An agent cannot pay by itself.
  • Sign up and get a key by itself, from an email code you read out to it: sign-up for agents.

A basic example

What an agent does for the prompt above, on the MiniMax-compatible API. Create the task:

curl -X POST https://tasks.anex.sh/v2/video_generation \
  -H "Authorization: Bearer $ANEX_API_KEY" -H 'Content-Type: application/json' \
  -d '{"model": "MiniMax-H3",
       "content": [{"type": "text", "text": "A red fox trots across fresh snow at dawn."}],
       "resolution": "2K", "duration": 10, "ratio": "16:9"}'
{"task_id":"318407566120873452"}

Ask for it every few seconds until its status is succeeded:

curl https://tasks.anex.sh/v2/query/video_generation/318407566120873452 \
  -H "Authorization: Bearer $ANEX_API_KEY"
{"task": {"id": "318407566120873452", "status": "succeeded",
  "content": {"url": "https://..."}, "resolution": "2K", "duration": 10, ...}}

Download the clip from content.url, which is valid for an hour:

curl -o fox.mp4 "https://..."

A 10-second 2K clip costs ten seconds at the 2K rate on video pricing. A clip is usually ready in under ten minutes. Every field, the other APIs and the errors are on the video API page.