Quickstart

NightMart implements the OpenAI-compatible API. If your code already talks to OpenAI, you only need to change the base URL and API key.

1. Create an API key

Sign up, then create a key from your dashboard. Keys are prefixed nm_live_ and are only shown once.

2. Base URL

text
https://api.nightmart.cc/v1

3. Make a request

Python (openai SDK):

python
import openai

client = openai.Client(
  base_url="https://api.nightmart.cc/v1",
  api_key="nm_live_..."
)

response = client.chat.completions.create(
  model="deepseek-v3.2",
  messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

Node.js (openai SDK):

javascript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.nightmart.cc/v1",
  apiKey: "nm_live_...",
});

const response = await client.chat.completions.create({
  model: "deepseek-v3.2",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);

curl:

bash
curl https://api.nightmart.cc/v1/chat/completions \
  -H "Authorization: Bearer nm_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-v3.2", "messages": [{"role": "user", "content": "Hello!"}]}'

4. Pick a model

See the full, current catalogue with model ids and pricing on the Models page.