Developer Docs

Integrate AI APIs in 5 minutes using your favorite framework.

Overview

Celuxe API provides a unified interface to access multiple top AI models. We are fully compatible with OpenAI's API format, meaning you can integrate directly using existing OpenAI SDKs, LangChain, Vercel AI SDK, and more.Just replace base_url and API Key.

💡
Compatibility Note: Celuxe API is fully compatible with OpenAI's Chat Completions interface format. If you are already using OpenAI, migration takes just 2 lines of code.

Quickstart

Get started in 5 minutes with the steps below.

1

Create an Account

Sign up at Celuxe and get $5 in credits.

2

Create an API Key

Create a new API Key in the dashboard. We recommend creating separate keys for different projects for easier management and monitoring.

3

Send Your First Request

Use your preferred SDK or send a request directly with cURL:

curl https://api.celuxe.shop/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-your-api-key" \
  -d '{
  "model": "deepseek-v3",
  "messages": [
    {"role": "user", "content": "Hello!"}
  ]
}'

Authentication

All API requests require your API Key in the Authorization header:

# Format
Authorization: Bearer sk-your-api-key

Your API Key can be obtained from Dashboard → API Key Management. We recommend storing it in an environment variable rather than hardcoding it in your code.

Chat Completions

Chat Completions is the core feature of Celuxe API. Send a list of messages to the model and it will generate a response.

Request Endpoint:

POST https://api.celuxe.shop/v1/chat/completions

Request Parameters:

  • model (required) - Model ID, e.g. deepseek-v3, gpt-4o
  • messages (required) - Message array, supporting system, user, assistant roles
  • temperature (optional) - Controls output randomness, between 0-2, default 1.0
  • max_tokens (optional) - Maximum tokens to generate, default 4096
  • stream (optional) - Enable streaming output, default false
  • top_p (optional) - Nucleus sampling parameter, between 0-1

Example Request:

{
  "model": "deepseek-v3",
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "What is the capital of France?"}
  ],
  "temperature": 0.7,
  "max_tokens": 1024
}

Example Response:

{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1714000000,
  "model": "deepseek-v3",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "The capital of France is Paris."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 28,
    "completion_tokens": 6,
    "total_tokens": 34
  }
}

Streaming

Setting stream: true allows the model to return responses chunk by chunk, ideal for real-time chat experiences:

const response = await fetch("https://api.celuxe.shop/v1/chat/completions", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer sk-your-api-key"
  },
  body: JSON.stringify({
    model: "deepseek-v3",
    messages: [{role:"user", content:"Hello!"}],
    stream: true
  })
});
const reader = response.body.getReader();
const decoder = new TextDecoder();
while(true) {
  const {done, value} = await reader.read();
  if(done) break;
  console.log(decoder.decode(value));
}

Models

Get all available models:

curl https://api.celuxe.shop/v1/models \
  -H "Authorization: Bearer sk-your-api-key"

You can also check the models page for detailed information and pricing of each model.

Error Handling

The API uses standard HTTP status codes to indicate request results:

  • 200 — Request successful
  • 400 — Bad request, check the request body
  • 401 — Authentication failed, check your API Key
  • 402 — Insufficient balance, please top up
  • 429 — Rate limit exceeded, please try again later
  • 500 — Internal server error, please contact support

Error responses include details:

{
  "error": {
    "message": "Insufficient balance",
    "type": "insufficient_quota",
    "code": "insufficient_balance"
  }
}

Python SDK

Use the OpenAI Python SDK with Celuxe:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.celuxe.shop/v1",
    api_key="sk-your-api-key"
)

response = client.chat.completions.create(
    model="deepseek-v3",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ]
)
print(response.choices[0].message.content)

Node.js

Use the OpenAI Node.js SDK:

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.celuxe.shop/v1",
  apiKey: "sk-your-api-key",
});

const completion = await client.chat.completions.create({
  model: "deepseek-v3",
  messages: [
    { role: "system", content: "You are a helpful assistant." },
    { role: "user", content: "Hello!" }
  ],
});

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

cURL

Test directly with cURL:

curl https://api.celuxe.shop/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-your-api-key" \
  -d '{
  "model": "deepseek-v3",
  "messages": [
    {"role": "user", "content": "Hello!"}
  ]
}'

API Key Management

Create, view, and revoke API Keys from the dashboard:

  • Create multiple API Keys, one per project is recommended
  • Set IP whitelist per key for enhanced security
  • Set spending limits to prevent unexpected overages
  • Revoke compromised keys at any time

Usage & Billing

The dashboard provides detailed usage statistics and billing information:

  • Real-time monitoring — View token consumption and costs in real time
  • Monthly reports — Consumption reports by model and time period
  • Usage alerts — Set thresholds for automatic notifications
  • Top-up history — Complete transaction records and invoices
💡
New users automatically receive $5 in credits with no credit card required.

Rate Limits

API requests are protected by rate limits to ensure service stability:

  • Free users — 10 requests per minute
  • Pro users — 500 requests per minute
  • Enterprise — Custom limits

Requests exceeding the limit return a 429 status code. We recommend implementing an exponential backoff retry strategy.