Documentation Index
Fetch the complete documentation index at: https://docs.tokmodel.com/llms.txt
Use this file to discover all available pages before exploring further.
This guide walks you through everything you need to make your first API call with TokModel. You’ll create an account, generate an API key, and send a chat completions request — all in a few minutes. No new SDK or client library required.
Create your account
Go to https://tokmodel.com/register and sign up for a free account. Once you’ve confirmed your email, you’ll have access to the TokModel console. Get your API key
Open the TokModel console and navigate to API Keys. Click Create key, give it a name, and copy the key value. Store it somewhere safe — you won’t be able to view the full key again after closing the dialog.Your API key is a credential that grants access to your account’s credits. Do not share it or commit it to source control. Make your first API call
Send a chat completions request to https://tokmodel.com/v1/chat/completions. The request format is identical to the OpenAI chat completions API.Replace YOUR_API_KEY with the key you copied in the previous step.curl https://tokmodel.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "What is a large language model?"
}
]
}'
A successful response looks like this:{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1748000000,
"model": "gpt-4o-mini",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "A large language model (LLM) is a type of AI model trained on vast amounts of text data to understand and generate human language..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 64,
"total_tokens": 79
}
}
You can use any model available through TokModel by changing the model field. See the API reference for the full list of supported models and endpoints.