Your first call in 30 seconds
Make sure you have an API key from the dashboard, then pick a language. The QSP-specific bits are just base_url and the key — everything else is standard OpenAI SDK.
1. Get an API key
Sign in at quicksilverpro.io/dashboard, then copy the key from the "Connect your agent" section.
Set it as the QSP_KEY environment variable so the snippets below work as-is:
export QSP_KEY="sk-..."2. Make the call
Python
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.quicksilverpro.io/v1",
api_key=os.environ["QSP_KEY"],
)
resp = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)Node.js / TypeScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.quicksilverpro.io/v1",
apiKey: process.env.QSP_KEY,
});
const resp = await client.chat.completions.create({
model: "deepseek-v4.1-flash",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);Turning reasoning off: the first call returns a visible answer with the model’s defaults. For direct chat without a reasoning trace, put the non-standard reasoning field in the Python SDK’s extra_body option.
resp = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[{"role": "user", "content": "Hello!"}],
extra_body={"reasoning": {"enabled": False}},
)
print(resp.choices[0].message.content)For TypeScript, use the documented body request option as the second argument to create. This option replaces the payload, so spread the standard params into it before adding reasoning. See the OpenAI Node SDK.
const params = {
model: "deepseek-v4.1-flash",
messages: [{ role: "user" as const, content: "Hello!" }],
};
const resp = await client.chat.completions.create(params, {
body: { ...params, reasoning: { enabled: false } },
});
console.log(resp.choices[0].message.content);Swift
import Foundation
import OpenAI
let openAI = OpenAI(
configuration: .init(
token: ProcessInfo.processInfo.environment["QSP_KEY"]!,
host: "api.quicksilverpro.io",
basePath: "/v1"
)
)
let query = ChatQuery(
messages: [.user(.init(content: .string("Hello!")))],
model: "deepseek-v4.1-flash"
)
let resp = try await openAI.chats(query: query)
print(resp.choices.first?.message.content?.string ?? "")curl
curl https://api.quicksilverpro.io/v1/chat/completions \
-H "Authorization: Bearer $QSP_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4.1-flash",
"messages": [{"role": "user", "content": "Hello!"}],
"reasoning": {"enabled": false}
}'3. What you get back
Standard OpenAI chat-completions JSON. choices[0].message.content is the model's reply. usage reports prompt and completion tokens plus a synthetic cost field computed from the public per-million rate.
{
"id": "chatcmpl-...",
"object": "chat.completion",
"created": 1715800000,
"model": "deepseek-v4.1-flash",
"choices": [{
"index": 0,
"message": {"role": "assistant", "content": "Hello! How can I help?"},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 8,
"total_tokens": 17,
"cost": 0.00000275
}
}Next steps
- Pick the right model for your workload — Models.
- Stream tokens as they generate — Streaming.
- Get typed JSON back — Structured output.