API Hubs

Эксплуатация

Give your coding agent image, video and music tools

Connect Claude Code, Codex, OpenCode or OpenClaw to API Hubs and use generated media in a page, app or content draft.

3 мин чтенияразделов: 6

Ask your coding agent to create an illustration and use the finished file in your project. API Hubs adds media tools alongside the model already running your agent. Your account's prepaid balance pays for approved generations.

Choose your agent

AgentStart hereConnection
Claude CodeCreate a landing-page illustrationRemote MCP with browser sign-in.
CodexAdd image assets to an appRemote MCP with browser sign-in.
OpenCodeCreate media from an OpenCode sessionRemote MCP with browser sign-in.
OpenClawBuild a content kitLocal media skill and an API key.

MCP adds tools to Claude Code, Codex and OpenCode. It does not change their coding model or replace their subscription. OpenClaw can separately use a chat-model provider.

A landing page with its own illustration

Use this brief in Claude Code after connecting the media tools:

text
Build a local landing page for a paper-lantern shop. Use the API Hubs
MCP tools to create one original hero illustration. First inspect an
active image model with get_model and estimate_cost for the exact input.
Show the quote and wait for my approval. Then create one generation with
the approved maxCostUsd and a unique idempotencyKey. Keep that key when
recovering the same task. Poll get_task until it finishes. Download the
result without sending OAuth credentials to the file URL, save it in the
project and reference that local file in the page. If generation fails,
report the failure and stop. Save the model, task id and final status in
evidence.json. Leave the page local for review.

Expected artifact: a local page, a downloaded hero image and an evidence record. A pending task or a placeholder image is not a finished result. See the Claude Code walkthrough.

Motion-designed Claude Code workflow with previously published generated imagery, original music and AI voiceover. Illustrative interfaces, not a recorded client session.

Image assets inside an app

Give Codex a single asset to replace before requesting a whole asset set:

text
Add one illustrated empty state to this app. Use the API Hubs MCP tools
to inspect a suitable image model and quote the final request. Wait for
my approval before spending. Use maxCostUsd and an idempotencyKey for
the approved task. Fetch its terminal result, download the image into
the app's public assets and render it with descriptive alt text. Preserve
the existing layout and error state. Report the file changed, model,
task id and terminal status. Do not publish the app.

Expected artifact: one local image used by an existing screen. The agent's ability to edit files depends on the project permissions you granted it. See Codex setup and recovery.

Motion-designed Codex workflow showing an image inside an app, with original music and AI voiceover. Previously published imagery and illustrative interfaces, not a recorded client session.

A draft content kit

Use the OpenClaw bundle and its content-kit recipe:

text
Prepare a local content-kit draft for a paper-lantern shop: a short
announcement and one generated cover. Inspect the current model schema
and quote the cover before requesting approval. Use the approved spending
ceiling and keep the helper's state file when resuming. Download a finished
cover and save its task evidence. Include a video storyboard as text;
quote video separately and wait for another approval before generating it.
Keep the announcement and media local. Do not post or send anything.

Expected artifact: draft copy, a cover and a text storyboard. Video and music are additional requests with their own model parameters and quotes. The OpenClaw media walkthrough includes an existing image from one live acceptance run and explains what that run established.

Motion-designed OpenClaw content-kit workflow with a cover, draft copy and text storyboard. Original music, AI voiceover and previously published imagery; this is an illustrated workflow.

Check access before spending

For MCP clients, ask the agent to call get_account and list_models without creating a generation. Both require sign-in but do not start a paid task. Then inspect a model and request an estimate. Generation needs the mcp:generate permission and enough balance for that request.

Registration, connection and a copied prompt do not guarantee a funded generation. Check the authenticated quote and the current prices. Manage connected clients in Dashboard → Connectors.

Downloads and examples

Download the task briefs and assembled examples. The ZIP includes three HTML examples and the existing sample image, so you can open them locally. The HTML illustrates a possible result; it is not evidence of a paid client run.

The MCP integration repository documents the hosted server and plugin. The three briefs above describe reproducible tasks. Consult the client-specific guide for verification limits and troubleshooting.

Запустите это со своим ключом

Выберите модель в каталоге API Hubs, проверьте цену и попробуйте её в браузере или через API.

Читать дальше