Quickstart Guide
Get started with WAYSCloud API in just 5 minutes. This guide will walk you through creating your first API key and making your first API call.
Prerequisites
- A WAYSCloud account (sign up at my.wayscloud.services)
- Basic knowledge of REST APIs
curlinstalled on your system (or Postman/Insomnia)
Step 1: Create an API Key
- Log in to your WAYSCloud Dashboard
- Navigate to API Keys in the left sidebar
- Click Create New API Key
- Select the service(s) you want to access:
- Storage - S3-compatible object storage
- LLM - Large Language Model API
- Database - PostgreSQL/MariaDB databases
- DNS - Domain name management
- Enter a descriptive name (e.g., "My First API Key")
- Click Create
- Important: Copy your API key immediately - it won't be shown again!
Your API key will look like this:
wayscloud_storage_abc123_XyZ789AbCdEfGhIjKlMnOpQrStUvWx
Store your API key securely! Never commit it to version control or share it publicly. Treat it like a password.
Step 2: Test Your API Key
Let's verify your API key works by calling the Storage API to list your buckets.
Using curl
curl -X GET "https://api.wayscloud.services/v1/storage/" \
-H "Authorization: Bearer wayscloud_storage_abc123_YourSecretKey"
Expected Response
<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult>
<Owner>
<ID>your-customer-id</ID>
<DisplayName>Your Name</DisplayName>
</Owner>
<Buckets>
<Bucket>
<Name>my-first-bucket</Name>
<CreationDate>2025-11-04T10:30:00.000Z</CreationDate>
</Bucket>
</Buckets>
</ListAllMyBucketsResult>
Step 3: Upload Your First File
Now let's upload a file to your storage bucket.
Create a Test File
echo "Hello, WAYSCloud!" > hello.txt
Upload to Storage
curl -X PUT "https://api.wayscloud.services/v1/storage/my-first-bucket/hello.txt" \
-H "Authorization: Bearer wayscloud_storage_abc123_YourSecretKey" \
-H "Content-Type: text/plain" \
--data-binary @hello.txt
Expected Response
HTTP/1.1 200 OK
ETag: "a1b2c3d4e5f6..."
Step 4: Download Your File
Retrieve the file you just uploaded:
curl -X GET "https://api.wayscloud.services/v1/storage/my-first-bucket/hello.txt" \
-H "Authorization: Bearer wayscloud_storage_abc123_YourSecretKey"
Expected Response
Hello, WAYSCloud!
Step 5: Try the LLM API
If you created an LLM API key, let's make your first AI request:
curl -X POST "https://api.wayscloud.services/v1/chat/completions" \
-H "Authorization: Bearer wayscloud_llm_abc123_YourSecretKey" \
-H "Content-Type: application/json" \
-d '{
"model": "mixtral-8x7b",
"messages": [
{
"role": "user",
"content": "Say hello in 5 different languages"
}
],
"temperature": 0.7,
"max_tokens": 200
}'
Expected Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1699012345,
"model": "mixtral-8x7b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! Here are greetings in 5 languages:\n\n1. English: Hello\n2. Spanish: Hola\n3. French: Bonjour\n4. German: Guten Tag\n5. Japanese: こんにちは (Konnichiwa)"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 52,
"total_tokens": 67
}
}
Step 6: Create a Database
Let's create a PostgreSQL database:
curl -X POST "https://api.wayscloud.services/v1/databases" \
-H "Authorization: Bearer wayscloud_database_abc123_YourSecretKey" \
-H "Content-Type: application/json" \
-d '{
"db_type": "postgresql",
"db_name": "my_first_db"
}'
Expected Response
{
"success": true,
"message": "Database created successfully",
"database": {
"db_name": "my_first_db",
"db_type": "postgresql",
"host": "172.29.1.10",
"port": 5432,
"username": "user_abc123",
"status": "active"
}
}
Next Steps
Congratulations! You've successfully:
- ✅ Created an API key
- ✅ Uploaded and downloaded a file
- ✅ Made an LLM API call
- ✅ Created a database
Where to Go Next
- Authentication Guide - Learn about API key types and security
- Storage API Documentation - Deep dive into object storage
- LLM API Documentation - Explore AI models and parameters
- Database API Documentation - Manage databases programmatically
- Code Examples - Ready-to-use code in Python, JavaScript, and more
Common Issues
401 Unauthorized
{"error": "Invalid or expired API key"}
Solution: Verify your API key is correct and hasn't been revoked. Check the Authentication Troubleshooting guide.
403 Forbidden
{"error": "API key does not have permission for this service"}
Solution: Your API key may not have access to the service you're trying to use. Create a new API key with the correct permissions.
404 Not Found
{"error": "Bucket not found"}
Solution: Make sure the bucket exists. Create it first in the dashboard or via the API.
Code Examples
Python
import requests
# Storage API - Upload file
url = "https://api.wayscloud.services/v1/storage/my-bucket/file.txt"
headers = {
"Authorization": "Bearer wayscloud_storage_abc123_YourSecretKey",
"Content-Type": "text/plain"
}
data = "Hello, WAYSCloud!"
response = requests.put(url, headers=headers, data=data)
print(f"Status: {response.status_code}")
JavaScript (Node.js)
const axios = require('axios');
// LLM API - Chat completion
const response = await axios.post(
'https://api.wayscloud.services/v1/chat/completions',
{
model: 'mixtral-8x7b',
messages: [
{ role: 'user', content: 'Hello!' }
]
},
{
headers: {
'Authorization': 'Bearer wayscloud_llm_abc123_YourSecretKey',
'Content-Type': 'application/json'
}
}
);
console.log(response.data.choices[0].message.content);
cURL with Variables
# Set your API key as an environment variable
export WAYSCLOUD_API_KEY="wayscloud_storage_abc123_YourSecretKey"
# Upload file
curl -X PUT "https://api.wayscloud.services/v1/storage/my-bucket/file.txt" \
-H "Authorization: Bearer $WAYSCLOUD_API_KEY" \
-H "Content-Type: text/plain" \
--data "Hello, WAYSCloud!"
# Download file
curl -X GET "https://api.wayscloud.services/v1/storage/my-bucket/file.txt" \
-H "Authorization: Bearer $WAYSCLOUD_API_KEY"
Rate Limits
All API endpoints have rate limits to ensure fair usage:
| Service | Rate Limit | Burst |
|---|---|---|
| Storage API | 1000 requests/minute | 20 |
| LLM API | 1000 requests/minute | 20 |
| Database API | 500 requests/minute | 10 |
If you exceed the rate limit, you'll receive a 429 Too Many Requests response. Wait 60 seconds before retrying.
Support
Need help? We're here for you:
- Documentation: docs.wayscloud.services
- Email: support@wayscloud.no
- Status Page: status.wayscloud.services
- Discord Community: discord.gg/wayscloud
Happy coding! 🚀