You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: make README public-facing for CN and BytePlus
## Summary
- rewrite the README for public SDK users
- document Volcengine China and BytePlus client initialization
- organize supported examples under examples/cn and examples/byteplus
- use regional Chat, Responses, embedding, image, and video model IDs
- remove retired Seededit image-edit examples
- omit BytePlus text-only embedding examples, including batch variants, because BytePlus has no model for that endpoint
- correct BytePlus IAM comments and environment variable names
- keep MCP in both clouds and other hosted built-in tools CN-only with explicit beta headers
- add usage and manual migration guidance without internal roadmap language
## Regional model defaults
- Responses and Chat: doubao-seed-2-1-pro-260628 / seed-2-0-lite-260428
- Multimodal and sparse embeddings: doubao-embedding-vision-251215 / skylark-embedding-vision-251215
- Image: doubao-seedream-5-0-pro-260628 / dola-seedream-5-0-pro-260628
- Video: doubao-seedance-2-0-fast-260128 / dreamina-seedance-2-0-fast-260128
## Validation
- Python compileall across all regional examples after rebasing onto the latest generated SDK branch
- verified no BytePlus text-only embedding call remains
- documentation model, link, and whitespace checks
See merge request: !81
Sync-Source-Commit: de8e67c2cb82d4cf53f484ce45a65349304479a4
Hand-Written-Reason: Hand-written public documentation and regional examples update; not produced by ark-apis generation.
Release-Version: 0.4.0
Copy file name to clipboardExpand all lines: README.md
+54-57Lines changed: 54 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,46 +1,71 @@
1
1
# Ark Runtime Python SDK
2
2
3
-
The official Python library for the Volcengine Ark runtime API. It provides convenient access to the Ark REST API from any Python 3.8+ application, with both synchronous and asynchronous clients.
3
+
The official Python library for accessing ModelArk on Volcengine and BytePlus. It provides synchronous and asynchronous clients, typed models, streaming, authentication, retries, and timeout configuration.
4
4
5
5
## Installation
6
6
7
7
```bash
8
8
pip install arkruntime
9
9
```
10
10
11
-
## Usage
11
+
## Choose Volcengine or BytePlus
12
+
13
+
Set `ARK_API_KEY`, then choose the client factory for the service you use. The factory configures the correct base URL and region; request construction and all subsequent SDK calls are the same.
12
14
13
-
Create a client by setting the `ARK_API_KEY` environment variable:
15
+
### Volcengine (China)
14
16
15
17
```python
16
18
from arkruntime import Ark
17
19
18
-
client = Ark()
19
-
# or explicitly: Ark(api_key="your-api-key")
20
+
client = Ark.volc()
21
+
# or explicitly: Ark.volc(api_key="your-api-key")
20
22
```
21
23
24
+
### BytePlus (BP)
25
+
26
+
```python
27
+
from arkruntime import Ark
28
+
29
+
client = Ark.byteplus()
30
+
# or explicitly: Ark.byteplus(api_key="your-api-key")
31
+
```
32
+
33
+
Use a model ID available in the corresponding Volcengine or BytePlus account. Model IDs can differ between the two services; the examples use `doubao-seed-2-1-pro-260628` for Volcengine and `seed-2-0-lite-260428` for BytePlus. Override either default with `ARK_MODEL`.
34
+
35
+
The async client provides the same factories: `AsyncArk.volc()` and `AsyncArk.byteplus()`.
See the [examples/](./examples) directory for runnable scripts:
316
314
317
-
A pre-commit hook runs the same linting as CI:
315
+
-`volc/` -- Volcengine China examples for Chat, Responses, images, video generation, embeddings, files, tokenization, batch APIs, and resource APIs
316
+
-`byteplus/` -- supported BytePlus counterparts using the BytePlus client and regional model IDs
318
317
319
-
```bash
320
-
uv run pre-commit install # one-time setup
321
-
```
318
+
MCP examples are provided for both clouds and explicitly send `ark-beta-mcp: true`. Other built-in-tool examples are CN-only and show their required beta headers.
0 commit comments