This directory contains detailed usage and migration guidance for the Ark Runtime Java SDK.
- Usage guide: dependency setup, regional clients, generated request models, streaming, and built-in tools.
- Migration guide: migrate from either legacy Volcengine or BytePlus Java SDK.
../examples/volc: runnable Volcengine examples.../examples/byteplus: runnable BytePlus examples.
- Use
ArkService.volc()for CN orArkService.byteplus()for BytePlus. Only client creation and regional model identifiers differ; request setup stays the same. - Read
ARK_API_KEYfrom the environment. Never insert credentials into source, build files, fixtures, logs, or generated patches. - Build requests with classes under
com.volcengine.ark.runtime.models. Respect generated union factories such asResponsesInput.ofString. - Responses streams contain typed event subclasses. Handle the subclasses the application needs and tolerate additional event types.
- MCP is supported in CN and BytePlus. Other hosted built-in tools shown in
this repository are CN-only. Pass the matching
ark-beta-*header to both streaming and non-streaming requests. - Call
shutdownExecutor()when an application owns the service lifecycle.
mvn test
mvn checkstyle:checkAlso run one streaming and one non-streaming request in the selected cloud. Smoke-test each built-in tool separately to validate its entitlement and beta header.