MuseSpark
MuseSpark
API referenceAnthropic-compatible API

Anthropic: Create a message

/proxy/anthropic/v1/messages · POST

Required access: llm_compat with llm:invoke. Authentication.

POST
/proxy/anthropic/v1/messages

Authorization

headerAuthorizationBearer <token>

MuseSpark API key. Tasks accept a case-insensitive Bearer prefix; compatibility extraction requires Bearer with this casing.

Header Parameters

anthropic-version*string

Request Body

application/json
  1. body
model*string
max_tokens*integer
Range1 <= value
messages*array<>
stream?boolean
Defaultfalse

Response Body

Success. Protocol-native response.

  1. response

Protocol-native JSON. Exact fields and optional features depend on the selected model and surface; not a {code,msg,data} envelope.

[key: string]?any
Example Request
curl -X POST 'https://api.musespark.ai/proxy/anthropic/v1/messages' \  -H 'anthropic-version: 2023-06-01' \  -H 'Content-Type: application/json' \  -d '{  "model": "string",  "max_tokens": 1,  "messages": [    {      "role": "string",      "content": "string"    }  ]}'
Example Response
{}