API referenceOpenAI-compatible API
OpenAI: Create a chat completion
/proxy/openai/v1/chat/completions · POST
Required access: llm_compat with llm:invoke. Authentication.
POST
header
AuthorizationBearer <token>MuseSpark API key. Tasks accept a case-insensitive Bearer prefix; compatibility extraction requires Bearer with this casing.
application/json- body
model*stringUse a model ID returned by the compatibility model catalog.
messages*array<>stream?booleanDefault
falseSuccess. Protocol-native response.
- response
Protocol-native JSON. Exact fields and optional features depend on the selected model and surface; not a {code,msg,data} envelope.
[key: string]?anycurl -X POST 'https://api.musespark.ai/proxy/openai/v1/chat/completions' \ -H 'Content-Type: application/json' \ -d '{ "model": "string", "messages": [ { "role": "string", "content": "string" } ]}'Example Response
{}