Skip to main content
ModelOne

Quickstart

Send a first request

The base URL is https://modelone.app/api/v1. Key management is live. A completion that spends credits waits until inference is enabled. If it is off, the response is 403 with code disabled.

  1. 1

    Create an account

    Sign in with email or an optional Solana wallet. You do not need to own $ONE. An eligible account can receive $10 in AI credits once. Signing in does not guarantee that credit.

  2. 2

    Generate an API key

    Open API keys and create one key. It is shown once and starts with mdl_. A sign-in token is not an API key.

  3. 3

    Store the key on the server

    Put it in MODELONE_API_KEY. Keep it out of browser code, NEXT_PUBLIC_ variables, logs, and git.

  4. 4

    Select a model

    Call GET /api/v1/models and use an id from data. One OpenAI id is openai/gpt-4.1-mini. One Anthropic id is anthropic/claude-haiku-4.5.

  5. 5

    Send a text request

    POST /api/v1/chat/completions. The accepted fields are model, messages, max_tokens, and stream.

  6. 6

    Check usage and credits

    A successful completion includes modelone.settlement and the remaining available balance. Signed-in usage history is on the usage page.

Sign in and open API keys

Credits

An eligible account can receive $10 in AI credits once. Community rewards are issued when that programme is open. Credits are for inference on ModelOne, not cash. One request can reserve at most $0.50. Daily inference spend is capped at $2 UTC. Three requests can be in flight. The same balance pays for OpenAI and Anthropic models on the allowlist.

Examples

Run these on a server. Replace nothing in the snippets: the shell and the programs read MODELONE_API_KEY from the environment.

cURL, OpenAI

curl https://modelone.app/api/v1/chat/completions \
  -H "Authorization: Bearer $MODELONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-4.1-mini","messages":[{"role":"user","content":"Reply with one short sentence."}],"max_tokens":64,"stream":false}'

cURL, Anthropic

curl https://modelone.app/api/v1/chat/completions \
  -H "Authorization: Bearer $MODELONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/claude-haiku-4.5","messages":[{"role":"user","content":"Reply with one short sentence."}],"max_tokens":64,"stream":false}'

TypeScript

const key = process.env.MODELONE_API_KEY;
if (!key) throw new Error("MODELONE_API_KEY is missing");

const response = await fetch("https://modelone.app/api/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${key}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "model": "openai/gpt-4.1-mini",
  "messages": [
    {
      "role": "user",
      "content": "Reply with one short sentence."
    }
  ],
  "max_tokens": 64,
  "stream": false
}),
});

if (!response.ok) {
  throw new Error(`ModelOne request failed: ${response.status}`);
}

const completion = await response.json();
console.log(completion.choices[0]?.message?.content);

Python

import json
import os
import urllib.request

key = os.environ["MODELONE_API_KEY"]
body = json.dumps({
    "model": "openai/gpt-4.1-mini",
    "messages": [{"role": "user", "content": "Reply with one short sentence."}],
    "max_tokens": 64,
    "stream": False,
}).encode()
request = urllib.request.Request(
    "https://modelone.app/api/v1/chat/completions",
    data=body,
    headers={
        "Authorization": f"Bearer {key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
with urllib.request.urlopen(request) as response:
    completion = json.load(response)
print(completion["choices"][0]["message"]["content"])