Geoff exposes coding capability at three layers, each useful on its own or chained together:
  • Code modelspreview, duce, and magma all handle code. Pick the tier that matches your latency/quality budget.
  • Sandboxed execution — run generated code in an isolated environment and capture stdout, stderr, artifacts, and exit codes.
  • Agent tools — plug Geoff into OpenClaw, OpenCode, Claude Code, or Geoff Agent and let a model drive multi-step tasks against your repo or a fresh sandbox.

1. One-shot code generation

Use the chat endpoint for snippets, refactors, tests, or reviews.
curl --request POST \
  --url https://geoff.ai/api/v1/text/chat \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "magma",
    "messages": [
      {"role": "system", "content": "You are a senior engineer. Output only code."},
      {"role": "user", "content": "Write a TypeScript function that debounces any async function."}
    ]
  }'
See Text Chat and Streaming for full request/response shapes.

2. Execute code in a sandbox

Run untrusted or model-generated code without spinning up your own runtime. Python, JavaScript, TypeScript, Rust, Go, and shell are supported.
cURL
curl --request POST \
  --url https://geoff.ai/api/v1/code/execute \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "language": "python",
    "code": "print(sum(range(1_000_000)))"
  }'
For long-lived, multi-file workspaces use the sandbox endpoints: sandbox-create to provision, then sandbox-exec to run commands against the same filesystem.

3. Generate → execute → iterate

A minimal self-correcting loop: ask a model for code, run it, feed failures back.
Python
import requests

API = "https://geoff.ai/api/v1"
H = {"Authorization": "Bearer YOUR_API_KEY"}

def ask(history):
    r = requests.post(f"{API}/text/chat", headers=H, json={
        "model": "magma",
        "messages": history,
    })
    return r.json()["choices"][0]["message"]["content"]

def run(code):
    r = requests.post(f"{API}/code/execute", headers=H, json={
        "language": "python", "code": code, "timeout": 30,
    })
    return r.json()

history = [
    {"role": "system", "content": "Reply with a single Python code block, no prose."},
    {"role": "user", "content": "Write a script that prints the 10th Fibonacci number."},
]

for _ in range(3):
    code = ask(history).strip("` \n").removeprefix("python\n")
    result = run(code)
    if result.get("exit_code") == 0:
        print(result["stdout"])
        break
    history.append({"role": "assistant", "content": code})
    history.append({"role": "user", "content": f"Failed: {result.get('stderr')}. Fix it."})

4. Drive an agent against your repo

For real codebases, skip reinventing the harness. Point any of these agents at Geoff as the backend and let it plan, edit, and test:

Claude Code

Run Anthropic’s CLI agent against Geoff models.

OpenCode

Open-source coding agent that works with any OpenAI-compatible endpoint.

OpenClaw

Lightweight terminal agent for repo-scoped tasks.

Geoff Agent

First-party agent tuned for the Geoff stack.

Pick a model

ModelGood for
previewAutocomplete, quick scaffolds, linting explanations.
duceDay-to-day coding: feature work, tests, refactors.
magmaLong-context work — whole-repo edits, migrations.
Full capability matrix is in Models.