Page cover image

Getting started

1RPC.ai provides a single endpoint with access to 23+ verified LLM models. The API is made available via the 1RPC.ai dashboard. At the same time, monitor and control spending across different AI models with aggregated usage in one place.

import requests
import json

response = requests.post(
    url="https://1rpc.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer <1RPC_AI_API_KEY>",
        "Content-Type": "application/json",
        "Accept": "application/json",
    },
    data=json.dumps({
        "model":"openai/gpt-4o",
        "messages": [
            {
                "role": "user",
                "content": "What is the meaning of life?"
            }
        ]
    }]
)

Last updated