DeepSeek V4.1 Flash (DeepInfra) API
DeepInfra · serves deepseek-v4.1-flash
Call it
OpenAI-compatible endpoint — set DEEPINFRA_API_KEY.
curl https://api.deepinfra.com/v1/openai/chat/completions \
-H "Authorization: Bearer $DEEPINFRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-ai/DeepSeek-V4.1-Flash",
"messages": [{"role": "user", "content": "Hello"}]
}'from openai import OpenAI # pip install openai
client = OpenAI(
base_url="https://api.deepinfra.com/v1/openai",
api_key="...", # DEEPINFRA_API_KEY
)
resp = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4.1-Flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)Use this data
Raw JSON for this page: deepseek-v4.1-flash.json. Free to reuse under CC BY 4.0 with attribution to apipriceindex.com.