API Spec
Welcome to the Yotta Platform API documentation.
Overview
This API is your gateway to building, scaling, and automating AI workloads on Yotta’s distributed GPU cloud. With just a few API calls, you can spin up compute Pods, query available GPUs, and orchestrate high-performance training or inference workloads seamlessly across regions.
🌐 Base URL
All API requests are made over HTTPS.
https://api.yottalabs.aiYotta Platform APIs follow RESTful conventions and return JSON-encoded responses. Requests sent over insecure HTTP will be rejected.
🔐 Authentication
Yotta Platform uses API Key-based authentication. You can create and manage your keys from the Access Keys Settings. On Yotta Console, go to Settings -> Access Keys, Copy the API Keys.
Every request must include the following header:
x-api-key: <YOUR_API_KEY>Replace <YOUR_API_KEY> with your real key. Keep it private — do NOT share or embed it in client-side code.
🧭 Global Response Format
All endpoints return a consistent JSON structure:
{
  "message": "success",
  "code": 10000,
  "data": {...}
}message
string
Human-readable message describing result
code
integer
Response code (10000 = success)
data
object / list / null
Response data payload
For different return types, refer to Data Models.
🧠 Example: Create a Pod via API
Example in curl
curlcurl -X POST 'https://api.yottalabs.ai/openapi/v1/pods/create' \
  -H 'x-api-key: <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "image": "yottalabsai/pytorch:2.8.0-py3.11-cuda12.8.1-cudnn-devel-ubuntu22.04-2025050802",
    "gpuType": "NVIDIA_L4_24G",
    "gpuCount": 1,
    "environmentVars": [
      { "key": "JUPYTER_PASSWORD", "value": "your_password" }
    ],
    "expose": [
      { "port": 22, "protocol": "SSH" }
    ]
  }'
Example in Python
import requests
url = "https://api.yottalabs.ai/openapi/v1/pods/create"
headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "Content-Type": "application/json"
}
payload = {
    "image": "yottalabsai/pytorch:2.8.0-py3.11-cuda12.8.1-cudnn-devel-ubuntu22.04-2025050802",
    "gpuType": "NVIDIA_L4_24G",
    "gpuCount": 1,
    "environmentVars": [
        {"key": "JUPYTER_PASSWORD", "value": "your_password"}
    ],
    "expose": [
        {"port": 22, "protocol": "SSH"}
    ]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())⚙️ Versioning
All endpoints currently use the /openapi/v1/ prefix. Backward-compatible changes may be added to this version. When future breaking changes occur, a new version (e.g., /openapi/v2/) will be introduced with full release notes.
🚦 Rate Limits & Best Practices
To ensure fair usage and system stability, Yotta applies rate-limiting policies. While limits may vary by plan, the following best practices are encouraged:
Max Requests / Minute
60–120 (depending on plan)
Concurrent Pod Operations
Up to 5 simultaneous per API key
Retry Strategy
Use exponential backoff (e.g., 1s → 2s → 4s)
Pagination
Use page and pageSize parameters where available
Error Handling
Check the code field for success or retryable errors
Resource Lifecycle
Always pause or terminate unused Pods to save cost
Tip: Bundle related API calls in scripts to minimize overhead. Efficient API usage helps lower latency and improve cluster utilization.
💬 Support & Feedback
We’re always improving the Yotta API. For questions, feature requests, or bug reports, contact:
📩 [email protected] 🌐 Yotta Labs Official Website 🧑💻 Yotta Platform Console
Last updated
Was this helpful?
