Docs

Documentation

From sign-up to your first call, using jeai in popular tools, going live and fixing errors — all on one page.

Three steps

Sign in to the console, select an enabled model and create a matching key. Follow the setup guide for the endpoint and model ID, and check your wallet balance and key quota before sending a request.

  1. 1Create an accountSign in and check your available balance and key quota before calling a model. Wallet shows current top-up availability.Sign up
  2. 2Create an API keyChoose an enabled model on the API Keys page and create a matching key. Set a spending limit if needed.See the walkthrough
  3. 3Send your first requestEnter the jeai endpoint, matching key and copied model ID, then check the configuration before calling.See the code

Create an API key

console.jeai.xyz
OverviewAPI Keys1Usage LogsWalletModels
API Keys+ Create API Key2
ModelStatusKeyQuota
DeepSeek V4.1 FlashEnabledsk-••••a91f¥1,460
DeepSeek V4 ProEnabledsk-••••3c7eUnlimited
Open API Keys in the console sidebar and click Create API Key.
Create API Key
DeepSeek V4.1 Flash · 1017
Never expires
¥730
203.0.113.10

Restrict allowed source IPs for production; an allowlist does not replace credential security or other safeguards.

Save changes5
Field illustration: choose a model, quota, expiry and allowed source IPs, then save. These are not live account records.
  1. Sign in to the console and open API Keys in the sidebar.
  2. Click Create API Key.
  3. Choose an enabled model and copy its model ID. Set a spending limit and expiry if needed.
  4. For production, enter the server’s outbound IP as permitted by the console.
  5. Save, then click Copy Key in the list to get your key starting with sk-.

Base URL and key

Use this address with your jeai customer key. Your SDK or tool must support the selected model's protocol; the conversation examples below use Chat Completions:

Base URL
HeaderAuthorization: Bearer sk-your-key
Model listGET https://api.jeai.xyz/v1/models
Call the API at api.jeai.xyz; console.jeai.xyz is only for signing in to the console.

Customer keys and provider keys

KeyUsed byWhere to configure it
jeai customer API keyYour applications and tools, including WorkBuddy and CodexCreate it under API Keys in the customer console, then enter it in the tool
Official model provider keyThe platform's connection to the upstream providerMaintained by an administrator under Upstream Channels in the management console

Create separate customer keys for applications or environments to control budgets and revocation. You usually do not need a separate key for each model. Enter a jeai customer key in your tools.

Send a request

This calls the chat endpoint. To switch to another enabled, authorized model compatible with this endpoint, change model and keep the same address and key. Replace example model IDs with entries from your available model list.

# pip install openai
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.jeai.xyz/v1", api_key=os.environ["JEAI_API_KEY"])

resp = client.chat.completions.create(
    model="glm-5.3",
    messages=[{"role": "user", "content": "Introduce yourself in one sentence"}],
)
print(resp.choices[0].message.content)

The usage field in the response is the token count of this call; that is what you are billed for:

response.json
{
  "model": "glm-5.3",
  "choices": [{ "message": { "role": "assistant", "content": "…" } }],
  "usage": { "prompt_tokens": 14, "completion_tokens": 38, "total_tokens": 52 }
}

Streaming

Add "stream": true and the answer arrives piece by piece, ideal for chat interfaces. Add stream_options to get usage at the end:

Python
stream = client.chat.completions.create(
    model="deepseek-flash",
    messages=[{"role": "user", "content": "Write a short poem about autumn"}],
    stream=True,
    stream_options={"include_usage": True},
)
for chunk in stream:
    if chunk.choices:
        print(chunk.choices[0].delta.content or "", end="")
    elif chunk.usage:
        print("\nUsage:", chunk.usage)

Image input

Choose an enabled model and route that support image input. Vision / Multimodal tags on the pricing page are reference information. Images can be provided as a URL or base64:

Python
resp = client.chat.completions.create(
    model="glm-5.3-flash",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "What is in this picture?"},
            {"type": "image_url", "image_url": {"url": "https://example.com/cat.jpg"}},
        ],
    }],
)

Choose a model

Select the full model name in the console and copy its model ID. New keys are authorized for the selected model; use a matching key when choosing another model. Existing keys keep their actual permissions. The reference examples below do not mean every model is enabled:

VendorSuggested model namesGood for
Zhipu GLMglm-5.3 glm-5.3-flashWriting, coding, agents; Flash is cheap and reads images
Doubaodoubao-seed-2-1-pro-260915 doubao-seed-2-1-lite-260915Multimodal understanding, everyday chat
Kimikimi-k3 kimi-k2.7-codeVery long documents, coding
DeepSeekdeepseek-v4-pro deepseek-flashReasoning, maths, code
Tencent Hunyuanhy4-preview hy-mt2-proAgent tasks; translation
Qwenqwen3.8-max qwen3.7-plus qwen-longGeneral chat; very long documents
Xiaomi MiMomimo-v2.6-pro mimo-v2.6-flashImage, audio and video understanding
MiniMaxMiniMax-M3Reasoning, coding

GET /v1/models returns models visible under your account, key permissions and billing configuration. The reference catalog can include models that are not connected. See model pricing for current specifications and prices.

What to check when switching

  • The model is enabled. Use its exact model ID. A listed model is not a guarantee that its upstream route is healthy right now.
  • Your key permits it. New keys are authorized for the selected model. Use a matching key for another model; existing keys retain their actual permissions. Your account must also have access to the model.
  • Quota and access checks pass. Check account balance, key quota, expiry and IP allowlist.
  • The tool supports its features. Chat, images, video, tools and Responses have different requirements. Each model entry needs the correct model ID and matching key. Confirm model compatibility before using Codex.

Use it in tools

Use the address required by your tool and an enabled, authorized model compatible with its protocol. Most chat tools use Chat Completions; Codex uses Responses. Address formats differ:

ToolAddress to enterNote
WorkBuddyhttps://api.jeai.xyz/v1/chat/completionsEnter the complete chat endpoint
Codexhttps://api.jeai.xyz/v1Include /v1; requires a Responses-compatible model
Cherry Studiohttps://api.jeai.xyzAdds /v1 by itself
Chatboxhttps://api.jeai.xyzLeave API Path empty
Difyhttps://api.jeai.xyz/v1Must include /v1
Cline (VS Code)https://api.jeai.xyz/v1Must include /v1

WorkBuddy

Have your customer API key from the jeai console ready, then copy the exact ID of a currently available model to add a custom model.

WorkBuddy · Field illustration
SettingsModel1Custom models
Add custom model
Custom
https://api.jeai.xyz/v1/chat/completions
sk-••••••••••••

Enter your jeai customer key

Paste an available model's exact ID
Save5
Field illustration, not an actual app screenshot. Menu locations and field labels may vary by version.
  1. Open WorkBuddy, click your avatar at the bottom left, then Settings → Model → Add model. Some versions also offer custom model settings through the model picker below the conversation.
  2. Set Provider to Custom.
  3. Enter the complete endpoint https://api.jeai.xyz/v1/chat/completions and your jeai customer API key.
  4. Set Model name to the exact model ID of a currently available model, matching the value accepted by the API.
  5. Save, then select the new custom model in the conversation's model picker. If your version offers Test connection, use it to check that the endpoint, key and model match.
Advanced options: Leave Custom Protocol off for this standard endpoint. If you turn it on, keep the complete URL above. Enable tool calling, image input and reasoning only when the chosen model supports them; image input does not mean image generation. Check each capability you need after testing the connection. Tests and tasks may incur usage.

Switching models: Save a separate entry for each model with its exact model ID and matching key. New keys are authorized for the selected model; existing keys retain their actual permissions. Availability also depends on credit, tool compatibility and service status.

Official help: WorkBuddy model settings · Model and advanced options (Chinese).

Codex (CLI / desktop)

Use a jeai customer key with an enabled model confirmed to support Responses, incremental streaming and a complete tool-call loop. A reference price or a successful chat reply does not establish Codex compatibility.

Confirm a compatible model first. The complete pricing catalog has not been qualified with Codex. Use the exact model ID and any required model catalog supplied by the platform; do not rename a domestic model to impersonate another provider. This section covers client configuration.
  1. Install Codex. Prepare your jeai customer key and a confirmed compatible model ID. Use https://api.jeai.xyz/v1 as the base URL.
  2. Open the user configuration: ~/.codex/config.toml on macOS / Linux, or %USERPROFILE%\.codex\config.toml on Windows. Merge the example below; update existing keys or tables instead of duplicating them, and preserve your other settings.
  3. Replace YOUR_CODEX_MODEL_ID with the confirmed exact ID. Supply the customer key through the JEAI_API_KEY environment variable. Keep the real key out of TOML and repositories.
  4. Launch codex from the configured terminal and use /status to check the provider and model. The desktop app reads the same user configuration; restart it and ensure its process can access the credential.
  5. Start a new conversation with “Reply only: jeai-ok”, then check a small read-only tool task and a follow-up turn. Confirm the model and request in jeai Usage Logs. Test requests can incur usage charges.
config.toml
# Keep top-level settings before the first [table]; use a confirmed model ID
model = "YOUR_CODEX_MODEL_ID"
model_provider = "jeai"
web_search = "disabled"

[model_providers.jeai]
name = "jeai"
base_url = "https://api.jeai.xyz/v1"
wire_api = "responses"
env_key = "JEAI_API_KEY"

Enter the base URL including /v1; Codex uses /v1/responses. Keep built-in web search disabled for the first connection check, and verify support before enabling it. If Codex does not recognize the model, obtain platform-supplied catalog metadata matching your client version and the model's actual capabilities. Do not enter a path to a file that does not exist.

How do I provide the key in a terminal?

After installing the CLI, macOS / Linux users can run this command and enter the key at the hidden prompt. Codex starts with the variable available to its process:

macOS / Linux · Bash
bash -c 'read -r -s -p "jeai API Key: " JEAI_API_KEY && export JEAI_API_KEY && exec codex'

In Windows PowerShell, set the current process variable through secure input and launch the CLI:

Windows · PowerShell
$jeaiSecret = Read-Host "jeai API Key" -AsSecureString
$env:JEAI_API_KEY = [System.Net.NetworkCredential]::new("", $jeaiSecret).Password
codex

An app opened from a desktop icon usually does not inherit terminal variables. Use your system or client's supported credential setup for the app process, then check the desktop app separately. Do not share credentials when requesting help.

If tools fail, output does not finish or follow-up turns fail, check the model's Responses and tool support. Share only redacted errors and request IDs. Client configuration does not enable an upstream route, add model capabilities or grant local tool permissions.

Official help: Connect Codex to a model gateway · Responses and tool compatibility.

Cherry Studio

Cherry Studio · Settings
Model Provider1Default ModelGeneralDisplayData
Add Custom Provider
jeai
sk-••••••••••••
https://api.jeai.xyz

Request path: https://api.jeai.xyz/v1/chat/completions

glm-5.3deepseek-flashkimi-k2.6qwen3.7-plus
Add model manuallyVerify and enable5
Add Custom Provider: enter https://api.jeai.xyz; the Request path line below shows the final address so you can check it.
  1. Click the Settings gear in the left sidebar and open Model Provider.
  2. Click "+ Add Provider" at the bottom of the list; Provider Name jeai, API Key your key.
  3. Under Endpoint settings, put https://api.jeai.xyz in the OpenAI box (no /v1, no trailing /) and click Add.
  4. The Choose models window opens: tick the models you want, or click "Add model manually" and type a name such as glm-5.3.
  5. Click "Verify and enable". Back in a chat, pick a model under jeai and start talking.

Chatbox

Chatbox · Settings
Model Provider1ChatDisplayGeneral
jeai
OpenAI API Compatible
sk-••••••••••••Check5
https://api.jeai.xyz
leave empty

Preview: https://api.jeai.xyz/v1/chat/completions

glm-5.3deepseek-flashFetchNew
API Mode "OpenAI API Compatible", host https://api.jeai.xyz, path left empty.
  1. Open Chatbox, click Settings at the bottom left and open Model Provider.
  2. Click Add at the bottom of the list; Name jeai, API Mode "OpenAI API Compatible", then Add.
  3. API Key your key, API Host https://api.jeai.xyz, API Path empty; Preview should read https://api.jeai.xyz/v1/chat/completions.
  4. In the Model area click Fetch to pull the list, or New to enter a Model ID such as deepseek-flash.
  5. Click Check next to API Key and test a model; "Connection successful!" means you're set. Start a new chat and choose a jeai model under Select Model.

Dify

Dify · Integrations › Model Provider
Model Provider1Data SourceAPI Extension
OpenAI-API-compatibleAdd Model2
LLM
glm-5.3
sk-••••••••••••
https://api.jeai.xyz/v1
1000000
Chat
Add5
The OpenAI-API-compatible provider: API Base URL must include /v1, and each model is added once.
  1. Click Integrations at the top and open Model Provider (older versions: avatar → Settings → Model Provider).
  2. Install OpenAI-API-compatible from "Install model providers", then click Add Model on its card.
  3. Model Type LLM; Model Name exactly the model name, e.g. glm-5.3.
  4. API Key your key; API Base URL https://api.jeai.xyz/v1 (with /v1); Model context size from the Context column on the pricing page.
  5. Click Add. Dify sends a test request first and saves if it passes. The model then appears in your apps' model picker; add each model you want to use.

Cline (VS Code)

VS Code · Cline
API Configuration1FeaturesBrowserTerminal
OpenAI Compatible
https://api.jeai.xyz/v1
sk-••••••••••••
kimi-k2.7-code
Done5
API Provider "OpenAI Compatible"; Base URL must include /v1.
  1. Open the Cline panel in VS Code, click the gear at the top right and go to API Configuration.
  2. Set API Provider to OpenAI Compatible.
  3. Base URL https://api.jeai.xyz/v1 (with /v1); OpenAI Compatible API Key your key.
  4. Cline then fetches the model list; pick one under Model ID — kimi-k2.7-code or glm-5.3 work well for coding. "Use custom model ID…" lets you type one.
  5. Settings save automatically; click Done. Send Cline a message — a normal reply means it works.

Environment and frameworks

The official OpenAI SDKs (Python, Node.js) read these two environment variables, so your code no longer needs the address or key:

.env
OPENAI_BASE_URL=https://api.jeai.xyz/v1
OPENAI_API_KEY=sk-your-key

In LangChain, LlamaIndex and similar frameworks, pick the OpenAI model class and fill in the same address and key:

LangChain
# pip install langchain-openai
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(model="kimi-k2.6", base_url="https://api.jeai.xyz/v1", api_key="sk-your-key")
print(llm.invoke("Hello").content)

Before going live

  • Keep keys on the server. Never put them in web pages, app bundles or public repositories; anyone can read code that runs in a browser.
  • One key per app. Give each its own quota and expiry so a problem only affects one app.
  • Set an IP whitelist in production. Each entry is a single IP or a range no wider than /24.
  • Handle the specific error. Back off as instructed for 429. After a timeout, disconnect or unknown task state, check logs and task status before resubmitting to avoid duplicate charges. For other 4xx, check the request first.
An IP allowlist restricts allowed source IPs. It does not replace credential security, spending limits or other safeguards, and does not imply unlimited concurrency or exemption from risk controls. Check actual quotas and rate limits before running batch jobs.

Requests may be limited by the key, account, gateway or model provider. Handle 429 according to its specific cause. If a key is paused or an account is restricted, check the notice and logs and follow the applicable recovery process instead of retrying repeatedly.

Usage and reconciliation

Usage analysis in the console shows input, output, total tokens, billed requests and charges by model. Logs show individual calls; statement details show spending and balance changes. Select the same time range when comparing records.

A platform request ID links a call to the platform’s logs. Read it from X-Oneapi-Request-Id when available. The provider decides whether to supply an upstream request ID; a platform ID or dashboard entry is not itself a provider-signed usage receipt.

Python
import requests

r = requests.post("https://api.jeai.xyz/v1/chat/completions",
                  headers={"Authorization": "Bearer sk-your-key"},
                  json={"model": "deepseek-flash", "messages": [{"role": "user", "content": "hello"}]})
request_id = r.headers.get("X-Oneapi-Request-Id")   # same ID as in Usage Logs
usage = r.json()["usage"]
print(request_id, usage["prompt_tokens"], usage["completion_tokens"])

Look for the platform request ID in streaming response headers. Compatible text endpoints can request final usage data with stream_options.include_usage; available fields and whether usage is returned depend on the provider and endpoint. Check logs after a disconnect.

Error codes

Errors come back with an HTTP status and JSON like this. message gives the reason; send us the request ID at the end and we can look it up:

403
{
  "error": {
    "code": "insufficient_user_quota",
    "message": "… (request id: 20261019…)",
    "type": "new_api_error"
  }
}
StatusWhat happenedWhat to do
400The request is malformed, or a parameter is not supported by this model (e.g. the conversation exceeds the context)Check the body; trim older turns from long conversations
401The key is missing, wrong, disabled (including auto-paused) or expiredCheck the Authorization header; look at the key in the console and re-enable it if needed
403Your balance is too low, or the call came from an IP outside the key's whitelistCheck balance and top-up availability in Wallet, or review the key's IP allowlist
429The request rate or concurrency reached a key, account, gateway or upstream limitReduce concurrency and wait as directed before retrying; an IP allowlist does not bypass limits or guarantee that a key will never be paused
503The model name is wrong, or the model has no available route right now (model_not_found)Check the name with GET /v1/models; retry later
500 / 502 / 504The upstream model failed or timed outRetry later; if it keeps happening, see service status

FAQ

Do I need another API key when choosing another model?

New customer keys are authorized for the model selected in the console. Use or create a matching key for another model and update the model ID in your tool. Existing keys retain their actual permissions. See the switching checklist.

Should I enter a provider key or a jeai key in my tool?

Enter a key created under API Keys in the jeai customer console. Official provider keys are maintained by platform administrators under Upstream Channels. See customer and provider keys.

My key was paused. What should I do?

Check the logs, recent calls and stated reason. Follow the actions available in the console; an administrative restriction requires manual review. If the key leaked, disable it, create another one and check where credentials were exposed. An IP allowlist restricts sources but does not guarantee security or exempt a key from limits.

My balance or key quota is insufficient.

Check the active account, Wallet balance and the key's remaining quota. A key's own spending limit can also block a request. Funds must be credited before use; Wallet shows current top-up availability.

The model is unavailable (model_not_found).

Copy the exact ID of an enabled model from the console and check that your key matches it. Also check route availability, wallet balance and key quota. Models listed only in the reference catalog may not be callable.

Requests are slow or disconnect midway.

Check service status and the call’s logs. Reasoning and generation can both take time; use streaming when supported. A timeout or disconnection does not prove the upstream did not execute the request. Check records and task status before retrying to avoid duplicate calls.

It says the context is too long.

Each model accepts a different length; see the Context column on the pricing page. Keep only the latest turns of long conversations, or switch to a 1M-context model.

How do I check charges by model and by request?

Usage analysis shows input, output, total tokens, requests and charges for each model. Logs can be filtered by model and key; statement details show balance changes. Use the same date range when comparing records.

Where can I check balance, refunds and invoices?

Wallet shows balance and credited funds. Unused paid principal is refunded promptly after verification. After use, eligible remaining paid principal is checked and processed within 14 calendar days of the request under the agreement. Invoices depend on the services actually available and confirmed arrangements. See the user agreement for conditions and limits.

Can our business request a tailored plan?

Apply for enterprise verification to discuss a plan suited to your needs. Dedicated pricing, routes and invoices depend on review, confirmation and actual activation; a label or group alone does not enable them. See Enterprise.

Create an API key in the console