Spiral gives your agent every tool with one account. Browse the tools →

opencode · E-commerce

How to Use Azure meter pricing in opencode

Returns Microsoft's retail rate records for a known billing meter, including its product, SKU, region, and billing unit. Use it to identify what a meter charges for when you already have its ID.

Prompts to try with Azure meter pricing in opencode

Copy an example into opencode, or ask in your own words.

Use Azure meter pricing to look up 0084b086-37bf-4bee-b27f-6eb0f9ee4954 in southindia. If it returns records, add its product, SKU, billing unit, and effective date to our meter reference file.

Azure meter pricingopencode
Try asking
  • Use Azure meter pricing to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from Azure meter pricing and tell me what changed since last week.

  • Check Azure meter pricing and summarize what you find in three bullet points.

  • Pull the newest data from Azure meter pricing and give me the result as a table.

How to set up Azure meter pricing in opencode

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. 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
  2. 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
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. 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

  1. Create an API key

    In the console, under API keys.

  2. Run Azure meter pricing

    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": "prices-azure-com/products/get_meter",
        "input": {
          "meter_id": "<meter_id>"
        }
      }'

Then paste one of the prompts above: opencode finds Azure meter pricing on Spiral, shows the price and runs it.

Azure meter pricing providers and prices

Spiral runs Azure meter pricing through Alexandria. Open a card for today's price, with every fee included.

AlexandriaE-commerce
Azure Retail Prices · Get meter
prices-azure-com/products/get_meter

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Include savings planon or off

Request api-version 2023-01-01-preview to get savings_plan on eligible rows.

Every API field of Azure Retail Prices · Get meter is on its tool page: open its card above.

What can you do with Azure meter pricing in opencode?

Add an Azure retail baseline to an infrastructure review using the SKUs and regions in the project's deployment files. The agent can attach meter names, billing units, tier thresholds, and effective dates to make each estimate reviewable.

Build a regional budget baseline

Collect retail records for a planned Azure deployment in East US and West Europe. Compare matching products, billing units, and consumption tiers, using discovered SKU names or saved meter IDs to narrow the review.

Explain a billing meter

Turn a meter ID into a readable explanation of its Azure product, SKU, region, and usage unit. Use that explanation to review a cost export against a public retail baseline.

Check an estimate's billing units

Review the Azure rate records behind an estimate and identify calculations that mix hourly units with other usage measures or overlook a consumption threshold.

Watch a deployment's retail baseline

Save repeated observations of the Azure SKUs or meters used in a deployment. Report changes in returned rates, units, and effective dates against the previous saved observation.

Document an architecture decision

Attach the exact Azure product, SKU, meter, region, billing unit, and effective date to a retail comparison. This makes the assumptions behind a resource choice reviewable.

Questions about Azure meter pricing in opencode

Can opencode use Azure meter pricing?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Azure meter pricing like any built-in tool.

How much does Azure meter pricing 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 Azure meter pricing in opencode?

No. Spiral runs Azure meter pricing on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up Azure meter pricing in opencode?

About two minutes: add the server, then sign in, then check it.

Does opencode wait while Azure meter pricing runs?

Azure meter pricing runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

Does this catalog include Azure Government and Azure China?

Microsoft limits this Retail Prices API to Azure Commercial Cloud. Do not use its regional records as evidence of rates in Azure Government or Azure China.

Are these the rates my organization actually pays?

These are public retail rates. Microsoft identifies the Price Sheet API as the source for negotiated Enterprise customer pricing.

Can one source response contain every matching record?

Microsoft caps an upstream response at 1,000 records and supplies a next-page link. A broad catalog comparison can therefore require multiple source pages.

What does the effective date tell me about freshness?

The optional effective start date tells you when that rate takes effect. It is not a timestamp for the catalog's latest refresh.

Why might a converted rate disagree with my invoice?

Microsoft says the API's currency conversions produce estimates using the current conversion rate. Those results can differ from the conversion used for your invoice.

Get started

Start using Azure meter pricing in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options