API Documentation

NexAPI is OpenAI-compatible. Just change the base URL.

Authentication

Include your API key in the Authorization header of every request.

curl https://nex-api.tech/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{...}'

Endpoints

POST/v1/chat/completions

Create a chat completion for the given messages.

Request:

{
  "model": "deepseek-v4-pro",
  "messages": [{"role": "user", "content": "Hello!"}],
  "max_tokens": 1000
}

GET/v1/models

List all available models.

Client Configuration

Works with any OpenAI-compatible client. Just change the Base URL to NexAPI.

Cherry Studio

  1. Settings β†’ Model Service β†’ Add Provider
  2. Provider type: OpenAI
  3. API Address: https://nex-api.tech/v1
  4. API Key: your NexAPI key
  5. Click Test Connection then Save

ChatBox

  1. Settings β†’ Model β†’ Add Custom Provider
  2. API Host: https://nex-api.tech
  3. API Path: /v1/chat/completions
  4. API Key: your NexAPI key

LobeChat / NextChat

  1. Settings β†’ Language Model
  2. Provider: OpenAI
  3. API Proxy: https://nex-api.tech/v1
  4. API Key: your NexAPI key

SDK Examples

Python (OpenAI SDK):

from openai import OpenAI

client = OpenAI(
    base_url="https://nex-api.tech/v1",
    api_key="YOUR_API_KEY"
)

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

Node.js (OpenAI SDK):

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://nex-api.tech/v1",
  apiKey: "YOUR_API_KEY",
});

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

cURL:

curl https://nex-api.tech/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"Hello!"}]}'

Models

ModelContextPricing (per 1M tokens)
deepseek-v4-pro128K$0.28 / $0.56
gpt-4o-mini128KComing soon
claude-sonnet-4200KComing soon
Back to Home