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.
Integrate directly against the REST API
Section titled “Integrate directly against the REST API”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_credentialsgrant. - 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.
What a thin client should handle
Section titled “What a thin client should handle”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}/ExecuteAsJoband pollGET /job/{job_id}, branching on the HTTP status code (202still running,200finished,400failed). See Cognitive Diagrams API. - Response parsing - read the
outputDatafield and checkerrorData(see the parsing helper in Code Examples). - Resilience - retry transient failures with backoff and respect rate limits.
Related pages:
- Authentication - obtaining an access token
- Code Examples - ready-to-use client code in five languages
- Cognitive Diagrams API - the endpoints to call
- Webhooks - run and agent lifecycle events (not job completion, which is polled)
- Best Practices - production integration patterns

