Quick start

Connect in three minutes

Create an API key, read the available models, and send your first text request. These three steps confirm that the integration works.

Unified base URLhttps://api.noxgate.net/v1
  1. 01

    Create an account and an API key in the console. The plaintext key is shown once, so save it immediately.

  2. 02

    Call /v1/models to get model IDs available to the current key.

  3. 03

    Use one of those model IDs with Chat Completions.

Read the model catalog

curl
curl https://api.noxgate.net/v1/models \
  -H "Authorization: Bearer sk-your-api-key"

Send your first request

curl
curl https://api.noxgate.net/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_MODEL_ID",
    "messages": [{"role": "user", "content": "Hello"}],
    "stream": false
  }'
Python
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://api.noxgate.net/v1",
)

response = client.chat.completions.create(
    model="YOUR_MODEL_ID",
    messages=[{"role": "user", "content": "Hello"}],
)

print(response.choices[0].message.content)
Node.js
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "sk-your-api-key",
  baseURL: "https://api.noxgate.net/v1",
});

const response = await client.chat.completions.create({
  model: "YOUR_MODEL_ID",
  messages: [{ role: "user", content: "Hello" }],
});

console.log(response.choices[0]?.message?.content);

Successful response

JSON
{
  "id": "chatcmpl_example",
  "object": "chat.completion",
  "model": "YOUR_MODEL_ID",
  "choices": [
    {
      "index": 0,
      "message": {"role": "assistant", "content": "Hello!"},
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 8,
    "completion_tokens": 3,
    "total_tokens": 11
  }
}

When a request fails

  • 401: verify the API key and Bearer authorization format.
  • 404: verify that the model ID comes from the current key's model catalog.
  • 429: reduce request frequency before retrying.

View the complete error guide