ZalmirBeta

Quickstart

Zalmir is one OpenAI-compatible API for many models. Point any OpenAI client at the Zalmir base URL and use your Zalmir key.

1. Create an account

Sign in at Account. The Beta is open to everyone, and a new account starts with a $0 balance. Before your first paid request, complete the account check on the same page: country of residence, full legal name, and confirmation that you are 18 or older.

2. Add credits or your own provider key

Paid requests use prepaid credits in USDC on Solana, sent from a wallet you link. Credits are non-refundable. Deposits are not open for real money yet. To use a provider account you already have, save its key under Your provider keys; Zalmir charges $0 for those calls. More in Credits, pricing and limits and Your own provider keys.

3. Create an API key

Create a zmk_ key under API keys. It is shown once, so store it in a secret manager. One key and one balance cover every model.

4. Make your first request

The base URL is https://<gateway host supplied by Zalmir>/v1. In the examples, $BASE_URL is that URL and $API_KEY is your key. zalmir/auto picks the lowest-priced eligible model; any ID from /v1/models works too.

curl "$BASE_URL/chat/completions" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zalmir/auto",
    "messages": [
      { "role": "user", "content": "Summarize the project task." }
    ]
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://<gateway host supplied by Zalmir>/v1",
    api_key=os.environ["API_KEY"],
)

completion = client.chat.completions.create(
    model="zalmir/auto",
    messages=[{"role": "user", "content": "Summarize the project task."}],
)
print(completion.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://<gateway host supplied by Zalmir>/v1",
  apiKey: process.env.API_KEY,
});

const completion = await client.chat.completions.create({
  model: "zalmir/auto",
  messages: [{ role: "user", content: "Summarize the project task." }],
});
console.log(completion.choices[0].message.content);

Build a request

curl "$BASE_URL/chat/completions" \
  -H "Authorization: Bearer $ZALMIR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "~zalmir/chat",
  "max_tokens": 300,
  "messages": [
    {
      "role": "user",
      "content": "Explain zero-knowledge proofs in one paragraph."
    }
  ]
}'
Get a key

5. Stream the answer

"stream": true sends chat.completion.chunk events, then data: [DONE]. Zalmir verifies the whole answer first, so the first chunk arrives when the answer is complete.

curl "$BASE_URL/chat/completions" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zalmir/auto",
    "messages": [{ "role": "user", "content": "Count to five" }],
    "stream": true
  }'
data: {"id":"chatcmpl-…","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant","content":"1, 2, 3, 4, 5"}}]}

data: {"id":"chatcmpl-…","object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

data: [DONE]

Models

Models your key can use now:

curl "$BASE_URL/models" \
  -H "Authorization: Bearer $API_KEY"

The public catalog needs no key and adds verification data.

curl https://zalmir.ai/api/models?sort=score&verdict=faithful

sort (score | newest | name), provider, verdict, q, limit, offset. Every endpoint is in the API reference.

Privacy

Who receives your requests? For independent-seller endpoints: Seller can see prompts. The independent seller receives your request content to run inference; this is not guaranteed seller-blind inference.

Listed providers, including providers used with your own API key (BYOK), have their own API/inference data policies. Review the dated provider summaries and primary policy links before sending content. Provider policies