TexAPI VSCode Docs
Setup VSCode Extension in 3 steps
Trang này dành riêng cho extension IDE. Luôn dùng profile IDE Extension để khóa fallback đúng cách cho luồng traffic từ editor.
Profile
IDE Extension
Auto-safe routing profile for editor traffic.
Protocol
OpenAI-compatible
Use the same base URL and API key style as TexAPI docs.
Verification
1 smoke test
Run a quick request before sending large extension jobs.
Step 1. Create the correct API key profile
Vào trang API Keys và tạo key mới với profile IDE Extension (Auto Safe). Profile này ưu tiên nhóm token phù hợp extension và vẫn fallback nếu nhóm đầu bị chặn hoặc tạm lỗi.
Step 2. Configure your extension
With most OpenAI-compatible extensions, you only need the four fields below.
provider: OpenAI-compatible base_url: https://api.texapi.dev/v1 api_key: sk-tex-... model: claude-sonnet-4-5-20250929
Step 3. Run a quick verification
Before running bigger tasks from the extension, send one smoke test to confirm the key and model are healthy.
curl -X POST "https://api.texapi.dev/v1/chat/completions" \
-H "Authorization: Bearer sk-tex-..." \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5-20250929",
"messages": [{"role":"user","content":"Reply exactly: TEXAPI_OK"}]
}'Important behavior
These guardrails help the IDE profile stay predictable when you debug or scale.
- IDE Extension profile enables auto-safe routing with smart fallback across compatible groups.
- Bạn không cần biết token group nội bộ, chỉ cần dùng key TexAPI và model public trong `/v1/models`.
- Nếu muốn khóa một nhóm duy nhất để debug, gửi header `x-texapi-fallback-mode:strict`.