API overview
GM exposes several familiar HTTP interfaces through one gateway.
| Interface | Base URL | Primary endpoint |
|---|---|---|
| OpenAI-compatible | https://api.saygm.com/v1 |
/chat/completions, /responses |
| Anthropic-compatible | https://api.saygm.com |
/v1/messages |
| Gemini-compatible | https://api.saygm.com |
/v1beta/models/{model}:generateContent |
Model IDs are provider-free. The gateway uses the model catalog to choose the upstream route.
Supported surfaces
Section titled “Supported surfaces”- OpenAI Chat Completions, streaming and non-streaming.
- OpenAI Responses.
- Anthropic Messages, streaming and non-streaming.
- Gemini
generateContentandstreamGenerateContentwith SSE. - OpenAI-compatible model listing and retrieval at
/v1/models.
The generated API reference documents the OpenAPI-described request and response shapes. The compatibility guides explain SDK setup and surface-specific behavior.
Request lifecycle
Section titled “Request lifecycle”Requests enter a gateway running inside an Intel TDX trusted execution environment. The gateway validates the GM key, checks available prepaid credit, selects an eligible route, applies configured guardrails, forwards the request, and settles actual usage.
Versioning
Section titled “Versioning”The compatibility paths currently use the upstream interfaces’ versioned conventions. Avoid depending on undocumented fields. Additive GM metadata may appear on discovery responses.