Chuyển đến nội dung

Giới Thiệu

Imbrace SDK là client chính thức cho Imbrace Gateway, có sẵn cho cả TypeScriptPython. Cả hai SDK đều wrap cùng một Gateway API với cùng resource namespaces, cùng auth model, và cùng retry/error semantics — chọn ngôn ngữ phù hợp với stack của bạn.

Chuyển đổi tab ngôn ngữ ở bất kỳ đâu trên trang web này một lần và phần còn lại sẽ ghi nhớ lựa chọn của bạn.

Tính Năng Nổi Bật

Tính năngChi tiết
Type safetyTypeScript types và Python type hints trên mọi resource
Hai loại credentialapiKey hoặc accessToken — xem Xác Thực
Auto retry429 và 5xx retry với exponential backoff, không cần cấu hình
Streaming AISSE / async iterator cho streamChat và AI completions
Async & sync (Py)ImbraceClient (sync) và AsyncImbraceClient (async)
Cancellation (TS)AbortSignal propagation để hủy request đang chạy

Cài Đặt

Terminal window
npm install @imbrace/sdk

Hello, world

import { ImbraceClient } from "@imbrace/sdk"
const client = new ImbraceClient({ accessToken: "acc_your_token" })
const me = await client.platform.getMe()

Các Resource Có Sẵn

Mọi namespace đều có trên cả hai SDK. Các method theo quy ước ngôn ngữ — client.aiAgent.streamChat() trong TS, client.ai_agent.stream_chat() trong Python.

NamespaceMục đích
client.aiAgent / client.ai_agentStreaming AI chat, embeddings, parquet, chat-client sub-API
client.chatAi / client.chat_aiAssistant CRUD (create/update/delete/list assistants)
client.activepiecesWorkflow automation — flows, triggers, runs
client.boardsCRM boards — CRUD, items, fields, search, segments, CSV; KH folders & files
client.platformUsers, organizations, permissions
client.contacts, client.conversations, client.messages, client.channelContact / channel layer
client.aiOpenAI-compatible completions and embeddings

Để xem danh sách đầy đủ và tham chiếu method, xem Resources.

Khi Nào Chọn Credential Nào

API KeyAccess Token
Imbrace đóng vai trò gì?Một tính năng trong backend của bạnImbrace LÀ backend của bạn
User của ai?Của bạnCủa Imbrace
Dùng tốt nhất choServer-to-server, internal scripts, CRM integrationsUser-facing apps nơi mỗi end-user đăng nhập

Xem chi tiết: Xác Thực →.

Bước Tiếp Theo