doctl serverless inference endpoints support
Introduced 2026-06-03 · score 0.91
HOW TO USE IT
When developing or testing code that needs model inference, use doctl’s serverless inference commands to call the endpoint. For a chat prompt, run `doctl inference chat-completions create` with a model and message, or provide a full JSON request.
doctl inference chat-completions create --model <model-id> --message "<message>"WHY THIS HELPS
Call a serverless inference endpoint while developing or testing code with doctl.
REQUIREMENTS AND LIMITATIONS
- Version: v1.160.1
- --model (required): Model ID; required unless `--request` is set. `-m` is an alias.
- --message (required): User message; required unless `--request` is set.
- --request: Path to a JSON request body; use `-` for stdin. When set, `--model` and `--message` are not required.
- --stream: Stream output using server-sent events.
- --access-token (required): Inference credential: a Model Access Key or a DigitalOcean PAT with full access scope.
- Prerequisite: Authenticate with `--access-token` using a Gradient Model Access Key or a DigitalOcean PAT with full access; limited scopes do not work for serverless inference.
- Inference APIs require a DigitalOcean PAT with full access scope or a Gradient Model Access Key; a limited-scope PAT results in 401 for inference calls.
- Docs conflict: The current DigitalOcean CLI reference documents `doctl serverless-inference`; the v1.160.1 source documents `doctl inference` and shows the chat-completions invocation. The current reference is generated from doctl v2.0.0, so its command naming is newer than the card version.
FIRST-PARTY EVIDENCE
- https://github.com/digitalocean/doctl/releases/tag/v1.160.1
- https://github.com/digitalocean/doctl/pull/1846
- https://github.com/digitalocean/doctl/blob/v1.160.1/commands/serverless_inference.go
Check the installed version and the source before using it. Entry JSON