Skip to main content

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
  • curl installed on your system (or Postman/Insomnia)

Step 1: Create an API Key

  1. Log in to your WAYSCloud Dashboard
  2. Navigate to API Keys in the left sidebar
  3. Click Create New API Key
  4. 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
  5. Enter a descriptive name (e.g., "My First API Key")
  6. Click Create
  7. Important: Copy your API key immediately - it won't be shown again!

Your API key will look like this:

wayscloud_storage_abc123_XyZ789AbCdEfGhIjKlMnOpQrStUvWx
warning

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

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:

ServiceRate LimitBurst
Storage API1000 requests/minute20
LLM API1000 requests/minute20
Database API500 requests/minute10
info

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:

Happy coding! 🚀