New: Nano Banana 2.1Try the model
API Stock

Chat & LLM

Choose a model for an agent task

Compare models on completed tool-using tasks, repeated attempts and observed cost before setting an agent's default.

2 Min. Lesezeit4 Abschnitte

Choose a model by running the task your agent will actually perform. A low token price is useful only when the model completes that task reliably. Keep the task, tool permissions, context and completion criteria the same when comparing candidates.

For connection instructions, see OpenClaw setup. The downloadable helper lists available chat models and current token prices with doctor.

Start with one observable outcome

TaskCompletion criterionFailure worth recording
Edit a local pageRequested change exists and the page opens.Unrelated edits or missing files.
Read a tool resultFinal answer uses the returned value.Invented value or skipped tool call.
Add an illustrationFinished file is used in the local artifact.A queued id reported as finished.

Use harmless local examples for the first comparison. Include at least one tool call and a follow-up turn. If streaming is part of the integration, test streamed tool-call arguments too. An HTTP 200 on plain chat establishes only basic connectivity.

Read prices with the right units

GET /api/v1/models exposes chat token pricing in USD per million tokens. Authenticated media estimates use millionths of USD. Media generators can charge per request or per second; check the current model's billing unit. See chat pricing and live prices.

OpenClaw's provider fragment keeps the key in an environment reference. It uses conservative context and output budgets and does not fill in a local cost table. A missing cost display in the client does not make API usage free. Use API Stock billing as the source of actual charges.

Compare complete runs

Record the model id, date, task version, outcome, wall time, tool calls, retries and observed charge for each run. Keep LLM charges and media charges separate, then add them for a task total only when both are known. Record missing cost as unknown, not zero.

After repeated runs, compare both completion rate and total observed spend divided by successful tasks. Include failed attempts in that spend. A single cheap successful example is not a reliable ranking. Do not publish speed, reliability or savings claims from configuration checks or fixtures.

Bound a longer run

A model's maximum output setting limits one response, not an entire agent session. Repeated tool calls and retries can still increase token usage. Review the runtime's task and iteration controls before extending a run. For each media task, use an explicit quote, a server-enforced ceiling and a durable idempotency key as shown in the media guide.

For new models, recheck protocol, tools, input types and context support. Model discovery and price data do not establish those capabilities. Pin the client version used for your acceptance run and repeat the relevant task after changing it.

API Stock's OpenAI protocol reference describes the chat endpoint. An agent calling media uses a separate asynchronous task API.

Mit dem eigenen Schlüssel ausführen

Wählen Sie ein Modell im API Stock-Katalog, prüfen Sie den Preis und testen Sie es im Browser oder per API.

Weiterlesen