tokenpatch usage

tokenpatch keeps your current coding app and routes safe implementation patches to a lower-cost executor. Use BYOK DeepSeek today; hosted executor credits are planned as a convenience path for users who cannot easily manage a DeepSeek key.

App mode

Use Codex, Cursor, or Claude Code as the strong model. Trigger daily work with tp: and let tokenpatch handle bounded execution.

tokenpatch bootstrap

MMDEV_EXECUTOR_PROVIDER=deepseek_byok
DEEPSEEK_API_KEY=your-deepseek-key
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_EXECUTOR_MODEL=deepseek-v4-pro

# In your coding app:
tp: add a button. Only modify index.html and script.js.

Gateway mode

Use tokenpatch.com credits only after you receive a private beta gateway token. The gateway alias maps to DeepSeek V4 Pro on the server.

tokenpatch bootstrap

MMDEV_EXECUTOR_PROVIDER=mmdev_gateway
MMDEV_GATEWAY_URL=https://api.tokenpatch.com
MMDEV_GATEWAY_TOKEN=tp_live_...
MMDEV_GATEWAY_EXECUTOR_MODEL=gateway-executor

Compatibility API

Use OpenAI-compatible chat completions only when another project cannot call the structured tokenpatch executor path.

curl https://api.tokenpatch.com/v1/chat/completions \
  -H "Authorization: Bearer tp_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "messages": [{"role": "user", "content": "Review this patch"}]
  }'

Workflow

Ask for a bounded change with allowed files, run tokenpatch, then inspect actual cost, baseline cost, and savings ratio in the report.

Patch boundary

tokenpatch rejects patches that touch files outside `allowed_files`. Recovery data is kept locally for debugging.

Metrics

Use tokenpatch metrics and tokenpatch report to inspect token usage, estimated savings, applied patches, and cost per applied patch.