Network API

Connect to Dolphin, choose a model, and send your first chat completion.

On this page

Dolphin provides an OpenAI-compatible API for text generation. Use it from an existing OpenAI SDK client or send HTTP requests directly.

Calling the API

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.

Models

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 V4.1 Flash

DeepSeek's V4.1 Flash release with a large context window.

API model ID
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
View on Hugging Face

Errors

401Invalid API key
Check the key and the Authorization: Bearer header.
402Insufficient credits
Check Credit Balance in the app. Redeem a coupon to add credit.
404Unknown model
Use an exact model ID from Models, or check GET /models for models that are online.
429Too many requests
Slow down requests and retry with exponential backoff. If the response includes Retry-After, wait for that duration before retrying.

Get an API key

  1. Open app.dphn.ai and connect your wallet.
  2. Click Verify Wallet and sign the message. It is free and sends no transaction.
  3. Click Open Telegram and press Start in the bot.
  4. If you have a coupon, enter it in Redeem Code and click Redeem. Your USD credit appears in Credit Balance. See Coupon credits for the redemption steps.
  5. In API Keys, click Create Key and copy the key.

You need an API key and available credit to make requests.

Supported API types

Endpoint paths below are relative to the base URL above. Both use Authorization: Bearer YOUR_API_KEY.

TypeMethod and pathUse
Chat CompletionsPOST /chat/completionsSend a conversation and receive a model-generated reply.
ModelsGET /modelsList 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.

Check current availability

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.

Fallback routing

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.