Authentication
Send your API key via Authorization: Bearer sk-lopi-... or x-api-key: sk-lopi-...
Authorization: Bearer sk-lopi-demo
x-api-key: sk-lopi-demo
High-speed OpenAI-compatible and Anthropic-compatible AI endpoints
https://lopi.my.id
/v1/modelsList Active Models (/v1/models)/v1/chat/completionsOpenAI Compatible (/v1/chat/completions)/v1/completionsLegacy OpenAI Completions/v1/messagesAnthropic Messages API (/v1/messages)Send your API key via Authorization: Bearer sk-lopi-... or x-api-key: sk-lopi-...
Authorization: Bearer sk-lopi-demo
x-api-key: sk-lopi-demo
All AI endpoints support instant non-streaming JSON responses and real-time SSE token streaming.
| Model ID | Provider | Context Window | Input / Output (per 1M) | Streaming |
|---|---|---|---|---|
glm-5.3 |
LOPI Frontier AI Engine | 131,072 | $0.20 / $0.60 | Supported |
deepseek-v4-pro |
LOPI Frontier AI Engine | 131,072 | $0.25 / $0.75 | Supported |
deepseek-v4.1-flash |
LOPI Frontier AI Engine | 131,072 | $0.10 / $0.30 | Supported |
qwen2.5-coder:1.5b |
LOPI Core AI Engine | 32,768 | $0.05 / $0.15 | Supported |
deepseek-r1:1.5b |
LOPI Core AI Engine | 32,768 | $0.08 / $0.24 | Supported |
gpt-4o-mini |
LOPI OpenAI Engine | 128,000 | $0.15 / $0.60 | Supported |
claude-3-5-haiku-latest |
LOPI Anthropic Engine | 200,000 | $0.80 / $4.00 | Supported |
qwen2.5-coder:7b |
LOPI Core AI Engine | 32,768 | $0.10 / $0.30 | Supported |
deepseek-r1:8b |
LOPI Core AI Engine | 32,768 | $0.15 / $0.45 | Supported |
| HTTP Status | Error Code | Meaning & Retry Guidance |
|---|---|---|
400 | VALIDATION_ERROR | Input validation failed. |
401 | INVALID_API_KEY | Authentication is required. |
402 | INSUFFICIENT_CREDITS | Insufficient available credits. |
403 | RBAC_FORBIDDEN | You do not have permission to perform this action. |
404 | NOT_FOUND | Requested resource was not found. |
429 | RATE_LIMIT_EXCEEDED | Too many requests. Please try again later. |
503 | SERVICE_UNAVAILABLE | No healthy provider is available for the requested model. |
curl -N https://lopi.my.id/v1/chat/completions \
-H "Authorization: Bearer sk-lopi-demo" \
-H "Content-Type: application/json" \
-d '{"model":"glm-5.3","stream":true,"messages":[{"role":"user","content":"Hello"}]}'
curl -N https://lopi.my.id/v1/messages \
-H "x-api-key: sk-lopi-demo" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-pro","max_tokens":512,"stream":true,"messages":[{"role":"user","content":"Hello"}]}'
import os
import openai
import anthropic
oai = openai.OpenAI(api_key=os.environ["LOPI_API_KEY"], base_url="https://lopi.my.id/v1", timeout=660.0)
resp = oai.chat.completions.create(model="glm-5.3", messages=[{"role": "user", "content": "Hello"}], stream=True)
ant = anthropic.Anthropic(api_key=os.environ["LOPI_API_KEY"], base_url="https://lopi.my.id", timeout=660.0)
msg = ant.messages.create(model="deepseek-v4-pro", max_tokens=256, messages=[{"role": "user", "content": "Hello"}])
import OpenAI from "openai";
import Anthropic from "@anthropic-ai/sdk";
const openai = new OpenAI({ apiKey: process.env.LOPI_API_KEY, baseURL: "https://lopi.my.id/v1", timeout: 660000 });
const anthropic = new Anthropic({ apiKey: process.env.LOPI_API_KEY, baseURL: "https://lopi.my.id", timeout: 660000 });