Skip to content
Enterprise Trust Center Security Request Security Materials

Build with ThreadSync

Developer Hub

Three API surfaces. One developer experience. Governed AI access, governed execution, and enterprise integration — all with controls mapped to SOC 2 TSC.

Frontier
LLM Models Available
5
AI Providers Unified
Multi-system
Enterprise Connectors
1
Unified API Surface

Three Developer Paths

Choose the API surface that fits your use case — or combine all three for a complete AI-powered integration stack.

Flagship

LLM Gateway API

Unified /v1/chat/completions endpoint across five provider ecosystems. Policy-based routing, manual model pinning, per-request cost tracking, and browser-safe PKCE auth. Allowed providers and models are configured per engagement.

Explore LLM Gateway
Runtime

Magic Runtime

Contract-driven controller deployment with input/output schemas, hot-reload, sandboxed execution, and full observability via Prometheus metrics, JSON logs, and tracing.

Explore Magic Runtime
Integration

ThreadSync Core API

REST API with OAuth 2.0 / API key auth, versioned endpoints, unified data models, and connectors across enterprise systems. Available by engagement; webhook push is on the roadmap.

Explore Core API

LLM Gateway API

One endpoint. Five provider ecosystems (Anthropic, OpenAI, Google, xAI, Perplexity). Governed AI access for every team.

Unified Completions Endpoint

Single /v1/chat/completions endpoint compatible with the OpenAI SDK format. Drop-in replacement for any existing integration.

Policy-based routing or model pinning

Use policy-based routing across providers, or pin a specific model like claude-sonnet-4-20250514 or gpt-4o. Model names are examples; allowed providers and models are configured per engagement.

Five provider ecosystems

Anthropic, OpenAI, Google, xAI, and Perplexity — all through one authenticated endpoint with unified response schemas.

Browser-Safe PKCE Auth

OAuth 2.0 PKCE flow for frontend apps. No secrets in the browser. Secure token exchange with automatic refresh.

Idempotent Requests

Send an Idempotency-Key header to safely retry requests. Conversation memory stores thread context across calls.

Per-Request Cost Tracking

Every response includes token counts and cost breakdowns. Aggregate by user, team, or project for budget governance.

Quick Start: Chat Completion

Language
# Send a chat completion through LLM Gateway
curl -X POST https://llmgateway.threadsync.io/v1/chat/completions \
  -H "Authorization: Bearer YOUR_GATEWAY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Explain API gateways in one paragraph."}
    ],
    "max_tokens": 256
  }'

# Response includes token usage and cost breakdown:
# {
#   "id": "chatcmpl-abc123",
#   "model": "claude-sonnet-4-20250514",
#   "choices": [{ "message": { "content": "..." } }],
#   "usage": { "prompt_tokens": 24, "completion_tokens": 128,
#              "cost_usd": 0.00082 }
# }
Full LLM Gateway Docs

Magic Runtime

Deploy AI-generated controllers with enterprise-grade safety. Default-deny security, contract-driven execution, and full observability — built for production.

Controller Contracts

Every controller declares its inputs, outputs, capabilities, and resource limits. The contract is the single source of truth — no surprises in production.

CLI Scaffolding

Bootstrap new controllers in seconds. magic scaffold --name my-agent generates contract, handler, tests, and Dockerfile.

Hot-Reload Deployment

Ship new controllers without restarts. Validate, deploy, and execute — all through the CLI or API. Zero-downtime updates by default.

Default-Deny Security

HTTP egress, database access, and secrets are blocked unless explicitly declared and scoped per-controller. Sandboxed execution with syscall restrictions.

Prometheus + JSON Logs

Structured JSON logs, Prometheus metrics, and distributed tracing out of the box. Every request traced by request_id.

AI-Native Workflow

LLM context packs and scaffolding so AI assistants generate conformant controllers. Built for the AI-first development loop.

Example: Controller Contract

Format
// contract.json — declares what the controller can do
{
  "name": "sentiment-analyzer",
  "version": "1.0.0",
  "input_schema": {
    "type": "object",
    "properties": {
      "text": { "type": "string", "maxLength": 5000 }
    },
    "required": ["text"]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "sentiment": { "type": "string", "enum": ["positive", "negative", "neutral"] },
      "confidence": { "type": "number", "minimum": 0, "maximum": 1 }
    }
  },
  "capabilities": ["llm:chat"],
  "limits": {
    "timeout_ms": 10000,
    "memory_mb": 256
  }
}
Magic Runtime Quick Start Full Magic Runtime Docs

ThreadSync Core API

Enterprise data integration, available by engagement.

Availability: The Core API is provisioned per engagement in your environment. There is no public self-serve sandbox. The examples on this page show the shape of the API; your host, credentials, connectors and limits are set during onboarding. Request Core API access.

Enterprise Integrations

Connect systems such as Salesforce, SAP, or Workday through one API, with connectors configured per engagement.

Sync Status Polling

Poll sync status via REST. Webhook push delivery is on the roadmap.

Enterprise Security

Controls mapped to SOC 2 Trust Service Criteria, RBAC, and encryption posture documented for procurement review.

Version Control

Versioned endpoints. Deprecation terms are defined per contract.

Built-in Observability

Tracing, metrics, and logs for API activity.

Developer Support

Support channels and response times are defined per engagement.

Authentication

Three ways to authenticate with the ThreadSync Core API.

Engagement API Key

Issued for your environment during onboarding. Use it directly as a Bearer token.

Authorization: Bearer YOUR_API_KEY

Client Credentials

For production service-to-service. Exchange client_id + client_secret via POST /v1/auth/token for a short-lived JWT.

Authorization: Bearer eyJhbG...

Provider OAuth ROADMAP

For connecting Salesforce, SAP, Workday, etc. ThreadSync handles the OAuth flow — you provide the callback URL.

POST /v1/connections/oauth/start

The THREADSYNC_API_TOKEN environment variable used in SDK examples accepts either an API key or a client credentials JWT.

Core API Quick Start Guide

The shape of a first integration. Hosts and credentials are issued per engagement.

Language REST API by engagement.
SDKs in preview on GitHub.
# 1. Authenticate and get your token
curl -X POST https://YOUR_CORE_API_HOST/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{"client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_SECRET"}'

# 2. Connect to Salesforce (source)
curl -X POST https://YOUR_CORE_API_HOST/v1/connections \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"provider": "salesforce"}'

# 3. Connect to Snowflake (destination)
curl -X POST https://YOUR_CORE_API_HOST/v1/connections \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"provider": "snowflake"}'

# 4. Sync contacts to your data warehouse
# Use the connection IDs returned from steps 2 and 3
curl -X POST https://YOUR_CORE_API_HOST/v1/syncs \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "source": {"connection": "SF_CONNECTION_ID", "object": "Contact"},
    "destination": {"connection": "SNOWFLAKE_CONNECTION_ID", "table": "contacts"},
    "schedule": "realtime"
  }'

Enterprise Connectors

Integrations for the systems you already use. The connector set is confirmed per engagement.

Salesforce
SAP
Workday
HubSpot
Snowflake
AWS
Dynamics 365
Google Cloud
PG PostgreSQL
Tableau
Slack
and more

Core API Reference

RESTful API with predictable resource-oriented URLs and standard HTTP response codes.

Authentication

POST /v1/auth/token

Exchange client credentials for a short-lived JWT. Send client_id and client_secret in the request body. No authentication header required.

Health

GET /health

Health check endpoint. Returns API status, version, and environment. No authentication required.

Connections

POST /v1/connections

Create a new connection to an external system. Only provider is required; name is optional.

GET /v1/connections

List all connections with health status and last sync timestamps.

GET /v1/connections/:id

Get a single connection by ID, including provider, status, and timestamps.

DELETE /v1/connections/:id

Safely remove a connection. Associated syncs are paused automatically.

Syncs

POST /v1/syncs

Create a sync job between source and destination. Supports real-time, scheduled, or manual triggers.

GET /v1/syncs

List all sync jobs with current status, schedule, and record counts.

GET /v1/syncs/:id

Get sync details including status, records processed, errors, and throughput metrics.

POST /v1/syncs/:id/trigger

Manually trigger a sync job. Useful for testing or on-demand refreshes.

Webhooks ROADMAP

POST /v1/webhooks

Subscribe to events like sync.completed, connection.failed, or data.changed.

GET /v1/webhooks/:id/deliveries

View webhook delivery history with payloads and response codes for debugging.

Official SDKs

Open source SDKs for every major language. All v0.1.0 preview — install from GitHub. Contributions welcome.

Architecture & Security for Developers

How the APIs connect, and the security model that protects every request.

How the APIs Connect

Core API
Data feeds
→
Wallace
Observes & decides
→
LLM Gateway
Enriches with AI
→
Magic Runtime
Executes safely

OAuth 2.0 + PKCE

Server-side client credentials for backend services. Browser-safe PKCE flow for frontend apps. No secrets exposed to the client.

API Key Scoping

Scope keys to specific endpoints, rate tiers, and environments. Rotate keys without downtime via dual-key support.

Audit Logging

API calls are logged with timestamp, identity, action, and resource. Export to your SIEM is configured per engagement.

Encryption in Transit

TLS 1.3 for data in transit where supported by tooling and client systems.

Security Overview Trust Center

Rate Limits & Tiers

Generous limits that scale with your needs. No surprise throttling.

Tier Requests/min Connections Active Syncs Support
Indicative tiers. Actual limits are set per engagement.
Starter 1,000 5 3 Email
Professional 10,000 25 25 Priority
Enterprise Unlimited Unlimited Unlimited Dedicated

Ready to Build?

Start with the API that fits your use case. Access is provisioned per engagement.

Explore LLM Gateway API Explore Magic Runtime Docs Request API Access Request Architecture Review

Questions? Email us at support@threadsync.io

*Availability commitments are defined per contract. See the SLA reference document.