Rate Limiting

Understand Sola's API rate limits and how to handle 429 responses.

Sola enforces rate limits to ensure fair usage and platform stability. This page explains the limits and how to handle them.


Execution API Limits

The Execution API enforces the following rate limits per authenticated user:

ParameterValue
Requests allowed100 requests
Time window1 minute
Block durationNone (requests are accepted again immediately after the window resets)

Rate limits are applied per user based on the authenticated API key.

Rate Limit Response

When you exceed the rate limit, the API returns an HTTP 429 Too Many Requests response:

{
  "message": "Too many requests"
}

Handling Rate Limits

Recommended approach

  1. Check for 429 responses in your API client
  2. Wait before retrying — implement exponential backoff starting at 1 second
  3. Spread requests over time rather than sending bursts

Example: Retry with backoff (Python)

import time
import requests

def queue_execution(workflow_id, variable_data, api_key, max_retries=3):
    url = f"https://api.sola-solutions.com/v1/execution/queue-remote/{workflow_id}"
    headers = {
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json"
    }
    payload = {"variableData": variable_data}
    
    for attempt in range(max_retries):
        response = requests.put(url, json=payload, headers=headers)
        
        if response.status_code == 429:
            wait_time = 2 ** attempt  # 1s, 2s, 4s
            time.sleep(wait_time)
            continue
        
        response.raise_for_status()
        return response.json()
    
    raise Exception("Max retries exceeded")

Example: Retry with backoff (TypeScript)

async function queueExecution(
  workflowId: string,
  variableData: Record<string, string>,
  apiKey: string,
  maxRetries = 3
): Promise<{ executionId: string }> {
  const url = `https://api.sola-solutions.com/v1/execution/queue-remote/${workflowId}`;
  
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const response = await fetch(url, {
      method: 'PUT',
      headers: {
        'Authorization': `Bearer ${apiKey}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ variableData }),
    });
    
    if (response.status === 429) {
      await new Promise(r => setTimeout(r, 2 ** attempt * 1000));
      continue;
    }
    
    if (!response.ok) throw new Error(`HTTP ${response.status}`);
    return response.json();
  }
  
  throw new Error('Max retries exceeded');
}