Model ID: deepseek-coder
Billing: Per token(/1K tokens)
OpenAI-compatible endpoint with a single model key
Pricing Info
$0.0001/1K tokens
Market Price
$0.0005/1K tokens
Model Documentation
Using default documentation template for this model.
DeepSeek Coder Documentation
Use this model with OpenAI-compatible SDKs.
Endpoint
- Base URL:
https://your-domain.com/v1 - Model key:
deepseek-coder
JavaScript / TypeScript (Official OpenAI SDK)
ts
import OpenAI from 'openai'
const client = new OpenAI({
apiKey: process.env.NEW_API_KEY,
baseURL: 'YOUR_BASE_URL'
})
const completion = await client.chat.completions.create({
model: 'YOUR_MODEL_ID',
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'Give me a quick intro for this model.' }
]
})
console.log(completion.choices[0]?.message?.content)Python (Official OpenAI SDK)
python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_NEW_API_KEY",
base_url="YOUR_BASE_URL"
)
resp = client.chat.completions.create(
model="YOUR_MODEL_ID",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)
print(resp.choices[0].message.content)