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

opencode · Image

How to Use Bria Product Dimensions in opencode

Bria Product Dimensions turns a product photo and supplied measurements into a dimension graphic for a listing or catalog. It preserves the photographed product while adding callout lines and labels.

Prompts to try with Bria Product Dimensions in opencode

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

Use Bria Product Dimensions to create a graphic from the bottle photo and approved specifications in this project. Show height, bottom width, and capacity; flag missing measurements.

Bria Product Dimensionsopencode
Try asking
  • Find the planter photo and matching product record in this project. Use Bria Product Dimensions to show its height, top width, and bottom width with the short title 'Planter dimensions'.

  • Use Bria Product Dimensions to make one dimension graphic per travel mug in the project catalog. Include verified height, bottom width, and weight, and save each result under its SKU.

  • Use Bria Product Dimensions on the lamp photo and specification record in this repository. Create a 2200 × 2200 image showing height and base width, then add it to the product gallery.

  • Use Bria Product Dimensions to generate separate graphics for the small and large containers in this project. Use each item's own photo and verified height and width, then build a comparison page from the results.

How to set up Bria Product Dimensions 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 Bria Product Dimensions

    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": "fal",
        "model": "bria/product-dimensions",
        "input": {
          "image": "https://bria-datasets.s3.us-east-1.amazonaws.com/product_dimensions/water+bottle+fal/water_bottle_white_background.png",
          "dimensions": [
            {
              "name": "height",
              "unit": "cm",
              "value": 22,
              "position": "left"
            },
            {
              "name": "width_bottom",
              "unit": "cm",
              "value": 7,
              "position": "bottom"
            }
          ],
          "style": "default"
        }
      }'

Then paste one of the prompts above: opencode finds Bria Product Dimensions on Spiral, shows the price and runs it.

Bria Product Dimensions providers and prices

Spiral runs Bria Product Dimensions through fal. Open a card for today's price, with every fee included.

falImage
Bria Product Dimensions
bria/product-dimensions

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Title positiontop_left, top_center, or top_righttop_center

Title placement along the top.

Proportional lineson or offon

Scale dimension line lengths by measurement.

Syncon or offoff

When true, return generated images directly as base64 instead of CDN URLs.

Styledefault, childlike, or elegant

Rendering style.

Output size256 to 22002200

Square output edge length in pixels.

Output formatpng, jpeg, or dualpng

Controls the rendered response: png, jpeg, or dual composite plus transparent overlay.

Units displaysingle, dual_bullet, dual_slash, or dual_parenssingle

How labels display primary and secondary units when both are provided.

Every API field of Bria Product Dimensions is on its tool page: open its card above.

What can you do with Bria Product Dimensions in opencode?

Create dimension graphics from product photos and specifications already stored in your project. Have the coding agent match each photo to its measurements and flag missing values before generating assets.

Product listing size graphics

Turn an existing product photo and verified height and width into a graphic shoppers can consult beside the listing description.

Tapered container measurements

Show a planter or container's height, top width, and bottom width together so buyers can distinguish its opening from its base.

Bottle size and capacity

Pair a bottle photo with height and base-width callouts, then include its verified capacity.

Portable product specifications

Combine a product's visible dimensions and verified weight in one graphic for items such as travel mugs or small lamps.

Catalog dimension images

Create a dimension graphic for each catalog item using its own photo and approved measurements, with consistent titles and presentation.

Size comparison assets

Create a separate labeled graphic for each product size, then arrange the results together in a comparison page.

Questions about Bria Product Dimensions in opencode

Can opencode use Bria Product Dimensions?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Bria Product Dimensions like any built-in tool.

How much does Bria Product Dimensions cost in opencode?

$0.052 per image. 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 a fal account to use Bria Product Dimensions in opencode?

No. Spiral runs Bria Product Dimensions on its own fal account. You sign in to Spiral once and never paste a key.

How long does it take to set up Bria Product Dimensions in opencode?

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

Does opencode wait while Bria Product Dimensions runs?

Bria Product Dimensions runs in the background. opencode starts the run, checks on it and gives you the image when it's ready.

What is Bria Product Dimensions useful for?

It creates dimension graphics for product listings and catalogs using a product photo and supplied measurements. Callout lines and labels put size information beside the item.

Does Bria Product Dimensions redraw the product?

The documented workflow preserves the product while rendering callout lines and labels around it. Start with a photo you want to use in the finished graphic.

Can Bria Product Dimensions show depth?

Length and depth callouts are explicitly disabled. Use it for graphics centered on height and width.

What resolution does Bria Product Dimensions produce?

The output is square, with a default size of 2200 × 2200 pixels.

What makes a good brief for Bria Product Dimensions?

Use a clean photo with the whole product visible, and supply verified measurements. Keep any title short so it leaves room for the product and its labels.

Get started

Start using Bria Product Dimensions 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