DeepSeek
DeepSeek V4.1 Flash
DeepSeek's V4.1 Flash release with a large context window.
deepseek-ai/DeepSeek-V4.1-Flash - Context window
- 1,048,576
- tokens
- Input price
- $0.01
- per million tokens
- Output price
- $0.07
- per million tokens
Connect to Dolphin, choose a model, and send your first chat completion.
Dolphin provides an OpenAI-compatible API for text generation. Use it from an existing OpenAI SDK client or send HTTP requests directly.
Already have a key? Set DOLPHIN_API_KEY in your environment and use one of the examples below. Need a key first? Follow Get an API key.
Base URL
https://lighthouse.dphn.ai/run/text-v/v1 OpenAI-compatible. Authenticate with a Bearer token.
cURL
Set your key in your terminal:
export DOLPHIN_API_KEY="YOUR_API_KEY" curl https://lighthouse.dphn.ai/run/text-v/v1/chat/completions \
-H "Authorization: Bearer $DOLPHIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-ai/DeepSeek-V4.1-Flash",
"messages": [{ "role": "user", "content": "Hello, Dolphin!" }]
}' Python
Install the SDK and set your key:
pip install openai
export DOLPHIN_API_KEY="YOUR_API_KEY" import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DOLPHIN_API_KEY"],
base_url="https://lighthouse.dphn.ai/run/text-v/v1",
)
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4.1-Flash",
messages=[{"role": "user", "content": "Hello, Dolphin!"}],
)
print(response.choices[0].message.content) JavaScript
Install the SDK and set your key. Run the example with Node.js:
npm install openai
export DOLPHIN_API_KEY="YOUR_API_KEY" import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.DOLPHIN_API_KEY,
baseURL: "https://lighthouse.dphn.ai/run/text-v/v1",
});
const response = await client.chat.completions.create({
model: "deepseek-ai/DeepSeek-V4.1-Flash",
messages: [{ role: "user", content: "Hello, Dolphin!" }],
});
console.log(response.choices[0].message.content); Use the base URL exactly as shown when configuring an SDK. For a direct HTTP request, append /chat/completions. The generated reply is in choices[0].message.content.
Keep your key on your server or in a local environment variable. Do not include it in browser code or commit it to your repository.
Use the exact model ID in the model field of a chat completion request. Check current availability for models that are online now.
DeepSeek
DeepSeek's V4.1 Flash release with a large context window.
deepseek-ai/DeepSeek-V4.1-Flash 401Invalid API keyAuthorization: Bearer header.402Insufficient credits404Unknown modelGET /models for models that are online.429Too many requestsRetry-After, wait for that duration before retrying.You need an API key and available credit to make requests.
Endpoint paths below are relative to the base URL above. Both use Authorization: Bearer YOUR_API_KEY.
| Type | Method and path | Use |
|---|---|---|
| Chat Completions | POST /chat/completions | Send a conversation and receive a model-generated reply. |
| Models | GET /models | List the models that are online now. |
Chat requests use Content-Type: application/json. Include model and a messages array; each message has a role and content, as shown in the examples.
Send GET /models with the same key you use for chat completions:
curl https://lighthouse.dphn.ai/run/text-v/v1/models \
-H "Authorization: Bearer $DOLPHIN_API_KEY"
Each model in the response includes its id and context_length. Use the returned id in your request. This endpoint does not include pricing.
The context windows above come from the DPHN API. Hugging Face model cards describe the upstream models; see Supported API types for the documented DPHN interface.
We serve DeepSeek requests on our own hardware. Until we have more network capacity, a hardware fault can cause a request to fall back to OpenRouter. Fallback happens only in that case, and only to Zero Data Retention (ZDR) providers that do not store your prompts or outputs.