How to hit the Meta Model API API

Meta's Model API at https://api.meta.ai/v1 serves Meta's Muse model family with an OpenAI-compatible chat API. Meta's developer docs, which used to cover the Llama API, now point here.

Authentication

Create a key at ai.developer.meta.com. Send it as Authorization: Bearer <key>. In the examples it's written {{META_API_KEY}}.

Full reference: https://ai.developer.meta.com/docs/overview/

Chat completion

curl https://api.meta.ai/v1/chat/completions \
  -H "Authorization: Bearer {{META_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{"model": "muse-spark-1.3", "messages": [{"role": "user", "content": "Explain what a webhook is in two sentences."}]}'
Run in PostTaco