New: Nano Banana 2.1Try the model
API Stock

Operação

Connect OpenClaw to API Stock

Configure a model provider, check your connection and add image, video and music tools to an OpenClaw agent.

3 min de leitura6 seções

Use API Stock for the model that runs your OpenClaw agent, for media tools, or for both. Chat requests and media generations use your prepaid balance. Start by checking your API key and choosing a model, then give the agent one small task with a spending limit you approve.

Download the OpenClaw bundle or create an API key.

What can you build?

TaskConnectionResult
Write or edit local files with an agentChat model providerOpenClaw uses a selected model for its reasoning and tool calls.
Build a product page with an illustrationMedia skillThe agent waits for the image and uses it in a local page.
Prepare a content kitMedia skillLocal draft copy, a cover and an optional video.

The bundle includes runnable task briefs for the last two examples. They are recipes, not customer case studies or pre-generated model results.

Check your account and model

The same files are public at [github.com/API Stock/api-stock-openclaw](https://github.com/API Stock/api-stock-openclaw): review them there or git clone the repository instead of downloading. Extract the bundle and open its directory. The helper requires Python 3.10+ and its standard library. Provide API_STOCK_KEY through your runtime's environment or secret configuration. Keep the key out of prompts and files. Use the account and key belonging to this storefront.

sh
unzip api-stock-openclaw.zip
cd api-stock-openclaw
python3 skills/api-stock-media/scripts/api_stock.py doctor

doctor reads the model list and current token prices. It does not generate text or media, so this check creates no paid request. Discovery alone does not establish tool-calling compatibility with every model.

For an API Hubs account, add --site apihubs before the helper command:

sh
python3 skills/api-stock-media/scripts/api_stock.py --site apihubs doctor

Add a chat provider

Choose an exact model id returned by doctor. This example produces a config fragment; it does not overwrite your OpenClaw configuration:

sh
python3 skills/api-stock-media/scripts/api_stock.py config \
--model gpt-6-luna > api-stock-provider.json

For API Hubs, use --site apihubs before config too. Merge the fragment into OpenClaw's config while preserving your existing providers, tools and channels. It sets a default model; retain your current default if you only want another selectable model. The fragment references ${API_STOCK_KEY} instead of embedding a credential.

The connection uses https://api.api-stock.com/api/v1 with the openai-completions adapter. Select Chat Completions: the Responses API is not exposed by this integration. API Hubs uses its own API origin.

sh
openclaw config validate
openclaw models list

The generated context and output values are conservative client budgets, not the model's maximum capabilities. The fragment does not populate token prices in OpenClaw; check the current API Stock prices and dashboard billing instead of treating a missing local cost estimate as free usage.

Give your agent media tools

Install the reviewed skill in OpenClaw's managed skills directory, preserving any customized copy you already have:

sh
mkdir -p ~/.openclaw/skills
if mkdir ~/.openclaw/skills/api-stock-media; then
cp -R skills/api-stock-media/. ~/.openclaw/skills/api-stock-media/
else
echo "Skill already exists or cannot be created. Preserve it and compare before installing." >&2
fi
openclaw skills check

Start a new session after installing the skill. The Gateway process needs the key in its own environment. For a sandboxed agent, make Python, the skill and the credential available inside the sandbox; host environment injection does not automatically reach containers.

Try the included examples/product-page/TASK.md: it asks the agent to quote an illustration, wait for its finished task and build a local HTML page. Read the media walkthrough for spending controls and recovery after an interrupted request.

Check a complete agent task

Before choosing a default model, run a task that actually needs a tool and verify that the agent uses its result. A successful text response is only the first part of this check. Record the exact model, task outcome, number of attempts and observed charge. Compare models on the same task using the selection checklist.

The bundle's compatibility check uses OpenClaw 2026.10.9 and a deterministic local API fixture. It exercises configuration, streaming, a tool call and media-task completion without paying for a generation. It does not establish production quality, latency or compatibility for every upstream model. A separate live media check records the selected models, two agent attempts and the finished image.

Troubleshooting

SymptomNext step
HTTP 401Check the API key and storefront.
Model not foundRun doctor and use an exact id from the response.
Agent requests /responsesSelect openai-completions and the /api/v1 base URL.
Media skill is missingRun openclaw skills check; check Python and the agent runtime's key.
No usable tool resultTest the exact model with a tool turn; check its supported request fields.
Insufficient balanceCheck the quote and actual payment methods before topping up.

For clients supporting remote MCP with OAuth, the existing MCP server is another media-tool connection. It is separate from the model provider. For current usage rates, open pricing.

Configuration references: OpenClaw providers and OpenClaw skills.

Rode isto com a sua própria chave

Escolha um modelo no catálogo API Stock, confira o preço e teste no navegador ou por API.

Continue lendo