Programmatic access to AI model evaluation services
Generate an API key from your TrustModel dashboard under Settings > API Keys.
Include your API key in the X-API-Key header:
X-API-Key: tm-{env}-{key_id}_{secret}
Your API key is bound to exactly one organization. Most SDK endpoints resolve it from the key automatically and need nothing extra, but a few surfaces — including the Agent Governance Platform's /api/v1/guardrails/* endpoints — require it explicitly via an X-Organization-ID header. Get it by calling /sdk/v1/ping/ with your API key:
curl /sdk/v1/ping/ -H "X-API-Key: YOUR_API_KEY"
# {"status": "ok", "message": "API key is valid", "organization_id": "..."}
Run an evaluation on a model:
curl -X POST /sdk/v1/evaluate/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_identifier": "gpt-4o",
"vendor_identifier": "openai"
}'
Get available model_identifier and vendor_identifier values from /sdk/v1/models/. Get configuration options (application types, categories, vendors) from /sdk/v1/config/.
Health check - validate your API key and get your organization_id
Get configuration options (application types, categories, vendors, defaults)
List available AI models for evaluation
Check your credit balance
List your saved evaluation templates
Create a new model evaluation
List your evaluations
Get evaluation details and scores
Check evaluation status
Get evaluation scores and HTML report
Test connection to a custom API endpoint
Create a batch evaluation job
List your batch jobs
Get batch job details
api_key_inactive - API key is disabled or expiredapi_key_credits_exhausted - API key credit limit reachedsubscription_credits_exhausted - Subscription quota exceededinsufficient_credits - Not enough credits for this operationvendor_not_custom_endpoint_capable - api_endpoint was supplied with a vendor_identifier that has no custom-endpoint vendorcustom_endpoint_requires_api_key - api_endpoint resolved to a custom vendor but no api_key was supplied; the platform has no key for your own endpointIf you're integrating an agent-builder studio (CodeNow, Zapier, Agentforce, ServiceNow Studio, ...) with TrustModel's Agent Governance Platform, the SDK above is not the right surface. Use the partner-integration contract instead — lifecycle webhooks, Edge install hooks, and the deep-link / badge embed.