Skip to main content

Authentication

Get an API Key and configure the E2B SDK for the Sandbox API.

The Sandbox API uses API Key authentication. Control-plane requests carry the Bailian API Key in the HTTP header:
Authorization: Bearer <your-api-key>
When using the E2B SDK, the SDK-required X-API-Key / api_key only satisfies the E2B protocol format; Bailian does not use it for business authentication. We recommend e2b_${ALIYUN_UID}.
E2B-compatible endpoints return response bodies close to the native E2B structure and are not wrapped in Bailian's unified Result<T> structure.

Get an API Key

  1. Open the Bailian console, sign in with your Alibaba Cloud account, and activate Bailian.
  2. Create and copy an API Key on the API Key page.
API Keys carry account-level permissions. Keep them secure and never share them publicly or commit them to a code repository.
Once configured, start with Create Instance.
Managed Agent API
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Security API
Framework Integration