Quickstart
Modellane serves unrestricted language models for red teams, trust and safety, synthetic data, and fiction and character chat, alongside standard models. Models whose ID contains -unrestricted are unrestricted; the others are standard. We add no refusal or moderation layer of our own to any model: you apply your own product policy, and every request is covered by the Acceptable Use Policy.
- Get an API key: Create one in the console and keep it in an environment variable.
- Set the base URL: Point your SDK at the Modellane endpoint; the table below lists the values.
- Send a request: Call the chat API in curl, Python or Node.js.
The API speaks the OpenAI Chat Completions format, so any OpenAI SDK or tool that lets you set a base URL works without code changes. You need three values:
| Param | Value |
|---|---|
base_url | https://usemodellane.com/v1 |
api_key | A key from API keys in your dashboard |
model | deepseek-v4.1-flash (see Models & pricing for every model) |
The same key and models also work in two more request formats. Use the one your SDK or tool speaks; prices and limits are the same in all three.
| Format | Base URL | Endpoint |
|---|---|---|
| OpenAI Chat Completions (default) | https://usemodellane.com/v1 | POST /v1/chat/completions |
| OpenAI Responses | https://usemodellane.com/v1 | POST /v1/responses |
| Anthropic Messages | https://usemodellane.com | POST /v1/messages |
The Anthropic SDKs add /v1 themselves, so their base URL has no /v1 at the end. See the Anthropic Messages API and Responses API guides for what each format supports.
Coding agents, chat apps and agent frameworks need the same values. Integrations has ready-made settings for Codex, Claude Code, Cline, the OpenAI and Anthropic SDKs, LangChain and more.
Invoke the chat API#
Once you have a key, send a chat completion request. The examples below use the official OpenAI SDKs with only the base URL and key changed. Each one sends a system and a user message and prints the reply.
curl
curl https://usemodellane.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MODELLANE_API_KEY" \
-d '{
"model": "deepseek-v4.1-flash",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"stream": false
}'Python
# pip install openai
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MODELLANE_API_KEY"],
base_url="https://usemodellane.com/v1",
)
response = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"},
],
stream=False,
)
print(response.choices[0].message.content)Node.js
// npm install openai
import OpenAI from "openai"
const client = new OpenAI({
apiKey: process.env.MODELLANE_API_KEY,
baseURL: "https://usemodellane.com/v1",
})
const response = await client.chat.completions.create({
model: "deepseek-v4.1-flash",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Hello!" },
],
stream: false,
})
console.log(response.choices[0].message.content)Stream the reply#
The examples return the whole reply at once. Set stream to true to receive it token by token as server-sent events instead; the SDKs then return an iterator. Add stream_options: {"include_usage": true} to get the token usage in a final chunk before the done marker. The Streaming responses guide covers the event format.
Next steps#
- Models & pricing: context length, features and price of every model.
- Chat completions: every request field and the response format.
- Integrations: settings for coding agents, chat apps and SDKs.
- Error codes: what each error means and how to fix it.