What it is
This guide is for anyone who’s going to build something on top of Symphony: a script, a backend, an automation, an internal assistant, an agent that runs on its own. It assumes you know how to code but don’t have access to Symphony’s code. Everything here can be done with just your API key and an HTTP client. If you only want the quick steps to generate the key and make the first call, start with Connect via API and come back here when you’re building the real project.openai library (Python, Node, LangChain, LlamaIndex, Vercel AI SDK…), you change the URL and the key and the rest of the code stays the same. The difference is that you now use your company’s models, agents, and knowledge bases, with usage controlled by your organization.Prerequisites
- An active AI Symphony account.
- An API key (starts with
sk-). - Your company ID, for the
X-Enterprise-Idheader. - Any HTTP client (cURL,
requests,fetch, Postman) or an OpenAI-compatible library.
1. Setting up access
1.1 Generate your API key
Click your username
Open API keys
Generate and copy the key
sk-.1.2 Find your company ID
Symphony serves several companies, and each has its own catalog of models, agents, and knowledge bases. Since the API key doesn’t carry this information, you need to say which company you’re working in, with the header:1.3 The three headers you’ll always use
https://symphony.fcamara.com
2. Your first call
What else you can send
stop, others only accept the default temperature. When that happens, Symphony returns a message explaining exactly which parameter was the problem.3. Finding the models and agents you can use
Never guess themodel value. Identifiers are defined by your company and change from environment to environment.
- It’s already filtered to what your account can use. Disabled models, agents nobody shared with you, and models outside the company catalog simply don’t appear. If something is in your interface but not here, the problem is almost always
X-Enterprise-Id. - Agents appear alongside models. Every item with
info.base_model_idis an agent created on the platform. Using an agent is the API’s most powerful shortcut: the system prompt, knowledge bases, and tools configured in it are applied automatically, without you sending anything beyondmodel. - Copy the
idexactly as returned. Using the model name from the original provider (gemini-2.5-pro) instead of the Symphony identifier (FC.gemini-2.5-pro) is the most common cause of 404 errors.
4. Connecting your project with a ready-made library
Since the API is OpenAI-compatible, you don’t need to write an HTTP client by hand. Pointbase_url to https://symphony.fcamara.com/api: the library appends /chat/completions on its own.
In VS Code / JetBrains
If your “project” is coding with AI assistance in the editor, you don’t need code: see IDE Plugin.5. Project recipes
5.1 Use a company agent as your product’s engine
This is the most underrated recipe. Instead of keeping a giant prompt inside your code, create an agent in the Symphony interface, with a system prompt, knowledge base, and tools, and call it byid:
5.2 Assistant with conversation memory
The API is stateless by default: each call is independent. To keep context, send the history:5.3 Structured data extraction
When you need reliable JSON instead of text, useresponse_format:
5.4 Questions and answers about company documents (RAG)
Create the knowledge base in the interface (it’s simpler) and then use itsid in your calls. See section 7. Working with documents and knowledge bases.
5.5 Let the model call your system’s functions
The function calling pattern works the same as OpenAI’s: you describe the functions, the model returnstool_calls, your code executes them and returns the result as a message with the tool role.
tools in this recipe are functions of your system, which only your code knows how to run.5.6 Batch processing
To classify, summarize, or translate many items:- Limit concurrency. Start with 3 to 5 requests in parallel and increase slowly, watching for
429errors. - Save progress after each item, so you can resume where you left off.
- Retry only on the right errors (see section 9. Errors).
- Track usage at
GET /api/v1/consumption/me. A large batch can use up your monthly limit before it finishes.
6. Real-time responses (streaming)
With"stream": true, the response arrives in chunks as it’s generated. That’s what gives chat interfaces the “typing” feel.
data: {...} lines, ending with data: [DONE].
7. Working with documents and knowledge bases
7.1 Send a document along with the question
Upload the file
Wait for processing to finish
processing:Attach the file to the question
7.2 Use a knowledge base
Knowledge bases are for the opposite case: lots of content, of which only the relevant parts should go into each question. Create the base in the interface (Knowledge base), copy itsid, and use:
GET /api/v1/knowledge/list/compact (see the API reference).
If you use an agent that already has a base configured, you don’t need to send files: it brings the base along.
8. Keeping conversation history
By default nothing is saved: you send the history on each call and Symphony keeps nothing. If you want your project’s conversations to show up in the platform’s history (for auditing, so the user can continue the conversation in the interface, or just so you don’t have to manage history), create a chat and reuse thechat_id:
chat_id and only the user’s new question (no assistant role message in the array), Symphony retrieves the saved history and puts it before your message. In other words: you can keep a long conversation going by sending only the new question.
Two conditions for this to work:
- If your array already has an
assistantmessage, Symphony assumes you’re managing the history and injects nothing. - In a new conversation, with no saved response yet, there’s nothing to inject either.
9. Errors: how to interpret them and what to do
Error responses include a stable code in addition to the text. Depending on the endpoint, the code comes inerror.code or in detail.code:
What each status code means here
Codes you’ll see most often
Retry policy
- Retry on
429and5xx, with exponential backoff and a bit of randomness, respecting theRetry-Afterheader when present. - Never retry
400,401,402,403,404, and409. None of them resolves on its own, and insisting only burns your request quota.
10. Usage limits
There are three different limits, and mixing them up leads to pointless retries:1. Request limit (429 with Retry-After)
1. Request limit (429 with Retry-After)
X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset to guide you. Since the limit is per IP, several integrations leaving from the same network share the same quota. Wait and try again.2. Company quota (429, with quota_exceeded in the body)
2. Company quota (429, with quota_exceeded in the body)
3. Your usage limit (402)
3. Your usage limit (402)
402. Only an administrator raising your limit, or the start of the next month.11. Best practices
Do
- Store the key in an environment variable or secrets vault.
- Always use HTTPS.
- Ask the administrator for a dedicated technical account for each integration. This prevents regenerating your personal key from breaking the automation, and keeps the project’s usage separate from your individual usage in company reports.
- Set
X-Enterprise-Idthrough configuration, never inferred at runtime. - Call
GET /api/modelsonce at startup and check that the model you expect exists. Failing at startup is much better than failing in the middle of a batch. - Log the
request_idof every error response. - Measure usage before scaling volume.
Don't
- Don’t put the key in code that runs in the browser. It gives full access to your account, with no origin or scope restriction. If your project has a front end, the key stays in your backend, which makes the call.
- Don’t commit the key to a repository, or put it in a URL, log, or query parameter.
- Don’t retry requests that failed with a deterministic
4xxerror. - Don’t treat the file upload’s
200 OKas “ready to use”. - Don’t assume a model that works today will exist tomorrow: the catalog is managed by your company.
12. Frequently asked questions
Do I really need X-Enterprise-Id?
Do I really need X-Enterprise-Id?
Do I need a CSRF token?
Do I need a CSRF token?
Does my key expire?
Does my key expire?
Can I have more than one key, one per project?
Can I have more than one key, one per project?
Does the key have its own permissions?
Does the key have its own permissions?
Which model should I use?
Which model should I use?
id values returned by GET /api/models. If there’s a company agent for your use case, prefer the agent: it already comes with prompt, base, and tools set up.Can I use the AI libraries and frameworks I already know?
Can I use the AI libraries and frameworks I already know?
openai SDK, LangChain, LlamaIndex, Vercel AI SDK, Continue.dev, and the like.How do I know how much I'm spending?
How do I know how much I'm spending?
GET /api/v1/consumption/me. Full reports are available to the company administrator.Is there interactive documentation (Swagger)?
Is there interactive documentation (Swagger)?
I get 401 even with the key I just copied.
I get 401 even with the key I just copied.
Authorization: Bearer sk-..., with no quotes, no extra space, and the complete key. Also check that nobody generated a new key on the same account.The response ignores the file I attached.
The response ignores the file I attached.
GET /api/v1/files/{id} until the status is ready.13. Known limitations
- A single key per user, with no name, no scope of its own, and no rotation without interruption. Generating a new one breaks the previous one immediately.
- The key equals your entire account. There’s no service credential with reduced permissions.
- The request limit is per IP, not per key. Integrations leaving from the same IP share the quota.
- There’s no completion notification (webhook) for API consumers: integration is synchronous or by streaming.
- There’s no official Symphony library. Use an OpenAI-compatible one.
- There’s no Swagger in production.
- The model catalog is managed by your company and can change without notice for integrators.
- Some features depend on permissions (web search, image generation, code interpreter) and may be turned off for your account.
14. Checklist before going to production
- Key in an environment variable or vault, never in code or the front end
- Ideally, a dedicated technical account for this integration
-
X-Enterprise-Idcoming from configuration, present on every call - Model validated at startup with
GET /api/models - Error handling by
code(inerror.codeordetail.code), not by text - Retry with backoff only on
429and5xx -
request_idrecorded in your error logs - Client timeout compatible with long responses
- If streaming:
[DONE], split events, and errors after the200handled - If using files: wait for
readystatus before attaching - If the conversation is long: a defined strategy so history doesn’t overflow the window
- Usage monitored at
GET /api/v1/consumption/me
Related documents
- Connect via API: quickstart
- API reference: all available endpoints, with parameters and responses
- Errors and limits: full catalog of error codes and usage limits
- Environments and support: production, staging, and how to get help
- IDE Plugin: AI in your editor, without writing an integration
- Agents: create the agent your project will call
- Knowledge base: prepare documents for RAG
- Tools: tools run by the platform
- Account settings: where your API key lives