Developers / Choose your entry point

Build around
the work.

Start with model access, agent workflows or knowledge. Choose the integration path that fits your application.

Explore Swfte on GitHub ↗

In short:用于构建企业级 AI 应用程序的最强大 SDK。类型安全、完整文档、可用于生产。

INTEGRATION MAP / ILLUSTRATIVE
application → model access → response

Model access

Connect your application to model access. Start by reviewing routing, authentication and usage requirements.

Explore Connect

Follow the published reference.

Read the SDK examples and integration guidance alongside the product you intend to use.

Open the developer reference

Before your first integration

Agree the credential boundary, test inputs, failure handling and the usage you need to observe.

Discuss an integration
在线试用

交互式 API 演练场

使用实时代码示例和即时结果测试 API 调用。

agents.run()models.list()chat.complete()embeddings.create()workflows.execute()knowledge.query()analytics.track()files.upload()agents.run()models.list()chat.complete()embeddings.create()workflows.execute()knowledge.query()analytics.track()files.upload()
import { Swfte } from '@swfte/sdk';

// Initialize the client
const swfte = new Swfte({
  apiKey: process.env.SWFTE_API_KEY,
});

// Create an intelligent agent
const response = await swfte.agents.run({
  task: 'sentiment-analysis',
  data: {
    message: "Your product transformed our workflow!"
  }
});

console.log(response.sentiment); // "positive"
console.log(response.score);     // 0.95

您的引导式集成路径

通过我们的分步集成指南在几分钟内启动并运行。

npm install @swfte/sdk
步骤 1

安装 SDK

通过 npm 安装 Swfte SDK 开始。

import { Swfte } from '@swfte/sdk';

const swfte = new Swfte({
  apiKey: process.env.SWFTE_API_KEY,
});
步骤 2

初始化客户端

使用您的 API 凭据设置 Swfte 客户端。

const response = await swfte.agents.run({
  task: 'analyze',
  data: { text: 'Hello, world!' }
});

console.log(response.result);
步骤 3

开始构建

使用 SDK 运行代理并构建 AI 驱动的功能。

常见问题

我们为 TypeScript/JavaScript、Python、Go、Ruby 和 Java 提供原生 SDK。我们的 REST API 适用于任何可以发出 HTTP 请求的语言。

使用存储在环境变量中或直接传递给 SDK 的 API 密钥。我们支持用于企业 SSO 集成的 OAuth2,并提供安全的密钥轮换。

免费层:每分钟 100 个请求。专业版:每分钟 1,000 个请求。企业版:具有专用容量和突发处理的自定义限制。

SDK 提供了带有详细消息的类型化错误类。所有错误都包含用于调试和支持的请求 ID。我们还提供带有指数退避的自动重试。

是的!所有 SDK 都支持服务器发送事件 (SSE) 以进行实时流式传输。您可以在生成令牌时接收它们以实现响应式 UI。

准备好开始构建了吗?

获取您的 API 密钥并在几分钟内开始构建。

Deploy a model with Swfte Connect

One gateway, every provider, per-token cost visibility. Swap models without touching your code.