API Reference
Complete API documentation with endpoints, parameters, authentication, and examples
Authentication
Learn how to authenticate API requests
Endpoints
Browse all available API endpoints
Code Examples
See examples in multiple languages
Base URL
https://api.solanam.com/v1Authentication
The SolanaM API uses API keys to authenticate requests. You can view and manage your API keys in your account settings.
API Key Authentication
Include your API key in the request header:
Authorization: Bearer YOUR_API_KEYGetting Your API Key
- Log in to your SolanaM account
- Navigate to Settings → API Keys
- Click "Generate New API Key"
- Copy and securely store your API key
Security Warning
Never expose your API key in client-side code or public repositories. Keep it secure and rotate it regularly.
API Endpoints
POST
/api/v1/images/uploadUpload and process images
Request Body
{
"file": "base64_encoded_image",
"format": "png",
"options": {
"compress": true,
"quality": 90
}
}Response
{
"success": true,
"data": {
"id": "img_123",
"url": "https://cdn.solanam.com/...",
"size": 102400,
"format": "png"
}
}GET
/api/v1/images/{id}Retrieve image information
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | Image identifier |
PUT
/api/v1/images/{id}/metadataUpdate image metadata
Code Examples
JavaScript / TypeScript
const response = await fetch('https://api.solanam.com/v1/images/upload', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
file: base64Image,
format: 'png',
options: {
compress: true,
quality: 90
}
})
});
const data = await response.json();Python
import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
data = {
'file': base64_image,
'format': 'png',
'options': {
'compress': True,
'quality': 90
}
}
response = requests.post(
'https://api.solanam.com/v1/images/upload',
headers=headers,
json=data
)
result = response.json()Rate Limits
API rate limits are applied to ensure fair usage and system stability.
100
Requests per minute
10,000
Requests per day