🪄 Hướng dẫn cài đặt

Làm theo 4 bước bên dưới, chỉ mất khoảng 5 phút.

1
Tạo tài khoản

Bấm nút bên dưới để mở trang đăng ký. Đăng ký xong thì quay lại đây.

🌐 Mở trang đăng ký
2
Lấy API Key (chìa khoá)

Sau khi đăng nhập, vào mục "Tokens" → bấm "Tạo token mới" → copy dãy ký tự bắt đầu bằng sk-... rồi dán vào ô bên dưới.

3
Nạp tiền

Vào mục "Wallet" trên trang web, chọn cách nạp tiền bạn thích.

💰 Mở trang nạp tiền
4
Chọn công cụ bạn muốn dùng

Bấm vào công cụ bạn đang dùng hoặc muốn dùng:

🖥️
Claude Code
Gõ lệnh trong Terminal
Phổ biến
Cursor
Phần mềm viết code có AI
💻
Kilo / Roo Code
Extension cho VS Code
🧩
OpenCode
AI coding trong Terminal
🤖
Droid
AI agent đa năng
🦞
OpenClaw
Tạo bot AI trên Telegram
🐍
Python
Dùng trong code Python
🟨
JavaScript
Dùng trong code JS/Node

🤖 Woku Shop API

Chào mừng! Dịch vụ API AI giá rẻ, ổn định, tương thích nhiều SDK/công cụ phổ biến.
💰

Tối ưu chi phí

Nạp tiền linh hoạt

Tích hợp nhanh

OpenAI / Anthropic compatible

🔒

Bảo mật

HTTPS, tách token

🌍

Đa model

OpenAI / Claude / Gemini...

🔗 Connection Info

Base URL (OpenAI-compatible)https://llm.wokushop.com/v1
Base URL (Anthropic-compatible)https://llm.wokushop.com
Dashboardllm.wokushop.com
Pricingllm.wokushop.com/pricing
Gợi ý: dùng alias model (ví dụ gpt-4o, gpt-4o-mini, claude-sonnet-4-6...) để dễ quản lý. Danh sách model thực tế xem trong trang Pricing.

🚀 Bắt đầu nhanh

1

Tạo tài khoản

llm.wokushop.com → đăng ký / đăng nhập

2

Tạo API key

Dashboard → TokensTạo token mới → copy key (sk-...)

3

Nạp tiền

Dashboard → Wallet → chọn phương thức nạp

4

Gọi API

Dùng SDK OpenAI/Anthropic hoặc công cụ AI coding trỏ về Woku base URL

Ví dụ nhanh

curl https://llm.wokushop.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-your-api-key" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://llm.wokushop.com/v1"
)

resp = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello!"}]
)

print(resp.choices[0].message.content)
import OpenAI from "openai";

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

const resp = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Hello!" }],
});

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

🔐 Xác thực

Tất cả request đều cần Bearer token:

Authorization: Bearer sk-your-api-key

Lưu API key an toàn

⚠️ Security
  • Không gửi API key qua chat/group/screenshot
  • Không commit API key vào Git
  • Ưu tiên dùng environment variables
  • Nếu lộ key → tạo key mới ngay

Environment Variables

# OpenAI-compatible
export OPENAI_API_KEY="sk-your-api-key"
export OPENAI_BASE_URL="https://llm.wokushop.com/v1"

# Anthropic-compatible
export ANTHROPIC_AUTH_TOKEN="sk-your-api-key"
export ANTHROPIC_BASE_URL="https://llm.wokushop.com"
# Chỉ cho session hiện tại
$env:OPENAI_API_KEY = "sk-your-api-key"
$env:OPENAI_BASE_URL = "https://llm.wokushop.com/v1"
$env:ANTHROPIC_AUTH_TOKEN = "sk-your-api-key"
$env:ANTHROPIC_BASE_URL = "https://llm.wokushop.com"

# Lưu vĩnh viễn (User)
[Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "sk-your-api-key", "User")
[Environment]::SetEnvironmentVariable("OPENAI_BASE_URL", "https://llm.wokushop.com/v1", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-your-api-key", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://llm.wokushop.com", "User")
REM Session hiện tại
set OPENAI_API_KEY=sk-your-api-key
set OPENAI_BASE_URL=https://llm.wokushop.com/v1
set ANTHROPIC_AUTH_TOKEN=sk-your-api-key
set ANTHROPIC_BASE_URL=https://llm.wokushop.com

REM Lưu vĩnh viễn (mở CMD mới sau khi setx)
setx OPENAI_API_KEY "sk-your-api-key"
setx OPENAI_BASE_URL "https://llm.wokushop.com/v1"
setx ANTHROPIC_AUTH_TOKEN "sk-your-api-key"
setx ANTHROPIC_BASE_URL "https://llm.wokushop.com"

📦 OpenAI SDK

Quan trọng OpenAI-compatible base URL phải có /v1 ở cuối.
https://llm.wokushop.com/v1
https://llm.wokushop.com

Cài đặt

pip install openai
npm install openai

Sử dụng

from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://llm.wokushop.com/v1",
)

# Chat
resp = client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {"role": "system", "content": "You are helpful."},
        {"role": "user", "content": "Xin chào!"}
    ],
)
print(resp.choices[0].message.content)

# Streaming
stream = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Viết 1 đoạn ngắn"}],
    stream=True
)

for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="")
import OpenAI from "openai";

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

const resp = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [
    { role: "system", content: "You are helpful." },
    { role: "user", content: "Xin chào!" }
  ]
});
console.log(resp.choices[0].message.content);

// Streaming
const stream = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Viết 1 đoạn ngắn" }],
  stream: true
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}

🤖 Anthropic SDK

Quan trọng Anthropic-compatible base URL KHÔNG thêm /v1.
https://llm.wokushop.com
https://llm.wokushop.com/v1

Cài đặt

pip install anthropic
npm install @anthropic-ai/sdk

Sử dụng

from anthropic import Anthropic

client = Anthropic(
    api_key="sk-your-api-key",
    base_url="https://llm.wokushop.com",
)

msg = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Giải thích AI ngắn gọn"}],
)

print(msg.content[0].text)
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: "sk-your-api-key",
  baseURL: "https://llm.wokushop.com",
});

const msg = await client.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Giải thích AI ngắn gọn" }],
});

console.log(msg.content[0].text);

Extended Thinking (nếu model hỗ trợ)

msg = client.messages.create(
    model="claude-opus-4-5-20251101",
    max_tokens=16000,
    thinking={"type": "enabled", "budget_tokens": 4000},
    messages=[{"role": "user", "content": "Giải bài toán này"}],
)

for block in msg.content:
    if block.type == "thinking":
        print("💭", block.thinking)
    elif block.type == "text":
        print("📝", block.text)

🖥️ Claude Code

Claude Code là CLI coding assistant. Cách ổn định nhất để trỏ qua Woku là dùng biến môi trường ANTHROPIC_*.

Cài đặt nhanh bằng script (khuyên dùng)

Chạy 1 lệnh duy nhất — script sẽ tự hỏi API key và cấu hình mọi thứ cho bạn:

curl -fsSL https://api.wokushop.com/downloads/woku_claude_setup.sh | sh
irm https://api.wokushop.com/downloads/woku_claude_setup.ps1 | iex
powershell -Command "irm https://api.wokushop.com/downloads/woku_claude_setup.ps1 | iex"
Xong! Sau khi script chạy xong, khởi động lại Terminal rồi gõ claude để bắt đầu.

Cài đặt thủ công (nếu không dùng script)

npm install -g @anthropic-ai/claude-code

Cấu hình (khuyến nghị)

export ANTHROPIC_BASE_URL="https://llm.wokushop.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-api-key"

# Chạy Claude Code
claude
$env:ANTHROPIC_BASE_URL = "https://llm.wokushop.com"
$env:ANTHROPIC_AUTH_TOKEN  = "sk-your-api-key"
claude
set ANTHROPIC_BASE_URL=https://llm.wokushop.com
set ANTHROPIC_AUTH_TOKEN=sk-your-api-key
claude

Cấu hình bằng file (tuỳ bản hỗ trợ)

Một số bản Claude Code hỗ trợ load env từ file settings. Nếu bản bạn dùng không nhận, quay lại cách dùng biến môi trường ở trên.

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://llm.wokushop.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-api-key"
  }
}

Sử dụng nhanh

claude
claude "Explain Python decorators"

/status
/model
/help
💡 Tip Nếu bị yêu cầu đăng nhập tài khoản Claude, ưu tiên chạy bằng biến môi trường như trên và dùng token Woku. Một số bản/extension bọc ngoài có thể vẫn ép auth riêng.

🧩 OpenCode

Đã cập nhật theo docs mới Với API OpenAI-compatible tự custom như Woku Shop, flow đúng hiện tại là: /connectOther → tạo provider id riêng → cấu hình provider đó trong opencode.json.

Không nên hướng khách chọn trực tiếp OpenAI rồi đổi baseURL nữa. Cách bền nhất là tạo custom provider riêng cho Woku.

Cài đặt

# Cách nhanh nhất
curl -fsSL https://opencode.ai/install | bash

# Hoặc Homebrew
brew install anomalyco/tap/opencode
# Khuyên dùng: WSL để ổn định nhất
# Hoặc cài native trên Windows:
choco install opencode
# hoặc
scoop install opencode
# hoặc
npm install -g opencode-ai
OpenCode hiện khuyên dùng WSL trên Windows để có trải nghiệm và độ tương thích tốt hơn.

Cấu hình Woku Shop API

1

Thêm credential

Mở OpenCode, chạy /connect, kéo xuống Other rồi nhập provider id riêng (ví dụ: woku). Sau đó dán API key Woku của bạn.

opencode

/connect
💡 Provider id bạn nhập ở bước này phải khớp 100% với id trong file opencode.json ở bước dưới.
2

Tạo file cấu hình

Khuyên dùng: tạo file opencode.json ngay trong thư mục project. Nếu muốn dùng global cho mọi project, bạn có thể đặt ở ~/.config/opencode/opencode.json.

./opencode.json
~/.config/opencode/opencode.json

Dán nội dung sau vào file config:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "woku": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Woku Shop API",
      "options": {
        "baseURL": "https://llm.wokushop.com/v1"
      },
      "models": {
        "gpt-4o-mini": {
          "name": "GPT-4o Mini"
        },
        "gpt-4o": {
          "name": "GPT-4o"
        },
        "claude-sonnet-4-6": {
          "name": "Claude Sonnet 4.6"
        }
      }
    }
  },
  "model": "woku/claude-sonnet-4-6",
  "small_model": "woku/gpt-4o-mini"
}
3

Refresh danh sách model

Sau khi lưu config, chạy lệnh dưới đây để refresh cache model:

opencode models --refresh

Hoặc trong TUI bạn có thể dùng /models để xem model theo format provider/model.

4

Bắt đầu dùng

cd your-project-folder
opencode

/init

Lệnh /init sẽ để OpenCode phân tích project và tạo AGENTS.md.

Lỗi thường gặp

Triệu chứng Cách xử lý
Không thấy model Woku Kiểm tra provider id trong /connect có đúng là woku và trùng với key "woku" trong opencode.json. Sau đó chạy lại opencode models --refresh.
401 Unauthorized Chạy lại /connectOtherwoku, dán lại đúng key sk-....
Config không ăn Đảm bảo file nằm đúng chỗ: project root opencode.json hoặc global ~/.config/opencode/opencode.json.
Model gọi sai tên Dùng format provider/model, ví dụ: woku/claude-sonnet-4-6 hoặc woku/gpt-4o-mini.
Windows chạy lỗi vặt / thiếu tính năng Ưu tiên WSL để ổn định hơn so với chạy native.

⚡ Cursor

Lưu ý Cursor thay đổi UI rất nhanh theo phiên bản/gói. Một số bản có mục BYOK (custom API key/base URL), một số bản ẩn hoặc giới hạn. Hướng dẫn dưới đây là nguyên tắc cấu hình ổn định.

Nếu bản Cursor của bạn hỗ trợ custom OpenAI endpoint, hãy đặt như sau:

OpenAI API Keysk-your-api-key
OpenAI Base URLhttps://llm.wokushop.com/v1
Modelgpt-4o-mini / gpt-4o / claude-sonnet-4-6
Nếu bạn không thấy chỗ nhập Base URL trong Cursor: dùng Claude Code, OpenCode, Roo Code hoặc Kilo Code sẽ dễ và ổn định hơn.

Phím tắt thường dùng

Ctrl+LChat
Ctrl+IComposer
Ctrl+KInline edit
TabAccept suggestion

💻 Kilo Code / Roo Code

Hai extension này thường hỗ trợ kiểu cấu hình OpenAI-compatible. Tên mục trong UI có thể khác nhau (OpenAI Compatible / Custom OpenAI / OpenAI-like).

Cấu hình chuẩn (áp dụng cho cả hai)

Provider TypeOpenAI-compatible / Custom OpenAI
Base URLhttps://llm.wokushop.com/v1
API Keysk-your-api-key
Modelclaude-sonnet-4-6 (hoặc model khác bạn muốn)
✅ Mẹo dùng ổn định
  • Base URL phải có /v1
  • Không thêm dấu / cuối URL
  • Nếu lỗi model không tồn tại: đổi sang model alias đang bật trong token

Roo Code phím tắt (tham khảo)

TabChấp nhận
EscBỏ qua
Ctrl+Shift+IInline chat

🤖 Droid (Factory)

Lưu ý Droid/Factory cập nhật khá nhanh. Luôn ưu tiên copy lệnh cài mới nhất từ Factory docs/dashboard. Phần cấu hình dưới đây là nguyên tắc đúng để trỏ qua Woku.

Cấu hình kiểu Anthropic (khuyên dùng nếu app hỗ trợ)

{
  "apiProvider": "anthropic",
  "anthropicBaseUrl": "https://llm.wokushop.com",
  "anthropicApiKey": "sk-your-api-key",
  "anthropicModel": "claude-sonnet-4-6"
}

Cấu hình kiểu OpenAI-compatible

{
  "apiProvider": "generic-chat-completion-api",
  "genericChatCompletionApiBaseUrl": "https://llm.wokushop.com/v1",
  "genericChatCompletionApiKey": "sk-your-api-key",
  "genericChatCompletionApiModel": "claude-sonnet-4-6"
}
📌 Quy tắc Base URL
  • Anthropic protocol → https://llm.wokushop.com (không /v1)
  • OpenAI protocol → https://llm.wokushop.com/v1 (có /v1)

🦞 OpenClaw (Clawdbot)

OpenClaw (Clawdbot) là công cụ AI mạnh, có thể cấu hình để dùng model qua Woku Shop API.

⚠️ An toàn
  • Không dán API key vào group chat hoặc screenshot

A. Chuẩn bị

🌐Máy tính có Internet
🔑API key từ Woku Shop (dạng sk-...)

B. Cài đặt & Khởi tạo

⚡ Cài tự động (Khuyên dùng)

Dùng script tự động để cài đặt và cấu hình Woku cho OpenClaw. Script sẽ tự động hỏi API key của bạn:

curl -fsSL http://api.wokushop.com/downloads/install-woku-openclaw.sh | bash
irm http://api.wokushop.com/downloads/install-woku-openclaw.ps1 | iex

Script sẽ tự động cài Node.js (nếu chưa có), cài Clawdbot, hỏi API key và cấu hình hoàn chỉnh. Sau khi chạy xong, bạn có thể dùng ngay.

Hoặc cài thủ công theo các bước sau:

1

Cài Clawdbot

Mở cửa sổ gõ lệnh (Terminal), dán lệnh này rồi bấm Enter:

npm i -g clawdbot

Cần có Node.js. Nếu chưa có, tải tại nodejs.org

2

Khởi tạo lần đầu

Chạy tiếp lệnh này để tạo các file cấu hình mặc định:

clawdbot onboard
💡 Windows Nếu gõ openclaw mà báo không tìm thấy lệnh, hãy dùng clawdbot thay thế.

C. Cấu hình để dùng Woku Shop API

3

Sửa file cấu hình chính

Mở file này bằng bất kỳ trình soạn thảo nào (Notepad, VS Code...):

C:\Users\TenBan\.clawdbot\clawdbot.json

Thay TenBan bằng tên user Windows của bạn.

~/.clawdbot/clawdbot.json

Sửa đổi phần "models""auth" trong file thành nội dung dưới đây (giữ nguyên các phần khác như workspace...):

{
  "agents": {
    "defaults": {
      "models": {
        "api-woku-gpt/gpt-4o": { "alias": "GPT-4o" },
        "api-woku-claude/claude-sonnet-4-6": { "alias": "Claude Sonnet 4.6" },
        "api-woku-google/gemini-2.0-flash": { "alias": "Gemini 2.0 Flash" }
      },
      "model": { "primary": "api-woku-claude/claude-sonnet-4-6" }
    }
  },
  "auth": {
    "profiles": {
      "api-woku-gpt:default": { "provider": "api-woku-gpt", "mode": "api_key" },
      "api-woku-claude:default": { "provider": "api-woku-claude", "mode": "api_key" },
      "api-woku-google:default": { "provider": "api-woku-google", "mode": "api_key" }
    }
  },
  "models": {
    "mode": "merge",
    "providers": {
      "api-woku-gpt": {
        "baseUrl": "https://llm.wokushop.com/v1",
        "api": "openai-completions",
        "models": [
          { "id": "gpt-4o", "name": "GPT-4o", "contextWindow": 128000, "maxTokens": 8192 }
        ]
      },
      "api-woku-claude": {
        "baseUrl": "https://llm.wokushop.com",
        "api": "anthropic-messages",
        "models": [
          { "id": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6", "contextWindow": 200000, "maxTokens": 8192 }
        ]
      },
      "api-woku-google": {
        "baseUrl": "https://llm.wokushop.com",
        "api": "google-generative-ai",
        "models": [
          { "id": "gemini-2.0-flash", "name": "Gemini 2.0 Flash", "contextWindow": 1000000, "maxTokens": 8192 }
        ]
      }
    }
  }
}
4

Sửa file xác thực (dán API key)

Mở file này:

C:\Users\TenBan\.clawdbot\agents\main\agent\auth-profiles.json
~/.clawdbot/agents/main/agent/auth-profiles.json

Dán API key Woku của bạn vào file (thay sk-your-api-key bằng key thật):

{
  "version": 1,
  "profiles": {
    "api-woku-gpt:default": {
      "type": "api_key",
      "provider": "api-woku-gpt",
      "key": "sk-your-api-key"
    },
    "api-woku-claude:default": {
      "type": "api_key",
      "provider": "api-woku-claude",
      "key": "sk-your-api-key"
    },
    "api-woku-google:default": {
      "type": "api_key",
      "provider": "api-woku-google",
      "key": "sk-your-api-key"
    }
  },
  "lastGood": {
    "api-woku-gpt": "api-woku-gpt:default",
    "api-woku-claude": "api-woku-claude:default",
    "api-woku-google": "api-woku-google:default"
  }
}
💡 Lưu ý Cả 3 chỗ sk-your-api-key đều dán cùng 1 key Woku của bạn.
5

Kiểm tra cấu hình

Chạy lệnh này để kiểm tra mọi thứ đã đúng chưa:

clawdbot doctor

Nếu có lỗi, kiểm tra lại API key và nội dung 2 file config ở bước 3-4.

6

Khởi động & mở trang điều khiển

clawdbot gateway

Sau đó mở trình duyệt vào địa chỉ:

http://127.0.0.1:18789/

F. Sửa lỗi nhanh

Vấn đề Cách sửa
Không mở được trang điều khiển Mở trình duyệt → nhập http://127.0.0.1:18789/
Nếu vẫn không được, chạy lại: clawdbot onboarding
Dashboard hỏi mã mở khoá (token) Chạy lệnh này để lấy mã, rồi dán vào dashboard:
openclaw config get gateway.auth.token
Bot Telegram không trả lời
  • Bot token đúng chưa?
  • API key Woku còn tiền chưa?
  • Base URL đúng https://llm.wokushop.com/v1 chưa?
  • Model bạn chọn có tồn tại trong token không?
Quên file config ở đâu ~/.clawdbot/clawdbot.json
Windows: C:\Users\TenBan\.clawdbot\clawdbot.json
Muốn mở lại trang điều khiển clawdbot gateway rồi mở http://127.0.0.1:18789/

🧠 Codex (OpenAI)

Codex là CLI coding agent của OpenAI, cho phép bạn code trực tiếp từ Terminal. Hướng dẫn dưới đây giúp bạn cấu hình Codex để dùng model qua Woku Shop API.

⚠️ An toàn
  • Không dán API key vào group chat hoặc screenshot

A. Chuẩn bị

Yêu cầu Ghi chú
📦Node.js 22+Tải tại nodejs.org
📦npm 10+Đi kèm Node.js
🌐Kết nối Internet
🔑API key từ Woku Shop (dạng sk-...)
💡 Theo hệ điều hành
  • Windows 10/11: cần cài Git Bash trước
  • macOS 12+: có thể cài Node.js qua Homebrew (brew install node) hoặc tải trực tiếp
  • Linux (Ubuntu 20.04+, Debian 10+, CentOS 7+, Arch): dùng package manager tương ứng

B. Cài đặt Codex

1

Cài Codex CLI

Mở Terminal (hoặc Git Bash trên Windows), dán lệnh này rồi bấm Enter:

npm install -g @openai/codex
sudo npm install -g @openai/codex
2

Kiểm tra cài đặt

codex --version

Nếu hiện số phiên bản là cài thành công.

C. Tạo API Key

3

Tạo token trên Dashboard

Đăng nhập vào Dashboard Woku Shop và tạo token mới:

Nhóm token Chọn nhóm "codex" (nếu có) hoặc nhóm phù hợp với nhu cầu
Quota Chọn "Không giới hạn" (unlimited)
Giới hạn model Không giới hạn (để trống)

Sau khi tạo xong, copy token (dạng sk-...) và lưu lại.

D. Cấu hình để dùng Woku Shop API

Tạo thư mục .codex và 2 file cấu hình bên trong:

4

Tạo thư mục cấu hình

mkdir "%USERPROFILE%\.codex"

Thư mục sẽ nằm tại C:\Users\TenBan\.codex\

💡 Windows Nếu không thấy thư mục .codex trong File Explorer, bật "Show hidden items" trong View.
mkdir -p ~/.codex

Thư mục sẽ nằm tại ~/.codex/

5

Tạo file auth.json (dán API key)

Tạo file auth.json trong thư mục .codex với nội dung sau (thay sk-your-api-key bằng key thật):

C:\Users\TenBan\.codex\auth.json
~/.codex/auth.json
{
  "OPENAI_API_KEY": "sk-your-api-key"
}
6

Tạo file config.toml (cấu hình kết nối)

Tạo file config.toml trong cùng thư mục .codex:

C:\Users\TenBan\.codex\config.toml
~/.codex/config.toml
model_provider = "woku"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.woku]
name = "woku"
base_url = "https://llm.wokushop.com/v1"
wire_api = "responses"
💡 Giải thích cấu hình
  • model: Model sử dụng, khuyên dùng gpt-5-codex
  • model_reasoning_effort: 3 mức: "high" (mạnh nhất), "medium", "low" (nhanh nhất)
  • base_url: Trỏ về Woku Shop API (OpenAI protocol, có /v1)
  • wire_api: Giữ nguyên "responses"

E. Khởi chạy

7

Khởi động lại Terminal

Đóng hoàn toàn cửa sổ Terminal (hoặc Git Bash) rồi mở lại để load cấu hình mới.

8

Chạy Codex

Vào thư mục dự án của bạn rồi chạy:

cd your-project-folder
codex
Nếu Codex khởi động thành công và kết nối được API, bạn đã cấu hình xong!

F. Tích hợp VSCode

Ngoài CLI, bạn có thể dùng Codex trực tiếp trong VSCode:

1

Cài extension

Mở VSCode → Extensions (Ctrl+Shift+X) → tìm "codex" → bấm Install.

2

Sử dụng

Sau khi cài, Codex sẽ xuất hiện trong sidebar VSCode. Extension sẽ tự đọc cấu hình từ thư mục .codex đã tạo ở bước trên.

G. Xử lý lỗi thường gặp

Lỗi Nguyên nhân & Cách sửa
codex: command not found Chưa cài hoặc chưa restart Terminal. Chạy lại npm install -g @openai/codex rồi mở Terminal mới.
Lỗi xác thực / 401 Kiểm tra lại API key trong auth.json. Đảm bảo token đúng, quota unlimited, không giới hạn model.
Không kết nối được API Kiểm tra base_url trong config.toml phải là "https://llm.wokushop.com/v1" (có /v1).
Không thấy thư mục .codex Windows: bật "Show hidden items" trong File Explorer. macOS: bấm Cmd+Shift+. trong Finder.
⚠️ Lưu ý quan trọng
  • Không chia sẻ API key trong group chat hoặc screenshot
  • Thay "sk-your-api-key" bằng key thật từ Dashboard
  • Nếu gặp vấn đề, kiểm tra lại: token đúng, quota unlimited, không giới hạn model, đúng nhóm token

🎤 Audio Transcription API

API chuyển giọng nói thành văn bản (speech-to-text).

📌 Endpoint POST https://llm.wokushop.com/v1/audio/transcriptions

Headers

Authorization: Bearer sk-your-api-key
Content-Type: multipart/form-data

Tham số

Tham số Bắt buộc Mô tả
file File audio (mp3, wav, flac, m4a, mp4, ogg, webm...)
model whisper-1 hoặc model transcribe tương thích được bật trên hệ thống
language Mã ngôn ngữ ISO-639-1 (ví dụ vi, en, zh)
prompt Prompt hỗ trợ nhận dạng thuật ngữ / ngữ cảnh
response_format json, text, srt, vtt, verbose_json
temperature 0–1 (khuyên để 0 cho kết quả ổn định)

Ví dụ

curl https://llm.wokushop.com/v1/audio/transcriptions \
  -H "Authorization: Bearer sk-your-api-key" \
  -F "file=@/path/to/audio.mp3" \
  -F "model=whisper-1" \
  -F "language=vi" \
  -F "response_format=json"
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://llm.wokushop.com/v1"
)

with open("/path/to/audio.mp3", "rb") as f:
    transcript = client.audio.transcriptions.create(
        model="whisper-1",
        file=f,
        language="vi",
        response_format="json"
    )

print(transcript.text)
import fs from "fs";
import OpenAI from "openai";

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

const transcript = await client.audio.transcriptions.create({
  file: fs.createReadStream("/path/to/audio.mp3"),
  model: "whisper-1",
  language: "vi",
  response_format: "json",
});

console.log(transcript.text);

Response mẫu

{
  "text": "Đây là văn bản được chuyển đổi từ giọng nói."
}

📋 Models

Danh sách model thực tế Xem trực tiếp tại trang Pricing để biết model nào đang bật cho hệ thống/tài khoản của bạn.
👉 llm.wokushop.com/pricing

Model phổ biến

ProviderModelContextGợi ý dùng
OpenAIgpt-4o-mini128KRẻ / nhanh / coding nhẹ
OpenAIgpt-4o128KĐa dụng / vision
Anthropicclaude-haiku-4-5-20251001200KNhanh
Anthropicclaude-sonnet-4-6200KCân bằng / coding
Anthropicclaude-opus-4-5-20251101200KTask khó / phân tích sâu
Googlegemini-2.0-flash1MNhanh / context lớn

❓ FAQ

Woku Shop API khác gì API gốc?

Là lớp API tổng hợp/proxy giúp bạn dùng nhiều model trong cùng hệ thống, nạp tiền linh hoạt và vẫn giữ tương thích SDK phổ biến.

Sao lúc thì cần /v1, lúc thì không?

OpenAI-compatiblehttps://llm.wokushop.com/v1
Anthropic-compatiblehttps://llm.wokushop.com

Lỗi 401 Unauthorized?

Thường do API key sai / hết hiệu lực / copy thừa dấu cách. Tạo key mới và dán lại.

Lỗi quota / insufficient balance?

Nạp thêm ở Wallet hoặc đổi sang model rẻ hơn.

Dùng công cụ nào ổn nhất để code?

Nếu muốn ít lỗi nhất: Claude Code / OpenCode / Roo Code (OpenAI-compatible). Cursor thì phụ thuộc version/gói.

Liên hệ hỗ trợ?

Email: [email protected]