GETTING STARTED

Your first API call

Use cURL, Python or Node.js to make a Chat Completions request once DeepSeekSub.com API access is available. The endpoint, model ID and key issuance are not yet verified.

On this pageGet your connection detailsSet environment variablesSend a requestRead the responseKeep building
Connection details · Use your provider’s key, base URL and model ID. DS-sub account and API access are not connected yet.

Get your connection details#

Keep these three values from the same provider. A subscription key cannot automatically be used with the official DeepSeek endpoint.

SettingWhat to use
API keyA key issued by your API provider
Base URLThe provider's OpenAI-compatible API base, including any required version prefix
ModelThe exact model ID enabled for your account

DeepSeekSub.com payment and API access are being integrated. Its base URL, supported model ID and API-key issuance are not yet published; no request below has been verified against its production service. The table and examples are illustrative, not a working DeepSeekSub.com connection. Replace placeholders only after the service provides confirmed values.

Set environment variables#

macOS / Linux

Set these in the terminal where you will run your code. Include a version prefix such as /v1 only if your provider requires it; omit the final slash.

sh
export CODING_PLAN_API_KEY="your-api-key"
export CODING_PLAN_BASE_URL="https://your-provider.example/v1"
export CODING_PLAN_MODEL="your-model-id"

Windows PowerShell

powershell
$env:CODING_PLAN_API_KEY = "your-api-key"
$env:CODING_PLAN_BASE_URL = "https://your-provider.example/v1"
$env:CODING_PLAN_MODEL = "your-model-id"

Environment variables apply to the current terminal session. Run the Python or Node.js example below in that same terminal on either platform. The cURL example uses macOS / Linux shell syntax.

Send a request#

Choose a language. Python requires python -m pip install openai; Node.js requires npm install openai and an .mjs file. These examples send one short request, which may consume allowance.

sh
curl --fail-with-body "$CODING_PLAN_BASE_URL/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $CODING_PLAN_API_KEY" \
  -d "{\"model\":\"$CODING_PLAN_MODEL\",\"messages\":[{\"role\":\"user\",\"content\":\"Say hello in one sentence.\"}],\"stream\":false}"
python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["CODING_PLAN_API_KEY"],
    base_url=os.environ["CODING_PLAN_BASE_URL"],
)
response = client.chat.completions.create(
    model=os.environ["CODING_PLAN_MODEL"],
    messages=[{"role": "user", "content": "Say hello in one sentence."}],
    stream=False,
)
print(response.choices[0].message.content)
javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.CODING_PLAN_API_KEY,
  baseURL: process.env.CODING_PLAN_BASE_URL,
});
const response = await client.chat.completions.create({
  model: process.env.CODING_PLAN_MODEL,
  messages: [{ role: "user", content: "Say hello in one sentence." }],
  stream: false,
});
console.log(response.choices[0].message.content);

Read the response#

The assistant's answer is in choices[0].message.content. Below is an illustrative excerpt; actual text and token counts vary.

json
{
  "choices": [{
    "message": { "role": "assistant", "content": "Hello! How can I help?" },
    "finish_reason": "stop"
  }],
  "usage": { "prompt_tokens": 12, "completion_tokens": 8, "total_tokens": 20 }
}

When service is available, check the returned usage fields and your account ledger against the applicable billing rules; DeepSeekSub.com metering and quota behavior are not yet verified. Streaming and tool calls also require separate service tests.

If the request fails, use the HTTP status and response message with the error guide. Check the endpoint path before changing your key.

Keep building#

Official provider keys and connection settings belong to the official service. See models and API compatibility for the distinction.

Guide updated November 6, 2026 · All tutorials