Skip to content
synthreo.ai

SDKs and Libraries

Client library guidance for the Builder API - there is no official Synthreo SDK yet; integrate directly against the REST API using the documented authentication and code examples.

There is no official Synthreo SDK yet. The Builder API is a standard HTTPS REST API secured with OAuth 2.0, so you can call it from any language using its regular HTTP client - no special library is required.

Everything you need is documented and verified:

  • Authentication - create an API key and exchange it for a Bearer access token with the OAuth 2.0 client_credentials grant.
  • Code Examples - complete, copy-pasteable client implementations in cURL, Python, Node.js, Java, and C# covering authentication, synchronous execution, async jobs with polling, and training.
  • Cognitive Diagrams API - the endpoints you will call to execute agents and manage jobs.
  • Webhooks - receiving run and agent lifecycle events on your own endpoint. Note that API jobs are not covered by webhooks and must be polled.
  • Best Practices - token caching, retries, rate limiting, and error handling patterns.

If you wrap the API in your own small client, cover these concerns (all shown in Code Examples and Best Practices):

  • Token lifecycle - access tokens live for 15 minutes and have no refresh token. Cache the token and re-exchange your API key when it is close to expiry (or on a 401).
  • Async jobs - for long-running work use POST /CognitiveDiagram/{id}/ExecuteAsJob and poll GET /job/{job_id}, branching on the HTTP status code (202 still running, 200 finished, 400 failed). See Cognitive Diagrams API.
  • Response parsing - read the outputData field and check errorData (see the parsing helper in Code Examples).
  • Resilience - retry transient failures with backoff and respect rate limits.

Related pages: