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

opencode · Image

How to Use Headshot Generator in opencode

Headshot Generator turns an existing portrait into a professional headshot with a customizable background. Use it for profile photos, team pages, and speaker bios, with documented 4K output.

Prompts to try with Headshot Generator in opencode

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

Use Headshot Generator on the founder portrait in this project's assets. Request a professional background and 3:4 framing, save the result separately, and show it in the existing about page.

Headshot Generatoropencode
Try asking
  • Use Headshot Generator to prepare headshots from the portraits used by our team page. Apply a corporate background and 3:4 framing throughout, then build a local preview for review.

  • Use Headshot Generator on the author portrait referenced by our blog template. Choose a clean background, preserve the original asset, and preview the result beside an article byline.

  • Use Headshot Generator on the speaker portrait in this project's conference assets. Request 4K output with 3:4 framing and a professional background, then preview it in the speaker biography layout.

  • Use Headshot Generator to make two headshot drafts from the portfolio portrait in this project, one with a clean background and one with a gradient background. Keep the framing at 3:4 and show them side by side.

How to set up Headshot Generator 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 Headshot Generator

    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": "fal-ai/image-apps-v2/headshot-photo",
        "input": {
          "image_url": "https://v3.fal.media/files/panda/oMob58qZJRtbDs5l45QKT_e3a1512c455d425fab2d62e07a51c506.png"
        }
      }'

Then paste one of the prompts above: opencode finds Headshot Generator on Spiral, shows the price and runs it.

Headshot Generator providers and prices

Spiral runs Headshot Generator through fal. Open a card for today's price, with every fee included.

falImage
Headshot Generator
fal-ai/image-apps-v2/headshot-photo

Settings you can ask for

Headshot Generator works from your image URL. Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Background styleprofessional, corporate, clean, or gradientprofessional

Every API field of Headshot Generator is on its tool page: open its card above.

What can you do with Headshot Generator in opencode?

Create headshot assets for team pages, author biographies, and portfolios from existing portraits. A coding agent can place the results in the project and check how they appear in the actual layout.

Professional profile photos

Turn an existing portrait into a headshot for a professional profile. Review it at the small size visitors will actually see.

Company team pages

Create headshots from employee portraits using the same background treatment. Compare the results together before adding them to the team page.

Conference speaker biographies

Prepare headshots from speaker portraits for event biographies and session pages. Keep each result associated with the correct speaker.

Author biographies

Use an author's existing portrait to prepare a headshot for article bylines, book pages, or a press biography.

Consultant and freelancer portfolios

Create a professional headshot from a supplied portrait for an about page or service proposal. Choose the background treatment to suit the destination.

New employee directories

Process newly submitted employee portraits into headshot drafts for an internal directory. Keep the originals available for comparison.

Questions about Headshot Generator in opencode

Can opencode use Headshot Generator?

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

How much does Headshot Generator 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 Headshot Generator in opencode?

No. Spiral runs Headshot Generator on its own fal account. You sign in to Spiral once and never paste a key.

How long does it take to set up Headshot Generator in opencode?

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

Does opencode wait while Headshot Generator runs?

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

What is Headshot Generator good for?

Headshot Generator creates professional headshots from existing portraits with customizable backgrounds. Suggested uses include professional profiles, company directories, and speaker biographies.

Can Headshot Generator create a person from a written description?

Headshot Generator is documented as an image-to-image tool. Start with a portrait of the person you want pictured.

What resolution does Headshot Generator produce?

The documentation describes 4K output and a 3:4 portrait default. Specify 3:4 explicitly when you want that framing.

How should I brief an agent using Headshot Generator?

Identify the source portrait, the intended use, and the background treatment you want. For a team directory, request the same treatment and framing for each person, then review the results together.

What should I check before using a generated headshot?

Compare it with the original portrait, paying attention to facial features, hair, glasses, and the edges around the subject. Check the intended crop and ask the person pictured to review the result.

Get started

Start using Headshot Generator 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