Before you install
Nulu Code is installed with npm, which comes with Node.js. If you have never used them, set these up first:
- Node.js 18 or newer (includes npm). Download the LTS version and install it with the default options. On Windows you can also use `winget install OpenJS.NodeJS.LTS`; on macOS with Homebrew, `brew install node`; on Linux, your distribution's package manager or nvm. nodejs.org
- A terminal: PowerShell or Windows Terminal on Windows, Terminal on macOS, any terminal on Linux. After installing Node.js, close it and open it again.
- A Nulu AI account with balance. It is the same account as on this platform.
- Git (recommended, not required): it lets you review and undo the changes the agent makes in your project.
No Node.js or npm yet? Install them with one command
These commands install Node.js and npm together. When they finish, close the terminal and open it again.
winget install OpenJS.NodeJS.LTScurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# close the terminal, open it again and run:
nvm install --ltsnode --version
npm --versionBoth commands must print a version number. If the terminal does not recognize the command, Node.js is not installed or the terminal has to be reopened. On Linux or macOS, if npm shows a permission error (EACCES) while installing, install Node.js with nvm or run the command with sudo.
npm install -g nulu-code
cd your-project
nulunulu login # connect your Nulu AI account
nulu logout # disconnect this terminal
nulu update # update to the latest release
nulu doctor # check connection and setup
nulu usage # usage, tokens and estimated cost
nulu --help # all commands- Install the `nulu-code` package with npm. You need Node.js 18 or newer on Linux, macOS or Windows (x64 or arm64).
- Run `nulu` in your project folder. The first time it shows a link: open it, approve the connection on this platform and paste the code the page shows into the terminal.
- Done: Nulu Code opens connected to your account. You do not need to create or copy an API key.
| Endpoint | Status | Notes |
|---|---|---|
| GET /v1/models | Supported | Returns the IDs of the available models. |
| POST /v1/chat/completions | Supported | OpenAI chat completions compatible format. |
| POST /v1/images/generations | Supported | Image generation with `nulu-image-3` (JSON). |
| POST /v1/images/edits | Supported | Editing/variations via `multipart/form-data` with image + prompt. |
| stream: true | Supported | Returns the response as SSE events. |
Authorization: Bearer sk_wat_your_keycurl https://api.nuluai.com/v1/models \
-H "Authorization: Bearer sk_wat_your_key"| Public ID | Name | Capabilities | Thinking |
|---|---|---|---|
nulu-5-pro | Nulu 5 Pro | Chat, tools | Optional |
nulu-5-ultra | Nulu 5 Ultra | Chat, tools, vision, advanced reasoning | Optional |
nulu-image-1.5 | Nulu Image 1.5 (Legacy) | Image generation and editing | Unavailable |
nulu-image-3 | Nulu Image 3 | Image generation and editing | Unavailable |
curl https://api.nuluai.com/v1/chat/completions \
-H "Authorization: Bearer sk_wat_your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "nulu-5-ultra",
"messages": [
{"role": "system", "content": "Answer helpfully and concisely."},
{"role": "user", "content": "Explain what a managed AI API is."}
],
"temperature": 0.7,
"max_tokens": 500
}'import OpenAI from "openai";
const client = new OpenAI({
apiKey: "sk_wat_your_key",
baseURL: "https://api.nuluai.com/v1"
});
const response = await client.chat.completions.create({
model: "nulu-5-ultra",
messages: [{ role: "user", content: "Say hello in English" }]
});| Size | Quality | Generate | Edit |
|---|---|---|---|
| 1024×1024 | Medium | $0.012371 | $0.012371 |
| 1024×1024 | Low | $0.040562 | $0.040562 |
| 1024×1024 | High | $0.04065 | $0.04065 |
| 1536×1024 | Low | $0.058536 | $0.058536 |
| 1536×1024 | Medium | $0.05865 | $0.05865 |
| 1536×1024 | High | $0.012291 | $0.012291 |
| 2048×2048 | Low | $0.04065 | $0.04065 |
| 2048×2048 | Medium | $0.04065 | $0.04065 |
| 2048×2048 | High | $0.04065 | $0.04065 |
curl https://api.nuluai.com/v1/images/generations \
-H "Authorization: Bearer sk_wat_your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "nulu-image-3",
"prompt": "Modern wooden chair in a bright studio",
"size": "1024x1024",
"quality": "medium",
"n": 1
}'curl https://api.nuluai.com/v1/images/edits \
-H "Authorization: Bearer sk_wat_your_key" \
-F "model=nulu-image-3" \
-F "prompt=Same chair in vivid red" \
-F "[email protected]" \
-F "size=1024x1024"import OpenAI from "openai";
import fs from "node:fs";
const client = new OpenAI({
apiKey: "sk_wat_your_key",
baseURL: "https://api.nuluai.com/v1"
});
// Generate
const generated = await client.images.generate({
model: "nulu-image-3",
prompt: "Minimal kitchen product on a white background",
size: "1024x1024"
});
// Edit (multipart)
const edited = await client.images.edit({
model: "nulu-image-3",
image: fs.createReadStream("product-photo.png"),
prompt: "Same scene with a red finish"
});| Field | Generation | Editing |
|---|---|---|
| model | Yes — `nulu-image-3` | Yes — `nulu-image-3` |
| prompt | Yes | Yes |
| image | No | Yes — PNG/JPEG/WebP file |
| mask | No | Optional — transparent PNG |
| size | Optional | Optional |
| quality | Optional (`low`, `medium`, `high`) | Optional |
| n | Optional (1–10) | Optional (1–10) |
const response = await client.chat.completions.create({
model: "nulu-5-ultra",
messages: [{ role: "user", content: "Solve this problem step by step" }],
reasoning_effort: "high", // "low" | "medium" | "high" | "max"
extra_body: {
thinking: { type: "enabled" }
}
});const response = await client.chat.completions.create({
model: "nulu-5-ultra",
messages: [{ role: "user", content: "Answer directly" }],
extra_body: {
thinking: { type: "disabled" }
}
});const response = await client.chat.completions.create({
model: "nulu-5-ultra",
response_format: { type: "json_object" },
messages: [
{ role: "system", content: "Return valid JSON only." },
{ role: "user", content: "Return a json object with question and answer." }
]
});const response = await client.chat.completions.create({
model: "nulu-5-ultra",
messages: [{ role: "user", content: "What is the weather in Caracas?" }],
tools: [{
type: "function",
function: {
name: "get_weather",
description: "Get weather for a location",
parameters: {
type: "object",
properties: { location: { type: "string" } },
required: ["location"]
}
}
}]
});const messages = [
{ role: "user", content: "What is the highest mountain?" }
];
const first = await client.chat.completions.create({ model: "nulu-5-ultra", messages });
messages.push(first.choices[0].message);
messages.push({ role: "user", content: "What is the second?" });
const second = await client.chat.completions.create({ model: "nulu-5-ultra", messages });| Field | Required | Description |
|---|---|---|
| model | Yes | Public model ID. |
| messages | Yes | Messages with `role` and `content`. |
| temperature | No | Controls randomness. Typical range: 0 to 2. |
| top_p | No | Nucleus sampling. Use this or temperature for simple control. |
| max_tokens | No | Maximum generated token limit. |
| stream | No | If `true`, returns OpenAI-compatible SSE events. |
| thinking | No | Use `{ type: "enabled" }` to enable reasoning per request; disabled by default. |
| reasoning_effort | No | Accepts `low`, `medium`, `high`, or `max`. Sending it turns thinking on automatically. |
| response_format | No | Use `{ type: "json_object" }` for JSON mode. |
| tools/tool_choice | No | Tool calling when the model supports it. |
| Type | Off-peak | Peak |
|---|---|---|
| Input — cache miss | $0.45 | $0.90 |
| Input — cache hit | $0.009 | $0.018 |
| Output | $1.80 | $3.60 |
| Type | Off-peak | Peak |
|---|---|---|
| Input — cache miss | $1.98 | $3.96 |
| Input — cache hit | $0.066 | $0.132 |
| Output | $5.94 | $11.88 |
A request with 1M uncached input tokens + 1M output tokens costs $0.45 + $1.80 = $2.25 off-peak, and $0.90 + $3.60 = $4.50 during peak.
If those 1M input tokens were already cached: $0.009 + $1.80 = $1.809 off-peak, and $0.018 + $3.60 = $3.618 during peak.
| Code | Meaning |
|---|---|
| 400 | Invalid JSON, unsupported streaming, or invalid parameters. |
| 401 | Invalid or revoked API key. |
| 402 | Insufficient balance. A minimum of $0.50 is required to use the API. |
| 404 | Public model unavailable. |
| 502 | The model request failed. |
{
"provider": {
"world-app-technologies-api": {
"npm": "@ai-sdk/openai-compatible",
"name": "Nulu API",
"options": {
"baseURL": "https://api.nuluai.com/v1",
"apiKey": "sk_wat_your_key"
},
"models": {
"nulu-5-pro": {
"name": "Nulu 5 Pro",
"reasoning": true,
"tool_call": true,
"interleaved": { "field": "reasoning_content" },
"limit": { "context": 1000000, "output": 384000 },
"variants": {
"low": { "reasoningEffort": "low" },
"medium": { "reasoningEffort": "medium" },
"high": { "reasoningEffort": "high" },
"max": { "reasoningEffort": "max" }
}
},
"nulu-5-ultra": {
"name": "Nulu 5 Ultra",
"reasoning": true,
"tool_call": true,
"interleaved": { "field": "reasoning_content" },
"limit": { "context": 1000000, "output": 384000 },
"variants": {
"low": { "reasoningEffort": "low" },
"medium": { "reasoningEffort": "medium" },
"high": { "reasoningEffort": "high" },
"max": { "reasoningEffort": "max" }
}
},
"nulu-image-1.5": {
"name": "Nulu Image 1.5 (Legacy)"
},
"nulu-image-3": {
"name": "Nulu Image 3"
}
}
}
}
}
