Use the DeepSeek API from your app without shipping the key

Guide · Full API reference

Shipping a provider key inside a mobile or frontend app means anyone can extract it from the binary. MyAppToken is a reverse proxy that keeps your DeepSeek key server-side: your app swaps the base URL, authenticates users with a short-lived JWT, and the proxy injects the key on the way to the provider. DeepSeek's API is OpenAI-compatible, so existing OpenAI client code works unchanged — including token-by-token (SSE) streaming and the deepseek-reasoner model.

1. Point a service at DeepSeek

In the dashboard, create an app and add a service:

deepseek  →  https://api.deepseek.com/v1

Paste your DeepSeek key into the service's token vault — it is stored encrypted, masked from then on, and rotatable without an app release.

2. Get a per-user JWT

JWT=$(curl -s -X POST https://api.myapptoken.com/api/v1/auth/simple \
  -H 'Content-Type: application/json' \
  -d '{"app_id": "<app-id>", "user_id": "user-123"}' | jq -r .access_token)

3. Call DeepSeek through the proxy

Auth injection: Authorization: Bearer <key> — DeepSeek uses the standard Bearer scheme, so it works through the proxy's default path with no provider-specific handling.

curl https://api.myapptoken.com/api/v1/proxy/<app-id>/deepseek/chat/completions \
  -H "Authorization: Bearer $JWT" \
  -H 'Content-Type: application/json' \
  -d '{"model": "deepseek-chat", "messages": [{"role": "user", "content": "Hello"}]}'

In app code the whole change is the base URL and the credential:

// Swift — before
let baseURL = "https://api.deepseek.com/v1"
let apiKey  = "<provider key shipped in the app>"

// after
let baseURL = "https://api.myapptoken.com/api/v1/proxy/<app-id>/deepseek"
let apiKey  = sessionJWT   // from /auth/simple, expires in 1 h

What you get on top

Start free — no credit card; the Free plan covers 10,000 requests a month. Full details in the docs.

Further reading