# Recipe variant: social workflow with hosted AI

**When available.** This variant needs the `hosted_ai` capability. Until `whoami` shows `hosted_ai: true`, use the main [social post workflow](/docs/recipes/social-workflow) with the runner.

With hosted AI, BakedBrie calls the model and makes images for you, paid by your own AI account. OpenAI bills you directly and BakedBrie adds nothing. No runner and no computer has to stay on.

- Image generation needs an OpenAI key. An agent paid by an Anthropic account can write text but is refused when it tries to make images.
- Each call is sent once. If a call times out after it was sent, BakedBrie does not send it again; the card says what happened.
- Audio and video generation are not available.

## Before you run it

Skip step 2 of the main recipe's "Before you run it" (pairing the runner): no runner is needed. Put the OpenAI key in the `OPENAI_API_KEY` environment variable in the shell that runs Claude Code or Codex. Never paste it into chat.

## How the prompt changes

Start from the prompt in the [main recipe](/docs/recipes/social-workflow) and make these changes:

In the first line of the prompt, replace `runner` with `hosted_ai` in the capability list, so the prompt does not stop when the runner is off.

Replace step 2 with:

```text
2. AI account: connect my OpenAI key from the environment variable OPENAI_API_KEY (prepare_secret kind openai, purpose ai_account) with connect_ai_account, provider openai, label "Social posts key". Bind it to this board with bind_ai_account (scope board). Then call check_ai_account with action recheck, wait a few seconds, and call it again with action read; stop and tell me if health is not ok.
```

Replace the permissions in step 7 with:

```text
The Carousel generator has read_files allowed and create_images allowed, everything else off (write_files only matters for the runner).
```

## Mixing both

A board can use hosted AI while another board, or one agent, uses the runner. `bind_ai_account` decides who pays: an agent binding wins, then the board, then the workspace. Publish an agent again after you bind it.
