Skip to content

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

  1. Create an account at offmem.app. New accounts get R$1.00 in credits.
  2. Accept the terms of use in the console.
  3. 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 ~/.zshrc

3. Make your first request

Install the OpenAI SDK, or use cURL.

pip install openai
curl 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