Skip to content

Commit 5cda308

Browse files
authored
Restructure Inference section (#1151)
* Restructure Inference section * fix lint * added 200 response
1 parent f8682fa commit 5cda308

10 files changed

+378
-30
lines changed

specification/DigitalOcean-public.v2.yaml

Lines changed: 128 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ openapi: "3.0.0"
33
info:
44
title: DigitalOcean API
55
version: "2.0"
6-
description:
7-
$ref: "description.yml#/introduction"
6+
description: ""
87

98
license:
109
name: Apache 2.0
@@ -19,6 +18,12 @@ servers:
1918
description: production
2019

2120
tags:
21+
- name: Public APIs Introduction
22+
x-displayName: Introduction
23+
x-traitTag: true
24+
description:
25+
$ref: "description.yml#/introduction"
26+
2227
- name: 1-Click Applications
2328
description: |-
2429
1-Click applications are pre-built Droplet images or Kubernetes apps with software,
@@ -55,15 +60,6 @@ tags:
5560
The Add-Ons API allows you to manage these resources, including creating, listing, and retrieving
5661
details about specific add-on resources.
5762
58-
- name: Agent Inference
59-
description: |-
60-
DigitalOcean Gradient™ AI Agentic Cloud allows you to create multi-agent workflows
61-
to power your AI applications. This allows developers to integrate agents into your
62-
AI applications.
63-
64-
**Note:** The Agent Inference API uses a customer-specific base URL (the agent endpoint)
65-
and is independent of the main DigitalOcean control-plane API (`https://api.digitalocean.com`).
66-
6763
- name: Apps
6864
description: |-
6965
App Platform is a Platform-as-a-Service (PaaS) offering from DigitalOcean that allows
@@ -534,14 +530,6 @@ tags:
534530
description: |-
535531
Security CSPM endpoints for scans, scan findings, and settings.
536532
537-
- name: Serverless Inference
538-
description: |-
539-
DigitalOcean Gradient™ AI Agentic Cloud allows access to serverless inference models.
540-
You can access models by providing an inference key.
541-
542-
**Note:** The Serverless Inference API uses a separate base URL (`https://inference.do-ai.run`)
543-
and is independent of the main DigitalOcean control-plane API (`https://api.digitalocean.com`).
544-
545533
- name: Sizes
546534
description: |-
547535
The sizes objects represent different packages of hardware resources that
@@ -616,6 +604,90 @@ tags:
616604
list, and delete custom VPCs as well as retrieve information about the
617605
resources assigned to them.
618606
607+
- name: Inference Introduction
608+
x-displayName: Introduction
609+
x-traitTag: true
610+
description:
611+
$ref: "inference_description.yml#/introduction"
612+
613+
614+
- name: Serverless Inference
615+
description: |-
616+
DigitalOcean Gradient™ AI Agentic Cloud allows access to serverless inference models.
617+
You can access models by providing an inference key.
618+
619+
**Note:** The Serverless Inference API uses a separate base URL (`https://inference.do-ai.run`)
620+
and is independent of the main DigitalOcean control-plane API (`https://api.digitalocean.com`).
621+
622+
- name: Agent Inference
623+
description: |-
624+
DigitalOcean Gradient™ AI Agentic Cloud allows you to create multi-agent workflows
625+
to power your AI applications. This allows developers to integrate agents into your
626+
AI applications.
627+
628+
**Note:** The Agent Inference API uses a customer-specific base URL (the agent endpoint)
629+
and is independent of the main DigitalOcean control-plane API (`https://api.digitalocean.com`).
630+
631+
x-tagGroups:
632+
- name: Public APIs
633+
tags:
634+
- Public APIs Introduction
635+
- 1-Click Applications
636+
- Account
637+
- Actions
638+
- Add-Ons
639+
- Apps
640+
- Billing
641+
- Block Storage
642+
- Block Storage Actions
643+
- BYOIP Prefixes
644+
- CDN Endpoints
645+
- Certificates
646+
- Container Registry
647+
- Container Registries
648+
- Databases
649+
- Dedicated Inference
650+
- Domain Records
651+
- Domains
652+
- Droplet Actions
653+
- Droplets
654+
- Droplet Autoscale Pools
655+
- Firewalls
656+
- Floating IP Actions
657+
- Floating IPs
658+
- Functions
659+
- GradientAI Platform
660+
- Image Actions
661+
- Images
662+
- Kubernetes
663+
- Load Balancers
664+
- Monitoring
665+
- NFS
666+
- NFS Actions
667+
- Partner Network Connect
668+
- Project Resources
669+
- Projects
670+
- Regions
671+
- Reserved IP Actions
672+
- Reserved IPs
673+
- Reserved IPv6
674+
- Reserved IPv6 Actions
675+
- Security
676+
- Sizes
677+
- Snapshots
678+
- Spaces Keys
679+
- SSH Keys
680+
- Tags
681+
- Uptime
682+
- VPC NAT Gateways
683+
- VPC Peerings
684+
- VPCs
685+
- name: Inference APIs
686+
tags:
687+
- Inference Introduction
688+
- Agent Inference
689+
- Serverless Inference
690+
619691
paths:
620692
/v2/1-clicks:
621693
get:
@@ -2859,5 +2931,42 @@ components:
28592931
curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT"
28602932
```
28612933
2934+
inference_bearer_auth:
2935+
type: http
2936+
scheme: bearer
2937+
description: |
2938+
## Inference API Authentication
2939+
2940+
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`.
2970+
28622971
security:
28632972
- bearer_auth: []

specification/description.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
introduction: |
2-
# Introduction
3-
42
The DigitalOcean API allows you to manage Droplets and resources within the
53
DigitalOcean cloud in a simple, programmatic way using conventional HTTP requests.
64

0 commit comments

Comments
 (0)