Skip to content

Commit 64b3a2f

Browse files
authored
docs (issue #1028): update API docs with additional endpoints (#1029)
1 parent 43e6c7d commit 64b3a2f

File tree

5 files changed

+549
-18
lines changed

5 files changed

+549
-18
lines changed

src/content/Docs/api-documentation/getting-started/index.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
---
22
categories: ["API Documentation"]
3-
tags: ["SDK", "API", "Integration", "Documentation"]
3+
tags: ["SDK", "API", "REST API", "Integration", "Documentation"]
44
weight: 1
55
title: "API Documentation"
66
linkTitle: "Getting Started"
77
description: "Integrate Akash Network into your applications with SDKs and APIs"
88
---
99

10-
**Programmatic access to Akash Network with blockchain SDKs or credit card REST APIs.**
10+
**Programmatic access to Akash Network with blockchain SDKs, deployment REST APIs, or public data endpoints.**
1111

1212
Choose your integration method:
13-
- **SDK** - Full blockchain integration with AKT/USDC payments
14-
- **Console API** - Simple REST API with credit card payments
13+
- **Akash Blockchain SDK** - Full blockchain integration with AKT/USDC payments
14+
- **Akash Deployment REST API** - Simple REST API with credit card payments
15+
- **Akash REST API** - Public endpoints for querying providers and GPU availability
1516

1617
---
1718

18-
## SDKs
19+
## Akash Blockchain SDK
1920

2021
Build deployment and provider management capabilities directly into your applications:
2122

@@ -25,41 +26,57 @@ Build deployment and provider management capabilities directly into your applica
2526
- **[API Reference](/docs/api-documentation/sdk/api-reference)** - Complete SDK documentation
2627
- **[Examples](/docs/api-documentation/sdk/examples)** - Code examples for common tasks
2728

28-
## Console API
29+
## Akash Deployment REST API
2930

3031
Deploy to Akash using credit cards instead of crypto:
3132

3233
- **[Managed Wallet API](/docs/api-documentation/console-api)** - REST API for credit card deployments via Console
3334
- No wallet management required - Console handles the blockchain layer
3435
- Pay with credit card instead of AKT or USDC
3536

37+
## Akash REST API
38+
39+
Query Akash Network data without authentication:
40+
41+
- **[REST API Overview](/docs/api-documentation/rest-api)** - Public endpoints for network data
42+
- **[Providers API](/docs/api-documentation/rest-api/providers-api)** - List and query provider details, hardware specs, and availability
43+
- **[GPU Availability Guide](/docs/api-documentation/rest-api/gpu-availability-guide)** - Find GPU resources across the network
44+
3645
---
3746

3847
## Use Cases
3948

40-
### When to Use SDKs
49+
### When to Use Akash Blockchain SDK
4150
- Full blockchain integration with your own wallet
4251
- Pay with AKT or USDC cryptocurrency
4352
- Build deployment automation tools
4453
- Create custom deployment workflows
4554
- Build provider management dashboards
4655
- Develop monitoring and analytics tools
4756

48-
### When to Use Console API
57+
### When to Use Akash Deployment REST API
4958
- Accept credit card payments for deployments
5059
- Deploy without managing wallets or crypto
5160
- Build SaaS platforms that need simple payments
5261
- Create user-friendly deployment interfaces
5362
- Offer Akash deployments to non-crypto users
5463

64+
### When to Use Akash REST API
65+
- Query provider availability, hardware specs, and GPU models
66+
- Build network dashboards and analytics tools
67+
- Monitor provider uptime and capacity
68+
- Find GPU resources for your workloads
69+
- No authentication or payment setup needed
70+
5571
---
5672

5773
## Getting Started
5874

5975
**Choose your integration method:**
6076

61-
- **Blockchain integration?**[Use the SDK](/docs/api-documentation/sdk) - Pay with AKT/USDC, manage your own wallet
62-
- **Credit card payments?**[Use the Console API](/docs/api-documentation/console-api) - No wallet needed, pay with credit card
77+
- **Blockchain integration?**[Use the Blockchain SDK](/docs/api-documentation/sdk) - Pay with AKT/USDC, manage your own wallet
78+
- **Credit card payments?**[Use the Deployment REST API](/docs/api-documentation/console-api) - No wallet needed, pay with credit card
79+
- **Query network data?**[Use the REST API](/docs/api-documentation/rest-api) - Public endpoints, no authentication required
6380

6481
**Need help?**
6582

@@ -78,4 +95,3 @@ Deploy to Akash using credit cards instead of crypto:
7895
---
7996

8097
**Questions?** Join [Discord](https://discord.akash.network) #developers channel!
81-
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
---
2+
categories: ["API Documentation", "REST API"]
3+
tags: ["REST API", "GPU", "Providers", "Guide"]
4+
weight: 2
5+
title: "GPU Availability Guide"
6+
linkTitle: "GPU Availability"
7+
description: "How to find and filter GPU resources across Akash Network providers"
8+
---
9+
10+
GPU availability data is embedded in provider responses — there is no standalone GPU endpoint. This guide shows how to query providers and filter for specific GPU resources using the [Providers API](/docs/api-documentation/rest-api/providers-api).
11+
12+
Base URL: `https://console-api.akash.network`
13+
14+
---
15+
16+
## Finding GPU Providers
17+
18+
### Step 1: Fetch All Providers
19+
20+
```bash
21+
curl https://console-api.akash.network/v1/providers
22+
```
23+
24+
Each provider in the response includes a `gpuModels` array:
25+
26+
```json
27+
{
28+
"owner": "akash1u5cdg7k3gl43mukca4aeultuz8x2j68mgwn28e",
29+
"isOnline": true,
30+
"gpuModels": [
31+
{
32+
"vendor": "nvidia",
33+
"model": "rtx4060ti",
34+
"ram": "16Gi",
35+
"interface": "PCIe"
36+
}
37+
],
38+
"stats": {
39+
"gpu": { "active": 0, "available": 1, "pending": 0, "total": 1 }
40+
}
41+
}
42+
```
43+
44+
### Step 2: Filter for Online Providers with GPUs
45+
46+
```javascript
47+
const response = await fetch("https://console-api.akash.network/v1/providers");
48+
const providers = await response.json();
49+
50+
const gpuProviders = providers.filter(
51+
(p) => p.isOnline && p.gpuModels.length > 0
52+
);
53+
```
54+
55+
### Step 3: Filter by GPU Vendor
56+
57+
```javascript
58+
const nvidiaProviders = gpuProviders.filter((p) =>
59+
p.gpuModels.some((gpu) => gpu.vendor === "nvidia")
60+
);
61+
```
62+
63+
### Step 4: Filter by Specific GPU Model
64+
65+
```javascript
66+
const t4Providers = gpuProviders.filter((p) =>
67+
p.gpuModels.some((gpu) => gpu.model === "t4")
68+
);
69+
```
70+
71+
### Step 5: Filter by GPU Memory
72+
73+
```javascript
74+
const highMemProviders = gpuProviders.filter((p) =>
75+
p.gpuModels.some((gpu) => gpu.ram === "80Gi")
76+
);
77+
```
78+
79+
---
80+
81+
## Checking GPU Availability
82+
83+
The `stats.gpu` field on each provider shows real-time GPU capacity:
84+
85+
| Field | Description |
86+
|-------|-------------|
87+
| `stats.gpu.total` | Total GPU units on the provider |
88+
| `stats.gpu.active` | Currently leased GPUs |
89+
| `stats.gpu.available` | GPUs available for new deployments |
90+
| `stats.gpu.pending` | GPUs in pending state |
91+
92+
Filter for providers with available GPUs:
93+
94+
```javascript
95+
const availableGpuProviders = gpuProviders.filter(
96+
(p) => p.stats.gpu.available > 0
97+
);
98+
```
99+
100+
---
101+
102+
## Complete Example
103+
104+
This script finds all online providers with available NVIDIA GPUs and prints their details:
105+
106+
```javascript
107+
async function findAvailableGpuProviders(vendor, model) {
108+
const response = await fetch("https://console-api.akash.network/v1/providers");
109+
const providers = await response.json();
110+
111+
return providers
112+
.filter((p) => {
113+
if (!p.isOnline || p.gpuModels.length === 0) return false;
114+
if (p.stats.gpu.available === 0) return false;
115+
116+
return p.gpuModels.some((gpu) => {
117+
const vendorMatch = !vendor || gpu.vendor === vendor;
118+
const modelMatch = !model || gpu.model === model;
119+
return vendorMatch && modelMatch;
120+
});
121+
})
122+
.map((p) => ({
123+
owner: p.owner,
124+
hostUri: p.hostUri,
125+
gpuModels: p.gpuModels,
126+
availableGpus: p.stats.gpu.available,
127+
totalGpus: p.stats.gpu.total,
128+
}));
129+
}
130+
131+
// Find all providers with available NVIDIA GPUs
132+
const providers = await findAvailableGpuProviders("nvidia");
133+
console.log(`Found ${providers.length} providers with available NVIDIA GPUs:`);
134+
providers.forEach((p) => {
135+
console.log(` ${p.owner}${p.availableGpus}/${p.totalGpus} GPUs available`);
136+
p.gpuModels.forEach((gpu) => {
137+
console.log(` ${gpu.vendor} ${gpu.model} (${gpu.ram}, ${gpu.interface})`);
138+
});
139+
});
140+
141+
// Find providers with available T4 GPUs specifically
142+
const t4Providers = await findAvailableGpuProviders("nvidia", "t4");
143+
console.log(`\nFound ${t4Providers.length} providers with available T4 GPUs`);
144+
```
145+
146+
---
147+
148+
## GPU Model Fields Reference
149+
150+
Each entry in the `gpuModels` array contains:
151+
152+
| Field | Type | Description | Examples |
153+
|-------|------|-------------|----------|
154+
| `vendor` | string | GPU manufacturer | `"nvidia"` |
155+
| `model` | string | GPU model identifier | `"rtx4060ti"`, `"t4"`, `"a100"`, `"h100"` |
156+
| `ram` | string | GPU memory | `"16Gi"`, `"40Gi"`, `"80Gi"` |
157+
| `interface` | string | Connection interface | `"PCIe"`, `"SXM"` |
158+
159+
---
160+
161+
**See also:** [Providers API Reference](/docs/api-documentation/rest-api/providers-api) for the complete provider response schema.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
categories: ["API Documentation", "REST API"]
3+
tags: ["REST API", "Providers", "GPU", "Public API"]
4+
weight: 4
5+
title: "Akash REST API"
6+
linkTitle: "Akash REST API"
7+
description: "Public REST API endpoints for querying Akash Network data including providers and GPU availability"
8+
---
9+
10+
**Public, read-only endpoints for querying Akash Network data. No authentication required.**
11+
12+
Base URL: `https://console-api.akash.network`
13+
14+
---
15+
16+
## Available Endpoints
17+
18+
### Providers
19+
20+
Query provider details, hardware specs, GPU models, and availability:
21+
22+
- **[Providers API Reference](/docs/api-documentation/rest-api/providers-api)**`GET /v1/providers` and `GET /v1/providers/{address}`
23+
- **[GPU Availability Guide](/docs/api-documentation/rest-api/gpu-availability-guide)** — Find and filter GPU resources across the network
24+
25+
---
26+
27+
## Quick Example
28+
29+
List all providers on the network:
30+
31+
```bash
32+
curl https://console-api.akash.network/v1/providers
33+
```
34+
35+
Get details for a specific provider:
36+
37+
```bash
38+
curl https://console-api.akash.network/v1/providers/akash1u5cdg7k3gl43mukca4aeultuz8x2j68mgwn28e
39+
```
40+
41+
---
42+
43+
## Key Features
44+
45+
- **No authentication** — All endpoints are public and read-only
46+
- **JSON responses** — Standard REST API returning JSON
47+
- **Provider data** — Hardware specs, GPU models, uptime, location, and real-time capacity
48+
- **Network statistics** — Active/available/pending resources across the network
49+
50+
---
51+
52+
**Questions?** Join [Discord](https://discord.akash.network) #developers channel!

0 commit comments

Comments
 (0)