Disclosure: I build ElderAI, the service used in this tutorial. Drafted with AI help and checked by me.
Coding agents run in loops. Loops retry. On a pay-as-you-go API that can quietly turn into a surprise bill overnight. The fix I wanted was boring: a hard cap at the API gateway. When the credits are gone, requests stop with a clear error. No overage.
This post shows how to point Codex CLI, Cline and Aider at an OpenAI-compatible endpoint that works that way (ElderAI's atlas-code-1-preview). The same steps work for any OpenAI-compatible API; just swap the base URL and model id.
1. Get a key
Sign up at elderai.cloud and verify your email. New accounts get 200 free credits, no card. Export the key:
export ATLAS_API_KEY=elk_... 2. Smoke test with curl
curl https://elderai.cloud/v1/chat/completions \ -H "Authorization: Bearer $ATLAS_API_KEY" -H "Content-Type: application/json" \ -d '{"model":"atlas-code-1-preview","messages":[{"role":"user","content":"Write a pytest test for a function add(a, b)."}]}' If the GPU was idle, the first request can take about a minute while it wakes up. Raise client timeouts (300 s is safe).
3. Codex CLI
Codex talks the Responses API, which the endpoint supports. In ~/.codex/config.toml:
model_provider = "atlas" model = "atlas-code-1-preview" [model_providers.atlas] name = "ElderAI" base_url = "https://elderai.cloud/v1" env_key = "ATLAS_API_KEY" wire_api = "responses" Without the top-level model_provider line, Codex ignores the provider block and calls its default endpoint, which is the most common setup mistake.
4. Cline
Settings → API Provider: OpenAI Compatible
- Base URL:
https://elderai.cloud/v1 - API key: your key
- Model ID:
atlas-code-1-preview - Context window: 24576, max output: 8192, images off
5. Aider
export OPENAI_API_BASE=https://elderai.cloud/v1 export OPENAI_API_KEY=$ATLAS_API_KEY aider --model openai/atlas-code-1-preview --timeout 300 --no-show-release-notes 6. What to use it for (honestly)
It's a small (8B) preview model. In my own tests it's useful for tests, boilerplate, renames and small refactors. It is not the model for multi-file architecture changes, and it does make mistakes, so run your tests. Good pattern: route the cheap, repetitive agent steps to a capped small model and keep a bigger model for the hard calls.
7. Pricing
200 free credits on signup. Developer plan is $29/month for 2,000 credits with a hard cap. No overage billing, and we don't train on your code.
I'd love to hear where it breaks for you in the comments.
