Skip to navigation

Muse Responses

Call Muse Wonder through the OpenAI Responses API with a BeatAPI key.

  • One endpoint, POST /v1/responses, for Muse Wonder.
  • Streaming and function calling, with a 1M-token context window.
  • Works with the OpenAI SDK: change the base URL and use a BeatAPI key. For an existing Chat Completions integration, see Chat Completions.
  • Conversation state is not stored on the server: send the whole history in input on every turn.

Use https://direct.beatapi.io as the base URL for text requests: it is not subject to Cloudflare’s 100-second limit, so a long non-streaming request is not cut off. https://api.beatapi.io also works and is the fallback if direct.beatapi.io is unreachable from your network. The key, models and prices are the same on both. Image and video APIs use https://api.beatapi.io only.

POST/v1/responsesTry it

Opens this endpoint in the API Explorer. Enter your BeatAPI API key and send: the call is real and is billed to your own balance.

Models

Send this ID as model.

Model IDContext (tokens)Max output (tokens)PositioningInput, USD per 1M tokensOutput, USD per 1M tokensNotes
muse-wonder1,048,576131,072Meta Muse Wonder: a frontier reasoning model for complex personal and professional agentic work.$4.00$20.00Meta’s frontier reasoning model for complex personal and professional agentic work. Needs a funded account.
  • Prices are the base tier, discount already applied. A long-context tier, cached-input rates and cache writes are not in this table; see the price table.
  • — means the catalogue does not publish the number.

Quick start

Install the openai package on your server, keep the key in BEATAPI_API_KEY, and never put it in browser code. output_text is the SDK’s shortcut for the answer text. These are request examples, not recorded model outputs.

Read the answer from output_text (or from the output_text parts of output), then check status and usage. An HTTP 200 alone does not prove the answer satisfies your task: validate it in your application. Text requests return directly; do not poll /v1/tasks for them.

curl --request POST \
--url https://direct.beatapi.io/v1/responses \
--header "Authorization: Bearer $BEATAPI_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "muse-wonder",
"max_output_tokens": 2000,
"input": "Design a resilient webhook retry strategy for a payments API."
}'

Endpoint and authentication

POST https://direct.beatapi.io/v1/responses

Authorization string Required

Bearer <BEATAPI_API_KEY>. The key works with or without the sk- prefix.

Request parameters

Standard OpenAI Responses fields are accepted. Request-format compatibility does not mean every model-specific option or hosted tool is supported, so test the options you rely on.

model string Required

The exact model ID.

Allowed values: muse-wonder

  • Each ID is a separate model, not an alias of another.
  • Call GET /v1/models with your key to confirm which models are enabled for it.

input string | object[] Required

The prompt: a string, or an array of input items such as messages, function calls and their outputs.

Conversation state is not stored on the server. previous_response_id, conversation, prompt and context_management are not supported: send the whole history in input on every turn.

instructions string Optional

A system-level instruction placed before input.

max_output_tokens integer Optional

Upper bound on the generated tokens, reasoning included.

  • The gateway does not compare your value with the model’s max output from the table above. Keep it at or below that number.
  • The value is also used to estimate how much balance a request needs. A very large value can be refused with 402 insufficient_credits even when the real output would be small. Set it to what you need.

A reasoning model writes its reasoning first. If max_output_tokens is too small, the reasoning can use all of it and the answer text comes back empty or cut off. Leave room for both, and raise the value when that happens.

stream boolean OptionalDefault: false

Return the answer as server-sent events. See the Streaming section below.

Default: false

temperature number Optional

Sampling temperature. Change this or top_p, not both.

top_p number Optional

Nucleus sampling threshold.

tools object[] Optional

Function tools the model may call. The model answers with a function_call output item; return the result as a function_call_output input item with the same call_id. Hosted tools (web search, file search and the like) are not part of this list.

tool_choice string | object Optional

Whether the model may, must or must not call a tool. Test the value you rely on with your model.

Response

A non-streaming call returns one JSON object. This is an abbreviated example.

{
"id": "resp_example",
"object": "response",
"model": "muse-wonder",
"status": "completed",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Retry with exponential backoff and jitter, and make every handler idempotent."
}
]
}
],
"usage": {
"input_tokens": 19,
"output_tokens": 16,
"total_tokens": 35
}
}

Response fields

FieldTypeDescription
idstringThe response ID. Log it, together with the request ID, for support and billing audits.
modelstringThe model that answered.
statusstringcompleted for a finished answer.
output[]object[]Output items: message, reasoning and function_call. The SDK’s output_text joins the text parts for you.
output[].content[].textstringThe answer text of a message item, in a part of type output_text.
usageobjectToken counts. Calls are metered from actual token usage.

Streaming

Set "stream": true. The stream starts with response.created, carries the answer in response.output_text.delta events and ends with response.completed.

  • The response is text/event-stream; without streaming it is application/json.
  • A function call arrives as its own output item, and its arguments stream in response.function_call_arguments.delta events.
  • A failure before the model is called is returned as a normal JSON error with an HTTP status, not as a stream event.
  • Set explicit timeouts and reconnect a streamed response safely.
event: response.created
data: {"type":"response.created","response":{"id":"resp_example","status":"in_progress"}}
event: response.output_text.delta
data: {"type":"response.output_text.delta","delta":"Retry"}
event: response.output_text.delta
data: {"type":"response.output_text.delta","delta":" with backoff"}
event: response.completed
data: {"type":"response.completed","response":{"id":"resp_example","status":"completed"}}

Errors

Error or symptomCauseFix
The answer text is empty or cut offA reasoning model used the whole max_output_tokens budget on reasoning.Raise max_output_tokens, within the model max output.
An error mentioning previous_response_id, conversation, prompt or context_managementThese stateful fields are not supported.Remove them and send the whole history in input.
402 insufficient_creditsBalance below the price of the request, often because max_output_tokens is very large.Top up, or lower max_output_tokens.
403 forbiddenThe account is on free credit and the model is not on the free list, or the model is outside the key’s group.Top up, use a free model, or use a key whose group can reach the model.
404 not_foundUnknown model ID, or not enabled for this key.List the enabled models with GET /v1/models.
429 rate_limit_exceededAccount or free-model limit reached.Wait Retry-After, then retry.

HTTP errors at a glance

Authentication, routing, rate-limit and unknown-model failures are answered before the model is called, in the BeatAPI envelope: error.code, error.message, retryable, request_id. Every other failure keeps the OpenAI SDK shape {"error": {"message", "type", "code"}}: the code is in error.code and the request id ends message. See Errors.

HTTP statusCodeWhat to do
400bad_request, content_policy_violationFix the request or the input; do not resend it unchanged.
401missing_api_key, invalid_api_keyCheck the key. Do not retry.
402insufficient_creditsTop up, or raise the key’s limit. A very large max_tokens can trigger it.
403forbiddenThe model is outside the key’s group or IP allowlist, or free credit cannot call this model.
404not_foundUnknown model: list the enabled ones with GET /v1/models.
429rate_limit_exceededWait Retry-After or retry_after_seconds, then retry with backoff.
500internal_error, temporary_errorRetry once or twice with backoff.
503model_unavailable, upstream_timeout, temporary_errorRetry with backoff, or use another model.

Full code table and retry policy: Errors.

Notes

  • Muse also answers on Chat Completions and Anthropic Messages.
  • muse-wonder requires a funded account. An account that only holds free credit cannot call it.
  • Muse Wonder reasons before it answers. Reasoning counts as output tokens and is billed as output.
  • Keep API keys on trusted servers, log the response request ID, and retry only 429, 500 and 503.

Authentication

AuthorizationBearer

Send your API key as Authorization: Bearer <BEATAPI_API_KEY>.

Request

This endpoint expects an object.
modelenumRequired

The exact model ID.

Each ID is a separate model, not an alias of another.

Call GET /v1/models with your key to confirm which models are enabled for it.

muse-wonder

Allowed values:
inputstring or list of objectsRequired

The prompt: a string, or an array of input items such as messages, function calls and their outputs.

Conversation state is not stored on the server. previous_response_id, conversation, prompt and context_management are not supported: send the whole history in input on every turn.

instructionsstringOptional

A system-level instruction placed before input.

max_output_tokensintegerOptional

Upper bound on the generated tokens, reasoning included.

The gateway does not compare your value with the model’s max output from the table above. Keep it at or below that number.

The value is also used to estimate how much balance a request needs. A very large value can be refused with 402 insufficient_credits even when the real output would be small. Set it to what you need.

A reasoning model writes its reasoning first. If max_output_tokens is too small, the reasoning can use all of it and the answer text comes back empty or cut off. Leave room for both, and raise the value when that happens.

streambooleanOptionalDefaults to false

Return the answer as server-sent events. See the Streaming section below.

temperaturedoubleOptional

Sampling temperature. Change this or top_p, not both.

top_pdoubleOptional
Nucleus sampling threshold.
toolslist of objectsOptional

Function tools the model may call. The model answers with a function_call output item; return the result as a function_call_output input item with the same call_id. Hosted tools (web search, file search and the like) are not part of this list.

tool_choicestring or map from strings to anyOptional
Whether the model may, must or must not call a tool. Test the value you rely on with your model.

Response

A non-streaming call returns one JSON object. This is an abbreviated example.

idstringOptional
The response ID. Log it, together with the request ID, for support and billing audits.
modelstringOptional
The model that answered.
statusstringOptional

completed for a finished answer.

outputlist of objectsOptional

Output items: message, reasoning and function_call. The SDK’s output_text joins the text parts for you.

usageobjectOptional
Token counts. Calls are metered from actual token usage.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error