Skip to content
中文

First Request

Before you start

A Praxis account. New accounts may include trial credit; the Console shows the actual amount. Top up first if the balance is not enough.

1. Create an API Key

Create a key under Console → API Keys. The name is required, validity defaults to 90 days, and you should copy the key right after creating it.

2. Make Your First Request

You need one address: https://api.deepraxis.com. Use the SDK you already have and point base_url at it.

The example model is deepseek-flash: cheap, fast and good in both Chinese and English.

终端窗口
curl https://api.deepraxis.com/openai/v1/chat/completions \
-H "Authorization: Bearer $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "deepseek-flash", "messages": [{"role": "user", "content": "Hello"}]}'

Prefer your own language:

Python

import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.deepraxis.com/openai/v1",
api_key=os.environ["PRAXIS_API_KEY"],
)
completion = client.chat.completions.create(
model="deepseek-flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(completion.choices[0].message.content)

Node

import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.deepraxis.com/openai/v1",
apiKey: process.env.PRAXIS_API_KEY,
});
const res = await client.chat.completions.create({
model: "deepseek-flash",
messages: [{ role: "user", content: "Hello" }],
});
console.log(res.choices[0].message.content);

3. Read the Response

choices[0].message.content is the reply text. usage holds the token counts, and its cost field states the cost of this call.

Then open Console → Usage: the call you just made is already recorded there.

Next Steps