Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.meshrouter.app/llms.txt

Use this file to discover all available pages before exploring further.

POST /v1/chat/completions
curl https://api.meshrouter.app/v1/chat/completions \
  -H "Authorization: Bearer mesh_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"auto","messages":[{"role":"user","content":"Hello"}],"stream":true}'

MESH extensions

FieldDescription
modelsOrdered fallback model list
routeauto or fallback
privacyStandard or Nitro privacy-mode envelope
response_formattext, json_object, or json_schema
toolsOpenAI-compatible function definitions
tool_choiceauto, none, or a named function
Text, image, and tool messages use the OpenAI-compatible messages shape.

Response headers

HeaderDescription
x-mesh-upstream-cost-usdModel cost for this call
x-mesh-margin-usdMESH margin
x-mesh-total-usdTotal USD drawn from your balance
x-mesh-receipt-idReceipt ID for /v1/receipts/{id}