API Reference

Complete API documentation with endpoints, parameters, authentication, and examples

Base URL

https://api.solanam.com/v1

Authentication

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_KEY

Getting Your API Key

  1. Log in to your SolanaM account
  2. Navigate to Settings → API Keys
  3. Click "Generate New API Key"
  4. 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/upload

Upload 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

ParameterTypeDescription
idstringImage identifier
PUT/api/v1/images/{id}/metadata

Update 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