SDK (TypeScript / Python)
TypeScript SDK 0.7.0 is on npm. Install withnpm install @wellbyte/sdk(current release@wellbyte/sdk@0.7.0, npm). The Python client is on PyPI:pip install wellbyte(current releasewellbyte==0.7.0).
The official Python client covers /v1 sync calls, Jobs, and Catalog. WellbyteClient sends Authorization: Bearer <api_key> on every request. The default User-Agent is wellbyte-sdk-py/0.7.0. HTTP 202 auto-polls to a terminal status.
Install
pip install wellbyte==0.7.0
npm install @wellbyte/sdk@0.7.0
Python
from wellbyte import WellbyteClient
with WellbyteClient(api_key="dg_live_xxx", base_url="https://api.wellbyte.net") as client:
# Authorization: Bearer dg_live_xxx
# User-Agent: wellbyte-sdk-py/0.7.0
note = client.call("/v1/xiaohongshu/note/detail", {"note_id": "demo_note_ok"})
print(note)
job = client.create_job({
"endpoint": "xiaohongshu.note.detail",
"params": [{"note_id": "demo_note_ok"}],
})
print(job)
Those calls send:
Authorization: Bearer dg_live_xxx
User-Agent: wellbyte-sdk-py/0.7.0
Accept: application/json
202 behavior
An oversized sync request can return 202 + job_id. The SDK polls GET /v1/jobs/{id} until a terminal status: succeeded, partial, failed, canceled, expired, or rejected. Set auto_poll=False to keep the raw 202 envelope.
Without the SDK
Use WellbyteClient after pip install. For a one-off HTTP call:
curl -s 'https://api.wellbyte.net/v1/xiaohongshu/note/detail?note_id=demo_note_ok' \
-H "Authorization: Bearer dg_live_YOUR_KEY" \
-H "Accept: application/json"
TypeScript
import { WellbyteClient } from "@wellbyte/sdk";
const client = new WellbyteClient({
apiKey: "dg_live_xxx",
baseUrl: "https://api.wellbyte.net",
});
// Authorization: Bearer dg_live_xxx
// User-Agent: wellbyte-sdk-ts/0.7.0
const note = await client.call("/v1/xiaohongshu/note/detail", {
note_id: "demo_note_ok",
});
console.log(note);
const job = await client.jobs.create({
endpoint: "xiaohongshu.note.detail",
params: [{ note_id: "demo_note_ok" }],
});
console.log(job);
Those calls send:
Authorization: Bearer dg_live_xxx
User-Agent: wellbyte-sdk-ts/0.7.0
Accept: application/json