How to Use xAI model pricing documentation in opencode
Returns xAI's published pricing documentation covering tokens, tools, batch processing, and storage. Use it to identify the billing categories a Grok workload needs to account for.
Prompts to try with xAI model pricing documentation in opencode
Copy an example into opencode, or ask in your own words.
Use xAI model pricing documentation to review which billing categories our Grok workload estimator accounts for. List any categories the estimator needs us to investigate.
Use xAI model pricing documentation to look this up and give me the result as a table. Save the result in ./assets.
Pull the latest numbers from xAI model pricing documentation and tell me what changed since last week.
Check xAI model pricing documentation and summarize what you find in three bullet points.
Pull the newest data from xAI model pricing documentation and give me the result as a table.
How to set up xAI model pricing documentation in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run xAI model pricing documentation
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "alexandria", "model": "x-ai/developer-docs/model_pricing", "input": {} }'
Then paste one of the prompts above: opencode finds xAI model pricing documentation on Spiral, shows the price and runs it.
xAI model pricing documentation providers and prices
Spiral runs xAI model pricing documentation through Alexandria. Open a card for today's price, with every fee included.
What can you do with xAI model pricing documentation in opencode?
Create a Grok integration review tied to the code in your repository. A coding agent can match project assumptions to xAI documentation, release announcements, and published billing categories.
Prepare a Grok integration review
Build a review packet with relevant documentation links, recent API changes, and the published billing categories that apply to the proposed workload.
Plan a model migration
Find retirement announcements and replacement guides, then identify the pricing documentation and implementation topics the migration review needs.
Write an operations runbook
Collect official references for batch processing, storage, and tool use. Include relevant change announcements and billing categories so operators know which documentation supports each procedure.
Review an existing Grok workload
Compare a workload's documented assumptions with current xAI references, published pricing documentation, and release announcements to produce a concrete review checklist.
Check a workload estimator's assumptions
Identify the published billing categories behind an estimator, locate explanatory documentation, and review release notes for changes that warrant updating its assumptions.
More on xAI model pricing documentation and opencode
Overview
xAI model pricing documentation in other agents
Questions about xAI model pricing documentation in opencode
Can opencode use xAI model pricing documentation?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run xAI model pricing documentation like any built-in tool.
How much does xAI model pricing documentation cost in opencode?
$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.
Do I need an Alexandria account to use xAI model pricing documentation in opencode?
No. Spiral runs xAI model pricing documentation on its own Alexandria account. You sign in to Spiral once and never paste a key.
How long does it take to set up xAI model pricing documentation in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while xAI model pricing documentation runs?
xAI model pricing documentation runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.
Does xAI documentation cover more than API reference pages?
Yes. The official index includes Grok models, SDKs, guides, pricing, and application documentation as well as REST references.
Can I read the original documentation as Markdown?
Yes. xAI publishes every documentation page as Markdown by appending .md to the page URL.
How far back does the developer change archive go?
The published archive includes November 2024 entries, including the announcement of LangChain support. It provides historical announcements alongside more recent changes.
Does xAI document exact model retirement deadlines?
Yes. Its May 2026 retirement guide specifies May 15, 2026 at 12:00 PM Pacific, so a retirement can have a precise cutoff rather than just a month.
Does a model appearing in the docs mean everyone can use it?
No. xAI says model access can vary with geographical location and account limitations. The public documentation describes the offering without guaranteeing individual availability.
Start using xAI model pricing documentation in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


