Luthfi API docs

The API follows the OpenAI format (/v1/chat/completions, /v1/responses, /v1/models, embeddings, images) and the Anthropic format (/v1/messages). Any SDK or tool that lets you change the base URL works.

  1. 1. Create an account — your first API key is ready in the dashboard.
  2. 2. Top up credit from Billing.
  3. 3. Point your SDK at the base URL below and use your key.

OpenAI-compatible base URL

https://r.temanpns.my.id/v1

Anthropic-compatible base URL

https://r.temanpns.my.id

cURL

curl https://r.temanpns.my.id/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-opus-5.5", "messages": [{"role": "user", "content": "Hello!"}]}'

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(base_url="https://r.temanpns.my.id/v1", api_key="YOUR_API_KEY")
stream = client.chat.completions.create(
    model="claude-opus-5.5",
    messages=[{"role": "user", "content": "Write a haiku about the sea."}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

Node.js (OpenAI SDK)

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://r.temanpns.my.id/v1", apiKey: process.env.API_KEY });
const reply = await client.chat.completions.create({
  model: "claude-opus-5.5",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(reply.choices[0].message.content);

Anthropic SDK

import anthropic

client = anthropic.Anthropic(base_url="https://r.temanpns.my.id", api_key="YOUR_API_KEY")
message = client.messages.create(
    model="claude-opus-5.5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}],
)
print(message.content[0].text)

Claude Code and other coding tools

Set the base URL and your key as environment variables, then start the tool as usual.

export ANTHROPIC_BASE_URL="https://r.temanpns.my.id"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
claude

Models

GET https://r.temanpns.my.id/v1/models lists every model your key can call. Prices are on the pricing page.

Errors

401Missing or invalid API key.
402Not enough credit — top up from Billing.
403The key is disabled, expired, or limited to another model.
404Unknown model or endpoint.
429Too many requests — slow down and retry.
5xxThe upstream model failed; retry after a moment.