OpenAI-compatible API
Synaplan exposes a subset of OpenAI-compatible endpoints under /v1/*. Paths are routed through api.php/v1/....
Endpoints
POST /v1/chat/completions– Chat completions; supportsstreamtrue/falsePOST /v1/images/generations– Image generation by promptGET /v1/models– List available modelsPOST /v1/audio/transcriptions– Audio to textPOST /v1/images/analysis– Image understanding
Authentication: send Authorization: Bearer YOUR_API_KEY header.
Example: Chat completion
curl -sS \
-H "Authorization: Bearer $SYNAPLAN_API_KEY" \
-H "Content-Type: application/json" \
-X POST \
https://app.synaplan.com/api.php/v1/chat/completions \
-d '{
"model": "gpt-4.1",
"stream": false,
"messages": [
{"role":"system","content":"You are a helpful assistant."},
{"role":"user","content":"Say hello in one short sentence."}
]
}'
Notes
streamaccepts boolean or string'true'|'1'(server will stream chunks)- Use the same header and URL pattern for other endpoints, adapting the JSON body