← All integrations
Terminal coding agentOpenAI Chat CompletionsExperimental

Use DeepSeek V4 with Pi

Add DeepSeek-V4.io to Pi as an OpenAI Completions-compatible custom provider.

DeepSeek-V4.io is an independent API gateway, not the official DeepSeek website. A paid DeepSeek-V4.io key is required.

How the integration works

Pi reads custom model providers from ~/.pi/agent/models.json. Register the DeepSeek-V4.io base URL and model metadata, then select the provider/model pair inside Pi.

One site key

Create and manage it on /developer.

OpenAI Chat Completions

The client talks to its native compatible endpoint.

Upstream hidden

Provider credentials and routing stay on the server.

Before you start

  • Pi coding agent installed
  • A paid DeepSeek-V4.io account with an API key from /developer
  • Access to ~/.pi/agent/models.json

Configure Pi

1.Configure ~/.pi/agent/models.json
{
  "providers": {
    "deepseek-v4-io": {
      "baseUrl": "https://deepseek-v4.io/api/v1",
      "apiKey": "$DEEPSEEK_V4_API_KEY",
      "api": "openai-completions",
      "models": [
        {
          "id": "deepseek-v4-flash",
          "name": "DeepSeek V4 Flash",
          "reasoning": true,
          "input": ["text"],
          "contextWindow": 1048576,
          "maxTokens": 65536
        }
      ]
    }
  }
}
2.Set the key and start Pi
export DEEPSEEK_V4_API_KEY="your-deepseek-v4-io-key"
pi

Verify the setup

The page remains Experimental until these checks pass against the public DeepSeek-V4.io gateway.

  1. 1Select deepseek-v4-io/deepseek-v4-flash.
  2. 2Ask Pi to inspect a local file through its tool interface.
  3. 3Confirm streaming, the tool result, and the final answer complete.

Troubleshooting

Pi cannot read the provider

Validate ~/.pi/agent/models.json and confirm the top-level providers object is present.

API key is missing

Export DEEPSEEK_V4_API_KEY before starting Pi; the $VARIABLE reference is resolved from that environment.

Tool loop stops early

Confirm api is openai-completions and start a new session after changing model metadata.

Sources and support boundary

Configuration fields are checked against the tool publisher's documentation. DeepSeek-V4.io owns this gateway guide and support for its endpoint; it does not represent the tool publisher.

Pi custom models documentation

Ready to connect Pi?

Create a DeepSeek-V4.io API key, copy the configuration above, and verify one read-only tool call before using it on a real project.

Open Developer Dashboard