Skip to content
Azamol AI — Intelligent Assistance Solutions

Muse Ember API Setup: A Step-by-Step Guide with the OpenAI SDK

Author:
Muse Ember API Kurulumu: OpenAI SDK ile Adım Adım Rehber

Setting up the Muse Ember API takes four steps: create an API key in the Meta Model API dashboard, store it in the MODEL_API_KEY environment variable, install the OpenAI Python SDK with pip install openai, and point the client's base_url at https://api.meta.ai/v1 with muse-ember-1.0 as the model. Released by Meta on November 9, 2026, Muse Ember is a low-cost model with a 1M-token context, priced at $0.10 per million input tokens and built for repeated work such as classification, routing and tool calls. The most important setting after setup is the reasoning level: it defaults to max, so short tasks can run slower and cost more than expected.

What is Muse Ember, and what is it for?

Muse Ember is the most economical language model Meta offers through its Model API. According to the official model page, Muse Ember is an "execution" model built for repeated, high-volume work: sub-agent tasks, tool calls, routing each request to the right handler, and running the same task over thousands of records. Muse Ember has a context window of 1,048,576 tokens and a maximum output of 524,288 tokens. It takes text, image, video, audio and PDF input and produces text. It works on all three endpoints: Responses, Chat Completions and Messages.

Google Cloud's model page gives Muse Ember's release date as November 9, 2026; the same page lists the model as Preview on Google Cloud, on the global endpoint only. As reported by TestingCatalog, Meta puts Muse Ember at 35.8 on the Artificial Analysis index against 36.2 for Claude Haiku 5.5, with an estimated cost per task of $0.136 for Ember and $0.411 for Haiku. That comparison is Meta's own chart, not an independent test.

What are the requirements for setting up the Muse Ember API?

You need four things to use Muse Ember through the API:

  • A Meta Model API account and API key: According to the quickstart, you create an account on the dashboard, open API keys, select Create API key and copy the key. Keep it out of your code; our Northflank breach article explains why.
  • Pay-as-you-go billing: According to the pricing page, Model API has no minimums or upfront commitment; you pay per token.
  • Python and the OpenAI SDK: Meta has no separate Python library; Model API follows the OpenAI format, so the official examples use the OpenAI SDK. For Node.js, the same package installs with npm install openai.
  • A terminal: Set the environment variable with export on macOS and Linux, or with the PowerShell line on Windows; both are below.

How do you set up the Muse Ember API step by step?

Setting up Muse Ember follows Meta's official quickstart; the code blocks below are taken unchanged from the official documentation.

Step 1 — Store the key in an environment variable. The examples read the key from MODEL_API_KEY. Replace the quoted value with your own key. On macOS and Linux:

bash
export MODEL_API_KEY="your-api-key-here"

On Windows PowerShell:

powershell
$env:MODEL_API_KEY = "your-api-key-here"

Step 2 — Install the OpenAI SDK. This command installs the OpenAI package for Python:

bash
pip install openai

Step 3 — Point the client at the Meta endpoint. The Meta-specific settings are the base_url line and passing the key explicitly:

python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.meta.ai/v1",
    api_key=os.environ["MODEL_API_KEY"],
)

Step 4 — Send the first request. The official Python example uses the Responses API and is written for Muse Spark. Because Muse Ember accepts the same request body as Muse Spark, the only change is the model line: replace muse-spark-1.3 with muse-ember-1.0. Add this below the client in the same file and run the file with Python:

python
response = client.responses.create(
    model="muse-spark-1.3",
    input="What is the capital of France?",
)

print(response.model_dump_json(indent=2))

Step 5 — Choose the reasoning level. Reasoning cannot be turned off on Muse Ember; the value "none" returns HTTP 400. According to the reasoning documentation, you set the level with reasoning.effort on the Responses API or reasoning_effort on Chat Completions, using minimal, low, medium, high, xhigh or max. Ember defaults to max. Reasoning tokens are billed at the same rate as visible output, so for short tasks like message classification, compare minimal and low on your own examples.

How do you verify that the Muse Ember setup works?

The quickest way to verify the Muse Ember setup independently of Python is the official curl request on the Muse Ember page. It calls muse-ember-1.0 directly and classifies a support ticket:

bash
curl -X POST "https://api.meta.ai/v1/responses" \
    -H "Authorization: Bearer $MODEL_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "model": "muse-ember-1.0",
    "input": "Classify this support ticket as billing, bug, or feature request, and give a one-sentence reason: \"I was charged twice for my October invoice.\""
  }'

You should see the ticket placed in the "billing" class with a short reason. The output_tokens_details.reasoning_tokens field in the usage section shows how many tokens went into reasoning; it is the easiest way to check whether your level setting works. If curl works but Python does not, the key is the most likely cause: the OpenAI SDK does not read MODEL_API_KEY automatically, so api_key must be passed to the client explicitly.

Which common errors and fixes should you know for Muse Ember?

Most errors with Muse Ember come from moving code written for OpenAI over unchanged. Based on the limits in the Chat Completions documentation and the reasoning documentation, the main cases are:

SymptomCauseFix
The request returns HTTP 400A "none" reasoning level or an unsupported parameter such as stop, logit_bias or logprobsSet the level to minimal and remove unsupported parameters
The visible reply is cut offReasoning tokens count toward the output limitRaise max_output_tokens or lower the reasoning level
The model forgets earlier reasoning in a multi-turn chatChat Completions does not carry reasoning across turns for external keysSwitch to the Responses API and chain turns with previous_response_id
You get HTTP 429The team limit was exceeded: 3,000 requests and 4,000,000 tokens per minute for EmberRetry with exponential backoff and jitter; remember the limit is per team, not per key
HTTP 504 gateway_timeoutA long non-streaming request timed outUse stream=True for long generations
The bill is higher than expectedA request over 200K input tokens bills all its tokens at long-context ratesSplit long documents; calculate cost at your real input sizes
A JSON schema does not work on the Responses APIThe Responses API expects text.format, not response_formatUse the field that matches the endpoint

Muse Ember, Muse Spark or Muse Wonder?

Muse Ember is not built to be the whole brain of an assistant on its own; it is designed as the executor next to a larger model. We compiled the table below from Meta's model selection guide and pricing page:

ModelModel IDDefault reasoningWhen to choose itWhen not to
Muse Wondermuse-wonder-1.0maxLong-running agent work, multi-file code changes, planningThousands of short, repeated tasks
Muse Sparkmuse-spark-1.3highA cheaper main loop, knowledge-heavy questionsBulk jobs where cost per token matters
Muse Embermuse-ember-1.0maxClassification, routing, tool calls, bulk record processingHard single-shot coding and knowledge-heavy questions

In the setup Meta recommends, the larger model plans and Muse Ember handles the volume. Because each request picks its model in the model field, using two models in one application needs no extra setup.

How much does an AI assistant cost per month on Muse Ember?

In the example below, an AI assistant handling 10,000 customer conversations a month costs $11.5 in Muse Ember model usage. We used the Standard mode figures from Meta's pricing page: up to 200K input tokens, $0.10 per million input tokens and $0.50 per million output tokens. We assume 4,000 input tokens and 1,500 output tokens including reasoning per conversation; these are our example figures, not numbers published by Meta.

  1. Input: 10,000 × 4,000 = 40 million tokens; 40 × $0.10 = $4.
  2. Output: 10,000 × 1,500 = 15 million tokens; 15 × $0.50 = $7.5.
  3. Monthly total: $4 + $7.5 = $11.5.
  4. The same volume on Muse Spark in Standard mode: 40 × $1.25 = $50 input, 15 × $4.25 = $63.75 output, $113.75 in total.
  5. If the same token volume came in as long-document requests over 200K, Ember's input and output prices would be 3 times higher: $11.5 × 3 = $34.5.

The math covers model usage only; WhatsApp or phone channel fees, integration and maintenance are not included. Cached input is billed at $0.004, so repeated system prompts can lower the bill further.

What should you check before taking Muse Ember live?

Before taking Muse Ember live, settle four points:

  • Language quality: Google Cloud's model page does not specify supported languages, and Meta's model page gives no language list either. Measure classification accuracy in each language you serve with your own customer messages, and state the response language explicitly in the prompt.
  • GDPR: If you process personal data of people in the EU, Article 28 GDPR requires processing by a processor to be governed by a binding contract and to follow the controller's documented instructions. Get the processing terms and region in writing before sending customer messages. This is not legal advice.
  • Data use: According to the pricing page, your content is not used to train Meta models in Standard mode. Ember runs in Standard mode only, so there is no discounted "Contributor" option. The pricing page does not state a retention period for Ember; ask for it in writing.
  • Cloud access: If you use it through Google Cloud, factor in that the model is in Preview there, offered on the global endpoint only, and without batch prediction support.

Which Muse Ember version does this guide use?

The steps in this guide are written for the model ID muse-ember-1.0 and the https://api.meta.ai/v1 endpoint. According to the official page, the context window is 1,048,576 tokens and the maximum output is 524,288 tokens. Because the SDK is installed with pip install openai and no version, you get the current OpenAI release on that day; pin the version you use in production in your own dependency file. If Meta releases a new Ember version, the model line is the only place you need to change.

What does this setup mean for your business?

For businesses that handle large numbers of short, similar messages every day, setting up Muse Ember is a chance to cut model costs noticeably. Take an online retailer that receives hundreds of return, shipping and invoice questions a day. It can classify each incoming message with Muse Ember as "return", "shipping", "invoice" or "other" and route it to the right team, passing only complex requests to a stronger model or a person. In the math above, the model cost for 10,000 conversations comes to $11.5; the real work is measuring accuracy in your customers' languages, tuning the reasoning level and settling the data processing terms.

Who it suits, and who it does not:

  • A good fit: Businesses that classify high volumes of messages, forms or records, want cheaper tool calls inside an agent flow, and have an integration built on the OpenAI SDK plus at least one developer.
  • Not a good fit: Businesses without developer resources get results faster from a ready-made AI assistant service than from building on the API. Businesses that cannot send customer data to an outside provider should look elsewhere. For tasks that need a correct answer to hard technical questions in one shot, Meta itself recommends Muse Spark or Muse Wonder.

Three steps you can take this week:

  1. Send 50 real customer messages, with personal data removed, to Muse Ember at minimal and max; record accuracy, response time and the reasoning_tokens count.
  2. Get in writing from Meta which country processes your data and what the retention terms are.
  3. Plug your monthly message volume into the math above and compare the result with your current model's bill.

To build a similar classification layer on another model, see our Claude Haiku 5.5 API setup guide; for a model built for long documents, our Kimi K3.1 Pro API setup guide; to add an assistant to your website, our AI assistant installation guide. For multi-step flows that turn a classified message into a CRM record, see our AI agent service; to receive customer messages on WhatsApp, our WhatsApp automation service. You can try ready-made scenarios on our demos page.

Sources

Last checked: November 12, 2026.

Next step

To adapt Muse Ember or another model to your own workflow, visit our AI assistant service page, request a short discovery call through our contact form, or call +90 850 840 08 23 and talk live with Azra, our voice assistant.

Frequently asked questions

Is the Muse Ember API paid?

Yes. Model API is billed pay-as-you-go, with no minimums or upfront commitment. According to Meta's pricing page, up to 200K input tokens it costs $0.10 per million input tokens, $0.004 for cached input and $0.50 for output. For requests over 200K, all tokens are billed at $0.30, $0.012 and $1.50.

Which languages does Muse Ember support?

Meta's and Google Cloud's model pages do not list supported languages. Test answer and classification quality in each language you serve with real customer messages before going live, and state the response language explicitly in the prompt.

Can we run Muse Ember on our own servers?

No. Muse Ember is offered only through Meta Model API, Muse Code and cloud partners such as Google Cloud. Meta's open-weight models that you can run yourself are Muse Spark Open and Muse Glimmer; those are not called over the API.

Can we move our existing OpenAI code to Muse Ember?

Yes. Model API follows the OpenAI format, so changing the base_url, the key and the model ID is enough. In addition, remove unsupported parameters such as stop, logit_bias and logprobs, and use the Responses API for multi-turn work.