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.
- Create an accountSign up and verify your email.
- Open API keysCreate a key if you already have an account.
Save the key now
Set the key in the terminal where you will run the example. Replace the placeholder with the key you just created.
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.
npm install openaiFor 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.
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?
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.
{
"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
- Stream a responseDisplay text as it arrives.
- Compare models and ratesChoose capabilities and a price that fit your application.
- Review your usageCheck requests, tokens and cost after your first call.
- Handle errorsAdd retries and respond to rate limits.
