h2ketnoi/DeepSeek-V4.1-Flash
Repeated prompts are cached — reads are far cheaper than input, applied automatically via the API.
Price levels previously applied. The row tagged "current" is the live price.
Estimate based on list prices. Caching usually makes it cheaper.
https://api.xah.io/v1/chat/completions
https://api.xah.io/v1/completions
https://api.xah.io/v1/messages
https://api.xah.io/v1/responses
https://api.xah.io/v1beta/models/h2ketnoi/DeepSeek-V4.1-Flash:generateContent
https://api.xah.io/api/chat
https://api.xah.io/api/generate
https://api.xah.io/v1/search
https://api.xah.io/v1/images/generations
https://api.xah.io/v1/audio/speech
https://api.xah.io/v1/moderations
https://api.xah.io/v1/images/edits
https://api.xah.io/v1/images/variations
https://api.xah.io/v1/audio/transcriptions
https://api.xah.io/v1/audio/translations
curl 'https://api.xah.io/v1/chat/completions' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "h2ketnoi/DeepSeek-V4.1-Flash",
"messages": [
{
"role": "user",
"content": "Hello, who are you?"
}
]
}'
// Node.js / Browser
const res = await fetch('https://api.xah.io/v1/chat/completions', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"model": "h2ketnoi/DeepSeek-V4.1-Flash",
"messages": [
{
"role": "user",
"content": "Hello, who are you?"
}
]
})
});
const data = await res.json();
console.log(data);
import json, requests
url = 'https://api.xah.io/v1/chat/completions'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
}
payload = json.loads("{\n \"model\": \"h2ketnoi/DeepSeek-V4.1-Flash\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hello, who are you?\"\n }\n ]\n}")
res = requests.post(url, headers=headers, json=payload, stream=True, timeout=120)
print(res.status_code, res.json())
{
"model": "h2ketnoi/DeepSeek-V4.1-Flash",
"messages": [
{
"role": "user",
"content": "Hello, who are you?"
}
]
}
Send a prompt with your API key — uses real credits, streams back instantly.