How To Use RedPill API

Introduction to RedPill API

RedPill offers developers access to top LLMs that are more affordable, convenient, and stable.

  • Unified API for 30+ Models

    • Access leading AI models like OpenAI, Meta, Mistral, and more through a single API. Simplify your workflow and elevate your projects.

  • Best Route to Top Providers

    • With multiple nodes supporting each model, RedPill automatically routes you to the best option (considering a combination of price, stability, and speed) for optimal performance.

  • Flexible Payments

    • Top up or pay as you go, using fiat or stablecoins—whichever suits you best.

  • Open Network

    • Open Source and community-owned, RedPill is built for and by its users.

Effortless Start: Using the RedPill API

Let's walk through a simple example of using the RedPill API. This example will illustrate a few features:

  • How we can create a RedPill API

  • How we can use the API to make your request

Quick and Easy Setup: Create a RedPill API Key

Follow these steps to create in minutes

  1. Navigate to the Models section on the left menu and select My API from the submenu.

  2. On the Create API page, choose the model you want to use and set the usage limit for this API. (Don’t worry—you can always adjust the limit later if needed.)

  3. Hit the Create button to finish setting up your API. You’re all set!

  4. All API info you can find on My API list, try Chat button you can directly request your API

Make Your First Request

Using RedPill API is as simple as making an API call in your terminal.

curl https://api.red-pill.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <YOUR_REDPILL_API_KEY>" \
  -d '{
  "model": "gpt-4o",
  "messages": [
    {
      "role": "user",
      "content": "Hello world!"
    }
  ],
  "temperature": 1
}'

In the "model": "gpt-4o" section, simply replace 'gpt-4o' with the name of any RedPill-supported model to make a direct and easy API call.

For a list of supported models and naming formats, check here.

Pricing and Payment Methods

Model Pricing Table

Credits: Top-Up, Usage, and Managing Your Credits

For any questions or support, our team is just a click away. Happy building with RedPill!

Last updated