Documentation
API Access openapi.json
The TrustedTokens API is OpenAI-compatible: point any OpenAI SDK or client at the base URL below using your account token. Streaming, tool calling, and structured outputs are supported.
Base URL
https://api.trustedtokens.eu/v1
Authentication
All requests require a valid Bearer token from your TrustedTokens account. Include it in the Authorization header.
Authorization: Bearer <your-trustedtokens-token>
Endpoints
| Method | Path | Description | Compatibility |
|---|---|---|---|
POST | /v1/chat/completions | Create a chat completion | OpenAI, |
POST | /v1/embeddings | Create embeddings | OpenAI, |
POST | /v1/systemone | Evaluate state with a decision model | Typesafe, |
POST | /v1/responses | Create a response | OpenAI, |
POST | /anthropic/v1/messages | Create a message | Anthropic, |
GET | /v1/models | List available models | OpenAI, Model schema, which extends the OpenAI model schema with pricing, architecture, and reasoning metadata. Each provider variant is listed as a separate entry with a provider/model id (for example tng/zai-org/GLM-5.3); send it directly as the model field in /v1/chat/completions to route to that provider. The default provider's entries use the bare model id (for example zai-org/GLM-5.3), which routes via the default provider. The OpenRouter links field is omitted.
|
The Compatibility column shows which API specification an endpoint follows. OpenAI means the request and response shapes match the OpenAI API. OpenRouter means the endpoint follows the OpenRouter API, which extends the OpenAI model schema with pricing, architecture, and reasoning metadata. Anthropic means the endpoint follows the Anthropic Messages API. Each model can be reached through the surfaces its capabilities support; embedding and decision models use /v1/embeddings and /v1/systemone respectively.
Code Examples
curl https://api.trustedtokens.eu/v1/chat/completions \
-H "Authorization: Bearer <your-trustedtokens-token>" \
-H "Content-Type: application/json" \
-d '{
"model": "zai-org/GLM-5.3",
"messages": [{"role": "user", "content": "Hello, TrustedTokens!"}]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.trustedtokens.eu/v1",
api_key="<your-trustedtokens-token>"
)
response = client.chat.completions.create(
model="zai-org/GLM-5.3",
messages=[
{"role": "user", "content": "Hello, TrustedTokens!"}
]
)
print(response.choices[0].message.content)const response = await fetch(
"https://api.trustedtokens.eu/v1/chat/completions",
{
method: "POST",
headers: {
"Authorization": "Bearer <your-trustedtokens-token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "zai-org/GLM-5.3",
messages: [{ role: "user", content: "Hello, TrustedTokens!" }]
})
}
);
const data = await response.json();
console.log(data.choices[0].message.content);Agent Config
Connect your agent of choice to TrustedTokens. Set TRUSTEDTOKENS_API_KEY in your shell profile (e.g. .bashrc or .zshrc), then paste the snippet below into the agent’s config file.