DeepSeek from Raw HTTP

SDK examples · All languages and providers · API reference

Plain HTTP with curl. Use it to test the setup, or as the reference for any language without an SDK. Your DeepSeek key stays on the server; the app holds only a token that expires in one hour.

1. Set up the service

In the dashboard, create an app, add a service and store your DeepSeek key in it:

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

2. Get a token for the user

The app asks MyAppToken for a token with its app ID and your identifier for the user. The token lasts one hour; rate limits and analytics are tied to that user.

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"}'
# {"access_token": "eyJ…", "expires_in": 3600, …}

# Renew before it expires (needs the current, still-valid token):
curl -s -X POST https://api.myapptoken.com/api/v1/auth/refresh \
  -H "Authorization: Bearer $JWT"

With Firebase App Check enabled, also send the App Check header on proxy calls.

3. Call DeepSeek

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"}]}'

# Before: https://api.deepseek.com/v1/chat/completions with "Authorization: Bearer sk-…"

What changed

Direct to the providerThrough MyAppToken
Base URLhttps://api.deepseek.com/v1https://api.myapptoken.com/api/v1/proxy/<app-id>/deepseek
Credentialprovider key (sk-…)the user's token from /auth/simple

More: DeepSeek guide · rate limits · async jobs.

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