# Muse (/docs/providers/muse)

The Muse account answers with the visitor's Meta account, through an API key Meta issues at sign in. The wallet lists it as Muse under "With your plan", with the id `muse`.

## What the visitor needs [#what-the-visitor-needs]

A Meta account that signs in to Muse Code. The wallet shows the account as paid from the plan.

## Sign in [#sign-in]

1. In the wallet, the visitor picks Muse under "With your plan".
2. The wallet asks Meta for a device code at `https://auth.meta.com/oidc/device/authorization/` and shows the code in the side panel.
3. It opens a window on Meta's verification page, with the code filled in when Meta gives such an address.
4. The visitor signs in and approves the code.
5. The wallet asks Meta's token endpoint each time a page finishes loading in the window, when the window closes, and when the visitor presses "I approved it". Meta answers `authorization_pending` or `slow_down` until the visitor approves.
6. The wallet trades the token Meta returns for a lasting API key and its base URL at `https://api.meta.ai/muse-code/key`. The account is connected with that key.

The code lasts as long as Meta says in `expires_in`, and ten minutes when Meta gives no duration. The key has no expiry in the wallet, and the wallet keeps no refresh token for this account.

## Models [#models]

The wallet has no model list for Muse. The account answers with `muse-spark-1.3`, and the side panel shows no model buttons for its sites.

## Usage and limits [#usage-and-limits]

The wallet reads no usage header specific to Muse. It reads `x-ratelimit-remaining-tokens` and `x-ratelimit-limit-tokens` on any answer that carries them, as it does for every account. Without them, the card keeps saying "Usage shows after the first answer", and Auto ranks the account among the accounts with no reading.

## Calls [#calls]

Answers come from the base URL Meta returns with the key, `https://api.meta.ai/v1` when Meta gives none, followed by `/chat/completions`, in the OpenAI chat completions protocol. All four request options reach Meta.

## Known issues [#known-issues]

- The sign in borrows the device login of Muse Code and its client.
- The sign in calls and the calls to `api.meta.ai` present Muse Code's `User-Agent`, `muse-code/1.0.2`.
