Rescriptum
Browse docs

Docs / Models and cost

Bring your own providers

Connect any OpenAI-compatible endpoint and use its models alongside the rest.

You are not tied to one gateway. Rescriptum can talk to any provider that exposes an OpenAI-compatible API: a vendor you already pay, a company proxy, or a model running on your own machine.

What counts as compatible

The provider needs a chat endpoint at {base_url}/chat/completions, and ideally a model list at {base_url}/models. If the model list lives elsewhere you can set a separate Models URL.

Add a provider

  1. Open Settings, 01 · Models & Routing and find Other Providers.
  2. Pick a preset or Custom. Presets today are OpenCode Go and DeepSeek (direct).
  3. Enter an ID, the base URL, and the API key.
  4. Press Test. Rescriptum calls the model list and shows what the provider returned, or the exact HTTP error.
  5. Save. The provider's models are now in the picker as provider-id/model-name.

Prefixes keep names unambiguous. When a request goes out, the provider-id/ part is removed, so the provider receives its own model name.

Optional fields

FieldUse
Models URLWhere to list models if it is not {base_url}/models
Session headerA header name your provider uses for sticky sessions or cache keys
User agentOverride for providers that filter by client
EnabledTurn a provider off without deleting it

Local and self-hosted models

Loopback addresses such as http://localhost:11434/v1 are allowed. Use Custom with the base URL of Ollama, LM Studio, vLLM, or any local server that speaks the OpenAI API. A key is optional if the server does not check one.

Rules worth knowing

  • Reserved IDs. Names like openrouter, openai, anthropic, deepseek, meta, and mistralai cannot be used as your provider ID, because they collide with model prefixes. Choose something like work-proxy or my-llama.
  • No /models endpoint. The picker may show nothing for that provider. You can still type a full model ID such as my-proxy/model-name into the default model field.
  • First provider switches the default. If no model has been chosen and you save the first keyed provider, the default model moves to that provider's first model so the next prompt works.
  • Keys are never shown again. The UI only shows whether a key is set and a short preview. See Security and privacy for where it is stored.

Using providers with OpenRouter

The two coexist. With both configured, the picker merges both catalogs. With only custom providers, OpenRouter models are hidden. OpenRouter-specific features, such as provider routing strategies and the Pareto router, apply only to models served through OpenRouter.

Caching and cost on custom providers

Prompt caching depends on the provider. Rescriptum keeps the start of every prompt stable so a provider that supports prefix caching can use it. If your provider returns cached-token counts, they appear in the Usage panel. If it does not, cost shows as uncached.

Troubleshooting

  • 401 or 403 on test. Re-enter the key; check it belongs to this base URL.
  • 404 on test. The base URL likely needs /v1 on the end, or the models path differs. Set a Models URL.
  • Models load but chat fails. Some providers need a different model name than the one they list. Copy the ID exactly.
  • Timeouts. Local models may need more time on first load. Retry once the model is warm.

More in Troubleshooting.