
In short: the generate_* tools of the MCP server wait up to about 50 seconds. Many videos take longer. In that case, the tool returns the generation id, and the video keeps being made on the server. To get it, ask the agent to check it with get_generation, which costs nothing.
What happens
|
|
|
Asking for the result later
A little later, tell the agent: "Check if the video is ready." It uses get_generation with the id and tells you the status:
| Status | What it means |
| processing | It is still being made. Ask again in a little while. |
| completed | Ready. The links to the files and the real cost come back. |
| failed | It failed. The reason comes back, nothing is charged and the reservation goes back to your balance. |
If you move to another conversation, the agent may no longer know the id. Ask for it as soon as the agent returns it, and keep it.
| Do not ask for the same video again. Each generate_video is a new generation, charged separately. For a video that is still being made, always use get_generation. |
In Codex: giving the tool time
Codex gives up on a tool after 60 seconds. To give the generation tools their 50 or so seconds with room to spare, put tool_timeout_sec in ~/.codex/config.toml:
[mcp_servers.interweb-ai]
url = "https://api.interweb.co.mz/mcp"
bearer_token_env_var = "INTERWEB_API_KEY"
tool_timeout_sec = 120
Without the agent
The same id works in the aio command, which also downloads the files, and in the API, at GET /v1/media/generations/{id}:
aio status <id>
aio status <id> --download --out videos/
| The file links are not permanent. When the video is ready, ask the agent to download it into the project. See keeping your AI videos and voice files. |
|
Want to see what each second of video costs before you ask? It is in All in One AI. See All in One AI |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from $5.36/mo (3-year plan, with coupon) See plans |











