BuildOverview

Build with the Syntic API

The Syntic API gives your own software access to the Amara models that power Syntic. You send a list of messages over HTTPS, and the API answers with the model’s reply, either all at once or as a stream of small pieces.

The request and response format follows the widely used chat completions shape, so most code written for OpenAI-compatible services works after you change two settings: the base URL and the key.

What you need

  • A Syntic account and an organization in the Syntic Console.
  • A private API key that starts with sk_live_. See Get an API key.
  • Any HTTP client. curl, Python and Node.js examples appear throughout these pages.

The API at a glance

Base URLhttps://app.syntic.ai/v1
EndpointPOST /chat/completions
AuthenticationAuthorization: Bearer <your key>
Request bodyJSON, up to about 2 MB and 500 messages
RepliesServer-sent events by default, or one JSON object with "stream": false
Rate limit600 requests per minute per key
Context window262,144 tokens
Machine-readable specGET https://app.syntic.ai/api/openapi

Chat completions is the only endpoint the API offers today. There is no endpoint for listing models, creating embeddings, uploading files or running batches yet. The Models overview lists the model names you can send.

What happens to a request

  1. Checks. The API verifies your key, the organization it belongs to and the rate limit, then validates the body.
  2. Model choice. It resolves the model you named. Today an unknown name, or a model your plan does not include, falls back to the default model, Amara S1.2. Not live yet — on develop: an unknown name stops here with 404 model_not_found, and a model your plan does not include with 403 model_not_in_plan; there is no fallback.
  3. Billing decision. It decides who pays: your plan allowance first, then usage credits if they are turned on. If neither can pay, the request stops here with 402.
  4. Generation. Your messages, with a short Syntic instruction added in front, go to the model. The reply streams back to you as it is written.
  5. Metering. The tokens read and written are recorded against your organization and shown in the Console under Usage & cost.

OpenAI-compatible clients

Works as you would expectBehaves differently on Syntic
messages with system, user, assistant and tool rolesstream defaults to true, not false
max_tokenstemperature, top_p, n and the penalty settings are ignored
tools and tool_choicecontent must be text; images and files are not accepted
Server-sent events ending in data: [DONE]Errors use one envelope with error.type, error.code, error.message, error.param and error.request_id
usage token countsNo response_format / JSON mode

OpenAI-compatible clients shows how to point common libraries at Syntic.

How a request is billed

Every successful request is first counted against your plan’s token allowance. When the allowance is used up, the request is paid from your organization’s prepaid usage credits, if you have turned them on. When neither is available the API refuses the request with 402 quota_exhausted. Each response says which one paid in its x-syntic-billing-source header. Billing & credits and Pricing explain the details.

Plan allowances and usage credits belong to the organization, not to an individual key. Every key in an organization draws from the same pool.

Where to go next

If you want toRead
Send a first request in a few minutesQuickstart
Create, restrict and revoke keysGet an API key
Understand roles, fields and repliesChat basics
Show the reply while it is being writtenStreaming
Let the model call your own functionsTool calling
Get better answers from the modelPrompting tips
Handle every error codeErrors
Look up exact request and response fieldsAPI reference
Was this page helpful?