What it is
Allows external systems and scripts to communicate with Symphony models programmatically, via the chat completions endpoint. Use this integration for automations, backends, tests (Postman), or integrations with other tools.Prerequisites
- Active account in AI Symphony.
- An API key and/or JWT token.
- The company ID (
X-Enterprise-Id).
How to get your API key
1
Open AI Symphony
Go to symphony.fcamara.com.br.
2
Click your username
In the bottom left corner.
3
Go to Settings
4
Access the Account (or Connections) tab
Under API Keys, depending on the version.
5
Create and copy the key
Click API Key and copy the generated key.
API endpoint
- Endpoint:
POST https://symphony.fcamara.com/api/chat/completions - Authentication:
Authorization: Bearer <token>(token obtained from Symphony).
Required headers
Request body structure (JSON)
Required fields
Recommended fields
Complete example
Success response (200 OK)
Python example
Authentication — getting tokens
JWT token
- Log in to the Symphony platform.
- The token is stored in
localStoragewith the keytoken. - Use it in all authenticated requests (
Authorization: Bearer <token>).
CSRF token
Required for POST/PUT/PATCH/DELETE. There are two ways:- Via endpoint (recommended)
- Via browser DevTools
If making requests via cURL/API, include the
Authorization and X-CSRF-Token headers and use --cookie/withCredentials: true to send cookies.Other useful endpoints
All require theAuthorization: Bearer <key> header.
Common errors
Error structure:
Streaming (Server-Sent Events)
For real-time responses, send"stream": true and read the body in chunks. Lines start with data: and the transmission ends in data: [DONE]; incremental content is in choices[0].delta.content.
Security best practices
Do
- Store the key in environment variables.
- Use HTTPS in all requests.
- Implement retry with exponential backoff and timeouts (~30s).
- Validate responses before processing.
Don't
- Don’t expose the key in source code, URLs, or query parameters.
- Don’t store the key in cookies or
localStorage. - Don’t share the key or reuse the same one in multiple environments.
Limits and quotas
- Rate limit: varies by plan (consult the administrator).
- Timeout: ~30 seconds per request.
- Maximum request size: 10 MB.
- Maximum response size: no fixed limit (depends on the model).
Frequently asked questions
Which model should I use in the model field?
Which model should I use in the model field?
One of the
id values returned by GET /api/models (e.g., azure.gpt-5-chat).I get 401 even with the correct key.
I get 401 even with the correct key.
Confirm the
Bearer prefix and, for POST methods, the X-CSRF-Token header.Do I need X-Enterprise-Id?
Do I need X-Enterprise-Id?
Yes — it identifies the company/tenant of the request.
Known limitations
- Access to each model depends on the account/company permissions.
- JWT/CSRF tokens expire; renew them when necessary.
- The model list changes according to administrator configuration — always check
GET /api/models.