Create or update Runway API account configuration

August 8, 2024

Table of contents

  1. Request Headers
  2. Request Body
  3. Responses
  4. Model
  5. Examples
  6. Try It

For your convenience, you can specify your Runway configuration values under your account. If you specify multiple Runway accounts, the API will automatically perform load balancing by randomly selecting an account with available capacity before making calls to Runway.

https://api.useapi.net/v1/runwayml/accounts/email

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Request Body
{
    "email": "Runway account email",
    "password": "Runway account password",
    "maxJobs": 1-10,
}
  • email, password are required. Please see Setup Runway for details.

  • email value specified in the request body must match the email value specified in the URL path https://api.useapi.net/v1/runwayml/accounts/email.

  • maxJobs is required. Currently, it should be between 1 and 10. We recommend setting this value to 5.

Responses
  • 200 OK

    {
      "email": "[email protected]",
      "password": "<password>",
      "maxJobs": 5,
      "jwt": {
        "token": "<token>",
        "exp": 1734858598.864,
        "iat": 1732266598.864,
        "id": 123456,
      }        
    }
    
  • 400 Bad Request

    {
      "error": "<Error message>",
      "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": 
        "Unauthorized",
        "Wrong username/password combination.",
        "This account has been suspended."
      "code": 401
    }
    
Model
{ // TypeScript, all fields are optional
  email: string,
  password: string,
  maxJobs: number,
  jwt: {
    token: string,
    exp: number,
    iat: number,
    id: number,
  }
  error: string,
  errorDetails: string,
  code: number
}
Examples
  • curl -H "Accept: application/json" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer …" \
         -X POST https://api.useapi.net/v1/runwayml/accounts/<email> \
         -d '{"email": "…", "password": "…", "maxJobs": …}'
    
  • const email = "Runway account email";      
    const password = "Runway account password";      
    const apiUrl = `https://api.useapi.net/v1/runwayml/accounts/${email}`; 
    const token = "API token";
    const maxJobs = 5;
    const data = { 
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${token}`,
        'Content-Type': 'application/json' }
    };
    data.body = JSON.stringify({ 
      email, password, maxJobs
    });
    const response = await fetch(apiUrl, data);
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    email = "Runway account email"
    password = "Runway account password"
    apiUrl = f"https://api.useapi.net/v1/runwayml/accounts/{email}" 
    token = "API token"
    maxJobs = 5
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    body = {
        "email": f"{email}",
        "password": f"{password}", 
        "maxJobs": maxJobs
    }
    response = requests.post(apiUrl, headers=headers, json=body)
    print(response, response.json())
    
Try It