Get started
Quickstart
The offmem API works with the OpenAI and Anthropic SDKs. Base URL: https://api.offmem.app/v1.
1. Create an API key
- Create an account at offmem.app. New accounts get R$1.00 in credits.
- Accept the terms of use in the console.
- Go to Console › API keys and create a key. It starts with
om_and is shown only once.
2. Save the key
Store the key in the OFFMEM_API_KEY environment variable.
echo 'export OFFMEM_API_KEY="om_..."' >> ~/.zshrc && source ~/.zshrc3. Make your first request
Install the OpenAI SDK, or use cURL.
pip install openaicurl https://api.offmem.app/v1/chat/completions \
-H "Authorization: Bearer $OFFMEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "offmem-glm-5.3-flash-abliterated",
"messages": [{"role": "user", "content": "Explain what an API is in one sentence."}]
}'Response
200 OK
{
"id": "...",
"object": "chat.completion",
"created": 1762560000,
"model": "offmem-glm-5.3-flash-abliterated",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 32,
"total_tokens": 50
}
}The
usage tokens are what you pay for. Prices per model are in Models.Next steps
- Authentication and URLs: OpenAI and Anthropic formats, key options.
- Chat completions: parameters, streaming and images.
- Coding agents: Claude Code, OpenCode, Cline and others.