Endpoints
Available API endpoints, request fields and response format.
All endpoints live under https://www.tokenmoo.com/v1 and follow the OpenAI API shape.
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v1/chat/completions | POST | Chat and reasoning models |
/v1/embeddings | POST | Text embeddings |
/v1/images/generations | POST | Image generation |
/v1/audio/speech | POST | Text to speech |
/v1/audio/transcriptions | POST | Speech to text |
/v1/models | GET | List models available to your account |
Common request fields
| Field | Type | Description |
|---|---|---|
model | string | Model name, e.g. gpt-4o-mini, claude-3-5-sonnet |
messages | array | Conversation history; each item has role and content |
stream | boolean | Stream the response incrementally over SSE |
temperature | number | Sampling randomness, 0–2 |
max_tokens | integer | Upper bound on generated tokens |
top_p | number | Nucleus sampling threshold |
stop | string | array | Sequences that end the completion |
Response format
Chat completions return a choices array plus a usage block:
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "gpt-4o-mini",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Hello!" },
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 19, "completion_tokens": 9, "total_tokens": 28 }
}finish_reason is stop for a normal completion, length when max_tokens was reached, and content_filter when the upstream model refused the request.
Listing models
curl https://www.tokenmoo.com/v1/models \
-H "Authorization: Bearer sk-xxx"Use this list to discover the exact model names enabled for your account; prices are shown in the Model Square page.