Evalban Forge

Evalban API

One API for AI that understands, remembers and asks before it acts. It speaks the same request format as OpenAI's chat API, and adds memory, approvals and logging on top.

Base URL https://api.evalban.com

Quick start

  1. Get your invite, then sign in to the Console and create an API key.
  2. Send your first request:
curl https://api.evalban.com/v1/chat \
  -H "Authorization: Bearer $EVALBAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Hello!"}]}'

Or in JavaScript (Node 18+):

const res = await fetch("https://api.evalban.com/v1/chat", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.EVALBAN_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ messages: [{ role: "user", content: "Hello!" }] }),
});
const data = await res.json();
console.log(data.choices[0].message.content);

Already use the OpenAI SDK? Point it at Evalban:

import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.EVALBAN_API_KEY, baseURL: "https://api.evalban.com/v1" });
const r = await client.chat.completions.create({ model: "evalban-fast", messages: [{ role: "user", content: "Hello!" }] });

Authentication

Send your API key in the Authorization header on every request:

Authorization: Bearer evb_live_...

Keep keys on your server. Never put them in a website, mobile app or public repository. If a key leaks, revoke it in the Console and create a new one.

Chat

POST/v1/chat

/v1/chat/completions works too, for OpenAI SDK compatibility.

Request body

FieldDescription
messagesRequired. Up to 50 messages, each { "role", "content" }. Roles: system, user, assistant, or tool (to report an action's result, with "name").
modelOptional. evalban-fast (default), evalban-smart, or openai/<model>. See Models.
memoryOptional. A memory id like "customer-42". See Memory.
actionsOptional. Actions the AI may request. See Actions & approvals.
max_tokensOptional. Length limit for the reply. Default 512, maximum 1024.
temperatureOptional. 0 to 2. Lower is more focused.
streamOptional. true sends the reply word by word. See Streaming.

Response

{
  "id": "chatcmpl_evb_...",
  "object": "chat.completion",
  "model": "evalban-fast",
  "choices": [{
    "index": 0,
    "message": { "role": "assistant", "content": "Hello! How can I help?" },
    "finish_reason": "stop"
  }],
  "usage": { "prompt_tokens": 41, "completion_tokens": 6, "total_tokens": 47 },
  "evalban": { "requests_used": 12, "requests_limit": 500, "requests_remaining": 488 }
}

finish_reason is stop, tool_calls (the AI wants to run an action that doesn't need approval), or approval_required (an action is waiting for a person).

Models

ModelBest forActions
evalban-fastQuick, low-cost answers. The default.No
evalban-smartHarder reasoning and anything with actions.Yes
openai/<model>Any OpenAI chat model, e.g. openai/gpt-4o-mini, billed to your own OpenAI account. Needs your OpenAI key.Yes
GET/v1/models

Streaming

Add "stream": true to show the reply as it's written, like a chat app. The response is a stream of server-sent events in the same format as OpenAI's streaming API, so existing OpenAI streaming code works unchanged.

curl -N https://api.evalban.com/v1/chat \
  -H "Authorization: Bearer $EVALBAN_API_KEY" -H "Content-Type: application/json" \
  -d '{"stream":true,"messages":[{"role":"user","content":"Write a short poem about forges"}]}'

Each event carries the next piece of text:

data: {"object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant","content":"Sparks"},"finish_reason":null}]}

data: {"object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" fly"},"finish_reason":null}]}

data: {"object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}],
       "usage":{...},"evalban":{"requests_used":13,"requests_limit":500,"requests_remaining":487}}

data: [DONE]

In JavaScript with the OpenAI SDK:

const stream = await client.chat.completions.create({
  model: "evalban-fast", stream: true,
  messages: [{ role: "user", content: "Hello!" }],
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content || "");

Streaming works with every model and with memory: the full reply is saved once the stream finishes. It doesn't support actions yet, so send those without stream. If something goes wrong mid-reply, you'll get an event with an error object before [DONE], and the request isn't counted.

Memory

Give a conversation a memory id and Evalban keeps track of it for you. Each request only needs the new message: Evalban adds the recent history (last 20 messages) and any saved facts automatically, and stores the new exchange.

curl https://api.evalban.com/v1/chat \
  -H "Authorization: Bearer $EVALBAN_API_KEY" -H "Content-Type: application/json" \
  -d '{"memory":"customer-42","messages":[{"role":"user","content":"My order number is 1187"}]}'

# Later, a new request with the same memory id:
  -d '{"memory":"customer-42","messages":[{"role":"user","content":"Where is my order?"}]}'

Memory ids use letters, numbers and . _ : - (up to 100 characters). Use one per end user, customer or conversation. System messages aren't stored, so send your instructions with each request. Each memory keeps its newest 50 messages.

Saved facts

Facts are always included, however old the conversation gets. Use them for things that shouldn't be forgotten.

POST/v1/memory/:id/facts
curl https://api.evalban.com/v1/memory/customer-42/facts \
  -H "Authorization: Bearer $EVALBAN_API_KEY" -H "Content-Type: application/json" \
  -d '{"fact":"Prefers to be contacted by email"}'
GET/v1/memory/:id

Returns the saved facts and recent messages.

DELETE/v1/memory/:id

Forgets everything in that memory, for example when a user asks you to delete their data.

Actions & approvals

Describe the actions your app can take. The AI decides when one is needed and fills in the details. Actions need a person's approval by default; set "requires_approval": false for safe ones like lookups. Use evalban-smart or an openai/ model.

{
  "model": "evalban-smart",
  "memory": "customer-42",
  "messages": [{ "role": "user", "content": "Please refund order 1187" }],
  "actions": [
    {
      "name": "refund_order",
      "description": "Refund a customer's order",
      "parameters": {
        "type": "object",
        "properties": { "order_id": { "type": "string" } },
        "required": ["order_id"]
      }
    },
    { "name": "lookup_order", "description": "Look up an order's status", "requires_approval": false,
      "parameters": { "type": "object", "properties": { "order_id": { "type": "string" } } } }
  ]
}

When approval is needed

The reply has finish_reason: "approval_required" and the pending approval:

"evalban": {
  "approvals": [
    { "id": "6f1c...", "action": "refund_order", "arguments": { "order_id": "1187" }, "status": "pending" }
  ]
}

Show it to the right person in your app. When they decide, record it:

POST/v1/approvals/:id/approve
POST/v1/approvals/:id/reject
curl -X POST https://api.evalban.com/v1/approvals/6f1c.../approve \
  -H "Authorization: Bearer $EVALBAN_API_KEY" -H "Content-Type: application/json" \
  -d '{"note":"Approved by Sam"}'

Then run the action in your own code, and tell the AI how it went with a tool message so it can reply to the user:

{ "memory": "customer-42", "model": "evalban-smart",
  "messages": [{ "role": "tool", "name": "refund_order", "content": "Refunded $42.00" }] }

Every decision is logged and shown in your Console. With a memory id, the decision is also added to the memory automatically. Each approval can be decided once.

GET/v1/approvals?status=pending
GET/v1/approvals/:id

Actions without approval

These come back as standard OpenAI-style tool_calls on the message, with finish_reason: "tool_calls". Run them and send the result as a tool message.

Your OpenAI key

Add your OpenAI key once in the Console. It's stored encrypted and never shown again. Then use any OpenAI chat model with the openai/ prefix:

{ "model": "openai/gpt-4o-mini", "messages": [{ "role": "user", "content": "Hello!" }] }

OpenAI bills you directly for these requests. Memory, actions, approvals and logs work the same as with Evalban models. Requests still count toward your monthly Evalban requests.

Local models (Ollama)

Run models on your own computer with Ollama, so they work offline and your prompts never leave the machine. The small evalban-local library adds Evalban memory and logging on top. Local requests show up in your Console and don't count toward your monthly limit.

  1. Install Ollama and download a model: ollama pull llama3.2
  2. Download evalban-local.mjs into your project (Node 18+, no dependencies).
  3. Use it:
import { EvalbanLocal } from "./evalban-local.mjs";

const ai = new EvalbanLocal({ apiKey: process.env.EVALBAN_API_KEY });

const r = await ai.chat({
  model: "llama3.2",
  memory: "customer-42",                         // optional, same memory as the cloud API
  messages: [{ role: "user", content: "Hello!" }],
  onToken: (text) => process.stdout.write(text), // optional, stream the reply
});
console.log(r.choices[0].message.content);

Offline? Chat keeps working. Logs and memory updates are kept and sent automatically the next time Evalban is reachable (or call ai.flush()). Without an API key it runs fully local and sends nothing.

If Ollama isn't running you'll get a clear error asking you to start it with ollama serve; a missing model tells you which ollama pull to run. Actions and approvals are cloud-only for now.

Logging a local request yourself? POST /v1/local/report with { "model": "llama3.2", "prompt_tokens": 20, "completion_tokens": 40, "latency_ms": 900 }. To add messages to a memory directly, POST /v1/memory/:id/messages with { "messages": [...] }.

Errors

Errors use standard HTTP status codes with a JSON body:

{ "error": { "code": "monthly_limit_reached", "message": "You've used all 500 free requests this month..." } }
StatusCodeWhat to do
400invalid_requestCheck the message: it says which field is wrong.
400provider_key_missing / provider_key_invalidAdd or update your OpenAI key in the Console.
401invalid_api_keyThe key is missing, wrong or revoked.
404approval_not_foundCheck the approval id.
409already_decidedThe approval was already approved or rejected.
429monthly_limit_reachedYour plan's requests are used up until the 1st (UTC). Upgrade to Pro in the Console for more.
429provider_rate_limitedYour OpenAI account is over its limit or quota.
502model_errorThe model didn't answer. Retry after a moment.

Limits

LimitValue
Free plan500 successful requests a month, reset on the 1st (UTC)
Pro plan10,000 successful requests a month ($25/month, upgrade in the Console)
Messages per request50, up to 32,000 characters in total
Reply lengthUp to 1,024 tokens (max_tokens)
Actions per request16
MemoryNewest 50 messages and up to 100 facts per memory id
API keys10 active keys per account
StreamingAvailable on all models; not with actions yet

Usage alerts

We email the account's address when you reach 80% and 100% of your monthly requests, at most once each per month, so you're never surprised by monthly_limit_reached. Local (Ollama) requests don't count.

Questions or need higher limits? Email hello@evalban.com.