BazaarLinkBazaarLink
登入
BYOC · Bring Your Own Compute

把自己的算力接回自己的 API 入口
BYOC(自有算力)

模型跑在你管理的设备上,应用继续使用 BazaarLink 统一 API 入口。节点只服务绑定它的账户或组织,不是共享算力市场。

管理 BYOC 节点
一个请求会怎么走?
你的应用
model: "byoc/office-llm"
BazaarLink BYOC
转给你的节点
① 你的节点
你的 GPU 节点
模型费:零计价
② 备用(按你的设置)
BazaarLink 平台
账单:平台点数
你的应用照常发送请求,程序不用改。

示意动画。Agent 主动连出到 gateway,不需要开放对外端口;节点要先在“模型绑定”把 byoc/<slug> 对应到本机模型 ID。

客户机器 → BYOC Agent → BazaarLink gateway → 客户应用

模型和推理环境留在你的设备。Agent 连接 gateway,gateway 把所属账户的工作送回你的节点,应用继续使用一个 API 入口。

你的 GPU 算力

模型与推理留在你的设备

BazaarLink 模型

节点满载或离线时,可按你的备用设置接手(按平台费率)

BazaarLink BYOC

自己节点处理的流量,模型费零计价

单一 API key

同一个入口,程序不用改

你的应用程序

当前可接入的本地 backend

选择运行模型的本地 backend,并将连接设置提供给 Agent。

Ollama

默认 backend;默认 URL 是 http://localhost:11434。

LM Studio / vLLM

使用 --backend openai 与 --url,并填写本地 model ID。

llama.cpp server

使用 OpenAI-compatible streaming 路径,不自动转换模型名称。

为什么把算力接回自己的账户

模型在自己的设备上运行

模型文件、推理过程、硬件和本地环境由你管理。

这条 BYOC 流量模型费零计价

自己节点处理的流量,BazaarLink 不收模型费用;若同时使用网络搜索等平台功能,该功能按平台价格计费。设备、电力与运维成本仍由你承担。

应用只保留一套 API

本地模型通过 gateway 接入,产品代码不必为每个 backend 另写传输层。 节点目前接收 /v1/chat/completions、/v1/responses、/v1/messages 以及图片生成(/v1/images)的请求。

节点只服务自己的账户或组织

工作只会交给绑定账户或组织的节点,不加入共享算力池,也不是算力市场。

节点能处理的不只是聊天

图片生成

Agent 会把图片生成请求转给你 backend 的 /images/generations。

工具调用

tools 与 tool_choice 会转给你的 backend,tool_calls 以 OpenAI 格式返回(OpenAI-compatible 与 Ollama backend 都支持)。

推理内容

推理模型的思考内容会放在 reasoning_content 字段返回。

应用范围与备用

在「备用设置」页指定这个节点应用到哪些 BazaarLink API 密钥。节点满载、离线或出错时,请求会按备用顺序改试下一个来源;改由平台模型处理的请求按平台费率计费。

自有算力也能搜索网络

由你的节点处理的请求,一样可以加上 :online 先查网络再回答:搜索在平台端完成,结果连同问题一起交给你的节点。模型费零计价,只收搜索费(按平台价格),账户需有足够余额支付搜索费。

看网络搜索怎么用

Entry protection

You manage the local logs for BYOC; before a request reaches your GPU, the platform entry still applies moderation, and sensitive-data filtering is available as an opt-in.

Platform moderation

Platform moderation runs at the API entry (/v1/chat/completions, /v1/responses) before the request is processed; BYOC cannot disable it. Blocked requests do not reach your node.

Sensitive-data filtering you can enable

This is opt-in: organization keys use the organization rule, while personal keys are enabled by the key owner at /content-filter. Once enabled, inbound prompts replace API keys (OpenAI/Anthropic/GitHub/Google/AWS), JWTs, private keys, credit-card numbers, and Taiwan national ID numbers with [REDACTED:TYPE] before the node; prompt injection is blocked (403, code: content_filter).

Enable at /content-filter

从 GitHub 安装到连接

@bazaarlink/byoc-agent v0.2.0 采用 MIT 授权。现在可从公开 GitHub 全域安装 CLI,npm registry 版本稍后推出。 Authenticated 只代表 gateway 连接成功。接着打开 /keys/byok?tab=byoc,将像 byoc/<lowercase-slug> 这样的 canonical API ID 映射到本地 backend 实际接受的 model ID,之后用该 canonical ID 调用 API。

01

全域安装 CLI

从公开 GitHub 全域安装 MIT 授权的 CLI。

npm install -g github:Bazaarlinkorg/bazaarlink-byoc-agent
02

获取 BYOC key

还没有 key 时,用 register 提交账户 email。

bazaarlink-byoc register \
  --email you@example.com \
  --max-concurrent 4
03

登录 gateway

login 调用 /auth/byoc/login,并将 key 与短期 token 存到本地配置。

bazaarlink-byoc login \
  --key "byoc_..." \
  --gateway "https://byoc-gateway.bazaarlink.ai" \
  --input-price 0 \
  --output-price 0
04

启动并连接

Authenticated 只代表 gateway 连接成功。接着打开 /keys/byok?tab=byoc,将像 byoc/<lowercase-slug> 这样的 canonical API ID 映射到本地 backend 实际接受的 model ID,之后用该 canonical ID 调用 API。

bazaarlink-byoc start
# Authenticated only confirms the gateway connection.
# In /keys/byok?tab=byoc, map byoc/<lowercase-slug> to exact backend ID.

技术细节

以下字段对应当前 CLI 与套件 metadata;npm registry 版本推出前,请从公开 GitHub 安装。

npm 套件
@bazaarlink/byoc-agent v0.2.0 · MIT · 从 GitHub 安装,npm registry 版本稍后
原始码
github.com/Bazaarlinkorg/bazaarlink-byoc-agent
CLI
bazaarlink-byoc
运行环境
Node.js 18+
连接
Agent 主动 outbound 连接 gateway /ws,不需要 inbound port
本地配置
~/.bazaarlink/config.json
login 价格参数
--input-price 与 --output-price 目前必填;0 是兼容设置
从 GitHub 安装 CLI
npm install -g github:Bazaarlinkorg/bazaarlink-byoc-agent

CLI 现在可从公开 GitHub 全域安装;npm registry 版本稍后推出。

Ollama:登录并启动
bazaarlink-byoc login \
  --key "byoc_REPLACE_WITH_YOUR_KEY" \
  --gateway "https://byoc-gateway.bazaarlink.ai" \
  --input-price 0 \
  --output-price 0
bazaarlink-byoc start
# Authenticated only confirms the gateway connection.
# In /keys/byok?tab=byoc, map byoc/<lowercase-slug> to exact backend ID.

--backend ollama 是默认值;需要其他地址时再加 --ollama-url。

OpenAI-compatible:登录并启动
bazaarlink-byoc login \
  --key "byoc_REPLACE_WITH_YOUR_KEY" \
  --gateway "https://byoc-gateway.bazaarlink.ai" \
  --backend openai \
  --url "http://localhost:1234/v1" \
  --input-price 0 \
  --output-price 0
bazaarlink-byoc start
# Authenticated only confirms the gateway connection.
# In /keys/byok?tab=byoc, map byoc/<lowercase-slug> to exact backend ID.

LM Studio、vLLM、llama.cpp 使用 --backend openai;--url 必填。

适合哪些团队

你有 GPU 主机和本地模型,希望自己管理模型与推理环境,同时让产品继续使用熟悉的 API 入口。

你不想出租闲置算力,也不希望请求进入共享节点。BYOC 把你的设备、账户和 gateway 接在一条路径上。

接上第一台 BYOC 节点

准备一台本地模型机器和 BYOC key,验证自有算力、节点与统一 API 入口如何配合。

管理 BYOC 节点
客服
客服
您好!有什么可以协助?
请留下消息,我们会尽快回复。