$1 free credit · No card required

OVERVIEW  ›  QUICKSTART

Quickstart

Connect an OpenAI-compatible client, coding agent, or editor to Newton’s API. Every account starts with $1 free credit. No card required.

Use the API

Keep your key in an environment variable. List models first, then use an ID that is available to your account.

import os
from openai import OpenAI

client = OpenAI(
  base_url="https://newtons.dev/api/v1",
  api_key=os.environ["NEWTONS_API_KEY"],
)

models = client.models.list().data
if not models: raise RuntimeError("No models published.")
response = client.chat.completions.create(
  model=models[0].id,
  messages=[{"role":"user","content":"Reply: connected"}],
  max_tokens=32,
)

Or with curl:

curl https://newtons.dev/api/v1/chat/completions \
  -H "Authorization: Bearer $NEWTONS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_MODEL_ID",
    "messages": [{"role": "user", "content": "Reply: connected"}],
    "max_tokens": 32
  }'
Need a key to run these?

Setup takes about 30 seconds and includes $1 free credit.

Generate Free API Key →

Instant Edge Gateway Ping Test

Benchmark real-time TTFT and TLS handshake to your nearest Cloudflare edge node.

Focused endpoints.

All API routes require Authorization: Bearer $NEWTONS_API_KEY.

MethodPathPurpose
GET/modelsList model IDs currently available to the account.
GET/pricingRead current USD rates and price versions.
GET/balanceRead purchased, reserved, and available credits.
POST/chat/completionsCreate text-only non-streaming or streaming completions.
POST/messagesClaude-compatible messages endpoint for Claude Code and Anthropic gateway integrations.
POST/responsesCreate a Responses API request. Check Apps for each coding tool’s current support status.

Migrating from OpenRouter

Switching from OpenRouter takes 30 seconds. Replace your OPENAI_BASE_URL with https://newtons.dev/api/v1 and use your Newton’s key. Full architectural comparison: Newton’s vs OpenRouter latency & prompt caching breakdown →

SEAMLESS INTEGRATION SUITE

Plug into any editor or agent in 15 seconds.

Newton’s exposes a standard OpenAI-compatible gateway (`https://newtons.dev/api/v1`). One key connects your IDE, CLI, or custom pipeline with zero proprietary wrappers.

Cursor

Native IDE AI Assistant

Point Cursor's custom OpenAI endpoint directly to Newton's for high-speed, cost-controlled completions.

Connection Parameters

Base URL:https://newtons.dev/api/v1
API Key:sk-ant-api03-... (Your Newton’s Key)
Recommended Model:claude-sonnet-5-5

Setup Instructions

  1. Open Cursor Settings (Cmd + , on Mac or Ctrl + , on Windows).
  2. Navigate to Models, enable 'Override OpenAI Base URL', and paste https://newtons.dev/api/v1.
  3. Add your Newton’s API key into the OpenAI API Key input.
  4. Add 'claude-sonnet-5-5' or 'claude-sonnet-5' to your model list and start coding.
Settings > Models > OpenAI API Key & Override
// In Cursor Settings -> Models -> OpenAI API:
Base URL: https://newtons.dev/api/v1
API Key: <YOUR_NEWTONS_API_KEY>
Model: claude-sonnet-5-5

Codex and Claude Code

Both tools run on Newton’s live Claude routes today. Pick your tool for the exact setup — variables, model names, and what a session costs.

Live now — these routes serve production traffic.

All 9 Claude models are live through both guides. Credits are prepaid, every request gets an itemized receipt, and requests stop at $0 — you can’t overspend by accident.

Each guide explains what happens to your files and conversation, how costs work, and how to return to your usual subscription. Exact setup depends on your tool version and whether you use a terminal, editor, or desktop app.

All app support statuses

Claude Desktop — no terminal

The official Claude Desktop app can run on Newton’s instead of an Anthropic subscription. It uses the app’s built-in third-party inference mode — no terminal, no config files, no Anthropic account needed.

1. Get a Newton’s key

Create your account at /start — it opens with $1 in free credit — and copy your API key from the console.

2. Open the third-party inference settings

In Claude Desktop (version 1.2581.0 or later), enable Developer Mode, then open Developer → Configure Third-Party Inference…

3. Point it at Newton’s

Set the inference provider to Gateway and enter:

Gateway base URL: https://newtons.dev/api API key: your Newton's key Auth scheme: Bearer

Use the base URL exactly as shown — the app adds /v1/messages itself. Do not add /v1.

4. Apply and start a new chat

Click Apply Changes, then start a new chat and pick a model such as claude-sonnet-5-5. Chat, Cowork, and Code all run on your Newton’s balance, and every request appears in your console with an itemized receipt.

Good to know

Third-party mode is an official Claude Desktop feature for individuals. A few Anthropic-hosted extras (connectors labeled “Made by Anthropic”, built-in web search) stay unavailable in this mode; everything else runs on your prepaid balance, which stops at $0.

Request details and errors.

Each successful response includes its request ID, requested and resolved model, token usage, cost, and remaining credits. Response headers include applicable rate limits.

402

Insufficient balance

Not enough credits for this request. Add credits or lower the maximum output tokens. Add credits from your console or reduce the request’s maximum output tokens.

429

Rate or concurrency

Honor Retry-After, reduce parallelism, and use jittered bounded backoff.

502 / 503

Model unavailable

Check the current model list, then retry later if the model is still unavailable.