API Documentation

Welcome to the RentPrompts API. This documentation provides the necessary information to integrate our powerful AI models into your applications.

1. Authentication

To use the API, you need a secret key. Follow these steps to generate one:

  1. Log in to your RentPrompts Account.
  2. Go to your Profile (Click your avatar on the top right).
  3. Click "Generate API Key".
  4. Copy your key and keep it secure.

2. Available Models

Below are most popular models. You can use any model using their names.

Model NameTypeDescriptionInput/OutputCost (Est.)

3. Usage Examples

Select a language below to see how to make a api request.

import requests import json url = "https://devpayload.rentprompts.com/api/v1/run" api_key = "YOUR_API_KEY_HERE" # Example: Chat with GPT-4o payload = { "model": "gpt-4o", "prompt": "Write a short poem about coding.", "settings": { "temperature": 0.7, "max_tokens": 100 } } headers = { "Content-Type": "application/json", "Authorization": f"users API-Key {api_key}" } response = requests.post(url, headers=headers, json=payload) print(response.json())

4. Troubleshooting

Credits Required

Your account needs credits (Joules) to run these models. If you receive an Insufficient Balance error, please check your balance on your Profile Page.

Common Errors

  • Unauthorized (401): Check your API Key. It must be valid and active.
  • Not Found (404): Ensure you are using the correct endpoint URL and model name.