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
The Inference APIs use API access keys for authentication, which are
2941
+
separate from the DigitalOcean OAuth tokens used by the control-plane API.
2942
+
2943
+
Include the key as a Bearer token in the `Authorization` header of each
2944
+
request. All requests must be made over HTTPS.
2945
+
2946
+
### Key Types
2947
+
2948
+
| API | Key Type | Key Pattern | How to Obtain |
2949
+
|-----|----------|-------------|---------------|
2950
+
| Serverless Inference | Model access key | `sk-do-*` (e.g., `sk-do-v1-abcd1234...`) | Generate in the [AI/ML section](https://cloud.digitalocean.com/gen-ai/inference/keys) of the DigitalOcean control panel |
2951
+
| Agent Inference | Endpoint access key | Alphanumeric string (e.g., `Abc1Def2Ghi3Jkl4...`) | Provided when provisioning an agent endpoint |
2952
+
2953
+
### Authenticate with a Bearer Authorization Header
2954
+
2955
+
**Serverless Inference:**
2956
+
2957
+
```
2958
+
curl -X POST -H "Authorization: Bearer $MODEL_ACCESS_KEY" "https://inference.do-ai.run/v1/chat/completions"
2959
+
```
2960
+
2961
+
**Agent Inference:**
2962
+
2963
+
```
2964
+
curl -X POST -H "Authorization: Bearer $AGENT_ACCESS_KEY" "https://{your-agent-url}.agents.do-ai.run/v1/chat/completions?agent=true"
2965
+
```
2966
+
2967
+
**Note:** These keys are not interchangeable with DigitalOcean OAuth
2968
+
tokens (`dop_v1_*`, `doo_v1_*`, `dor_v1_*`). OAuth tokens are used
2969
+
exclusively with the control-plane API at `https://api.digitalocean.com`.
0 commit comments