Goal
Let a DeepSeek Harness user route chat requests through RunAPI with their own base URL and API key, without a native provider plugin.
Claude visitors: new accounts receive $1.00 in bonus API credit within 30 days. One per person; usage credits only.
Add RunAPI as a Custom model API in dsh, point it at https://runapi.ai/v1 over OpenAI Chat Completions, and chat with gpt-5.4-nano from the Web UI or a headless run.
- id: llm-pi-ai
config:
providers:
runapi:
apiKeyEnv: RUNAPI_API_KEY
api: openai-completions
baseURL: https://runapi.ai/v1
models:
- id: gpt-5.4-nano
- id: agent-default-model
config:
provider: runapi
model: gpt-5.4-nano
export RUNAPI_API_KEY="runapi_xxx"
npx @deepseek-ai/[email protected] --version
npx @deepseek-ai/[email protected] headless --patch runapi.patch.yml "Reply with one short sentence."
npx @deepseek-ai/[email protected] web --patch runapi.patch.yml
Let a DeepSeek Harness user route chat requests through RunAPI with their own base URL and API key, without a native provider plugin.
One Custom model API provider named runapi, one model, gpt-5.4-nano, and one text message that returns a reply.
The configuration and commands were checked with @deepseek-ai/dsh 0.2.1-rc.2. Pin that version with npx until you have checked a newer release yourself.
dsh loading, request shape, replies, and error messages were checked against a local stub of the RunAPI endpoint. No paid upstream request was made for this page.
Set RUNAPI_API_KEY in the shell that starts dsh. The patch reads the key from the environment, so the key never lands in a file.
export RUNAPI_API_KEY="runapi_xxx"
Save runapi.patch.yml for --patch, or add the values in Settings → Models → Add model provider → Custom model API. The UI saves its own profile and key in credentials storage; --patch makes these fields read-only in Settings.
api: openai-completions
Run one headless task or open the Web UI with the patch. In the UI, select runapi/gpt-5.4-nano in the model picker before chatting. A reply in the terminal or chat means dsh reached RunAPI.
npx @deepseek-ai/[email protected] headless --patch runapi.patch.yml "Reply with one short sentence."
| Field | Value | Purpose |
|---|---|---|
| Provider ID | runapi |
Permanent ID that sessions, defaults, and the credential reference use. |
| Base URL | https://runapi.ai/v1 |
Sends requests to RunAPI's OpenAI-compatible endpoint. |
| API protocol | openai-completions |
OpenAI Chat Completions, which RunAPI serves at /v1/chat/completions. |
| Credential | RUNAPI_API_KEY |
Read from the environment with apiKeyEnv, or saved through the Models page. |
| Model | gpt-5.4-nano |
Low-cost synchronous text model in the RunAPI catalog. |
This synchronous request uses the same base URL, key, and model as the patch and caps the reply at 64 tokens. If it returns a message, a dsh failure is in the dsh configuration rather than the RunAPI account.
curl https://runapi.ai/v1/chat/completions \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-5.4-nano", "max_tokens": 64, "messages": [{"role": "user", "content": "Reply with one short sentence."}]}'
RUNAPI_API_KEY is not set in the shell that started dsh. Export it, or save the key on the Models page, and run the same command again.
Usually. The base URL must be exactly https://runapi.ai/v1; dsh appends /chat/completions itself. A connection error means the host could not be reached at all.
Verify the model ID against the RunAPI model catalog, for example gpt-5.4-nano, and check that agent-default-model uses the matching provider runapi and model ID.
No. dsh ships Custom model API support for OpenAI Chat Completions, and RunAPI serves that protocol, so the patch is enough for text chat.
Create or sign in to a RunAPI account, create an API key, and export it as RUNAPI_API_KEY before you start dsh.