ONE WARE Cloud REST-API
The ONE WARE Cloud provides a REST API for programmatic access to your projects, jobs, credits, and AI models. All endpoints are documented in the interactive API documentation (Scalar).
Authentication
The API uses Bearer JWT authentication. To use the API outside of a browser session, you need to:
- Create an API Key
- Exchange the API Key for a Bearer JWT token
- Use the JWT in the
Authorizationheader for subsequent requests
JWT tokens have an expiration time. You must renew the token before it expires. If you receive a 401 Unauthorized response, exchange your API key for a new token.
Creating an API Key
-
Navigate to Account → API Keys in the OneWare Cloud
-
Click Add new API Key and enter a descriptive name
-
Copy the generated key immediately — it will not be shown again after closing the dialog
Exchanging an API Key for a JWT
Send a POST request to the auth endpoint with your API key in the x-api-key header:
curl -X POST https://cloud.one-ware.com/api/auth/token \
-H "x-api-key: YOUR_API_KEY"
The response body contains the JWT token as a plain string:
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Use this token in the Authorization header for all subsequent requests:
curl https://cloud.one-ware.com/api/credits/balance \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
API Endpoints Overview
| Category | Endpoints | Description |
|---|---|---|
| Auth | POST /api/auth/token | Exchange API key for JWT |
| Credits | GET /api/credits/balance | Get current credit balance |
GET /api/credits/transactions | List credit transactions | |
GET /api/credits/balance/sufficient | Check if balance is sufficient | |
| Projects | GET /api/projects | List all projects (paginated) |
GET /api/projects/{projectId} | Get project details | |
GET /api/projects/{projectId}/download | Download project | |
DELETE /api/projects/{projectId} | Delete a project | |
| Jobs | GET /api/jobs | List all jobs (paginated) |
GET /api/jobs/{jobId} | Get job details | |
GET /api/jobs/{jobId}/progress | Get job progress | |
GET /api/jobs/{jobId}/logs | Get job logs | |
POST /api/jobs/{jobId}/stop | Stop a running job | |
| ONE AI Models | GET /api/oneai/projects/{projectId}/models | List models |
POST /api/oneai/projects/{projectId}/models/{modelId}/train | Start training | |
POST /api/oneai/projects/{projectId}/models/{modelId}/test | Start testing | |
POST /api/oneai/projects/{projectId}/models/{modelId}/export | Export model | |
| ONE AI Exports | GET /api/oneai/projects/{projectId}/models/{modelId}/exports | List exports |
GET /api/oneai/projects/{projectId}/models/{modelId}/exports/{exportName} | Download export |
Usage Examples
Get Credit Balance
curl https://cloud.one-ware.com/api/credits/balance \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
List Projects
curl "https://cloud.one-ware.com/api/projects?skip=0&take=10" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Start Training a Model
curl -X POST https://cloud.one-ware.com/api/oneai/projects/{projectId}/models/{modelId}/train \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"epochs": 100}'
Check Job Progress
curl https://cloud.one-ware.com/api/jobs/{jobId}/progress \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Python Example
import requests
API_KEY = "your-api-key-here"
BASE_URL = "https://cloud.one-ware.com"
# Step 1: Exchange API key for JWT
response = requests.post(
f"{BASE_URL}/api/auth/token",
headers={"x-api-key": API_KEY}
)
token = response.text.strip('"')
# Step 2: Use JWT for authenticated requests
headers = {"Authorization": f"Bearer {token}"}
# Get credit balance
balance = requests.get(f"{BASE_URL}/api/credits/balance", headers=headers)
print(f"Balance: {balance.json()}")
# List projects
projects = requests.get(f"{BASE_URL}/api/projects?skip=0&take=10", headers=headers)
print(f"Projects: {projects.json()}")
# List jobs
jobs = requests.get(f"{BASE_URL}/api/jobs?skip=0&take=5", headers=headers)
print(f"Jobs: {jobs.json()}")
Error Responses
| Status Code | Description |
|---|---|
400 | Bad Request — invalid parameters |
401 | Unauthorized — invalid or expired JWT |
402 | Payment Required — insufficient credits |
404 | Not Found — resource does not exist |
Interactive Documentation
For a full reference of all endpoints, request/response schemas, and the ability to test requests directly, visit the Scalar API Documentation.