Documentation
Documentation

Quickstart

Create a key and get a response with Node.js, Python or cURL.

1. Create an API key

Create an Arnict account, verify your email, then open API keys in the dashboard. Give the key a name that identifies your application and copy it when it appears.

Save the key now

The full key is shown once. Store it in a secret manager or a local environment variable. Keep it out of source control and browser code.

Set the key in the terminal where you will run the example. Replace the placeholder with the key you just created.

bash
export ARNICT_API_KEY="arn_live_your_key"

2. Choose your client

Use the OpenAI SDK for Node.js or Python, or send an HTTP request with cURL. Select a language below and keep the same language selected for the request example.

Node.js
npm install openai

For Node.js, save the next example as hello.mjs and run node hello.mjs. For Python, save it as hello.py and run python hello.py. Run the cURL example directly in your terminal; it prints the full JSON response.

3. Send your first request

This example uses GLM 5.3 Flash Abliterated, which is currently marked available. You can replace its model ID with another available ID from the catalog.

Node.js
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.arnict.com/v1",
  apiKey: process.env.ARNICT_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "zai/glm-5.3-flash-uncensored",
  messages: [{ role: "user", content: "Say hello in one sentence." }],
  max_tokens: 256,
});

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

Using an existing integration?

Set the base URL to https://api.arnict.com/v1 and use your Arnict API key. The integration must support chat completions and the capabilities of your chosen model.

4. Read the response

The answer is in choices[0].message.content. The usage object reports token counts when available. Your dashboard also shows request status, token usage and cost.

The JSON below illustrates the response shape. The text, identifiers and token counts will differ for your request.

json
{
  "id": "chatcmpl_example",
  "object": "chat.completion",
  "created": 1788652800,
  "model": "zai/glm-5.3-flash-uncensored",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 10,
    "total_tokens": 22
  }
}

Keep building