OpenJ / HTTP APIUse Reckoning from anywhere
Reckoning component / 03

Put a local model behind a familiar API.

The Reckoning HTTP API maps standard chat-completion requests onto the same engine used by Java callers, so applications and tools can use a running local model without embedding the runtime.

Send a chat request

Send messages to /chat/completions using the format familiar from OpenAI-compatible clients:

POST /chat/completions
Content-Type: application/json

{
  "model": "your-local-model",
  "messages": [
    {"role": "user", "content": "Explain this Java method."}
  ],
  "temperature": 0.2,
  "max_tokens": 200
}
>> returns a chat completion response, or a stream of response events

Let the model format the conversation

Your application sends messages, not a hand-built prompt. Reckoning uses the tokenizer and chat template for the selected model family to turn those messages into the format the model expects.

messages[]
  -> model chat template
  -> tokenizer
  -> generation loop
  -> chat completion

Llama, Gemma, Qwen, and other model families do not share one universal conversation format. The API keeps that difference inside the runtime.

Control the generation

Request-time parameters change how a response is generated without changing model weights or rebuilding the model:

  • temperature and top_p for sampling
  • max_tokens to limit the response
  • seed for repeatable runs
  • stop to stop at chosen sequences
  • logprobs and top_logprobs for token probabilities

Ask for a shape, not just text

Guided decoding fields let you constrain the generated result when an application needs a predictable format:

{
  "guided_regex": "TICKET-[0-9]{4}"
}
>> returns text matching TICKET-0000 through TICKET-9999
{
  "guided_json": {
    "type": "object",
    "properties": {
      "name": {"type": "string"},
      "age": {"type": "integer"}
    },
    "required": ["name", "age"],
    "additionalProperties": false
  }
}
>> returns a JSON object with exactly the requested fields

Watch long responses arrive

Streaming chat completions use server-sent events. Applications can display generated text as it arrives, and tool-call or reasoning deltas are exposed where the model and API support them.

Connect tools

Tool requests from the model are mapped into Reckoning prompt-tool objects and parsed back from model output by the appropriate model-family tool parser. This is the bridge between a local model and workflows such as Antares or Nanocode.

The point: use Java APIs when you want the engine inside your application; use the HTTP API when you want any compatible client or tool to talk to a local Reckoning server.