Text model API
GPT-4o API
GPT-4o is the most advance and versatile, high-intelligence flagship model. It is multimodal (accepting text or image inputs and outputting text), and it has the same high intelligence as GPT-4 Turbo but is much more efficient—it generates text 2x faster and is 50% cheaper. Additionally, GPT-4o has the best vision and performance across non-English languages of any of our models.
- Model id
gpt-4o- Takes
- Text (required)
- Makes
- Text
- Endpoint
POST /api/v1/chat/completions- Made by
- OpenAI
- Mode
- Synchronous
Call GPT-4o
https://payload.rentprompts.com/api/v1. Replace the placeholder with your key.Model gpt-4o
POST /api/v1/chat/completions
curl https://payload.rentprompts.com/api/v1/chat/completions \
-H "Authorization: Bearer rp_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Write a haiku about APIs."
}
],
"max_tokens": 256
}'Replace rp_live_YOUR_KEY with your key, ideally via the RENTPROMPTS_API_KEY environment variable. Keys are shown only once, so they are never filled in here. Get your API key →
What a typical call costs
- 1,000 input + 500 output tokens1.05 Joules
- 10,000 input + 2,000 output tokens6.9 Joules
Send requests to POST /api/v1/chat/completions. GPT-4o answers synchronously: the result comes back in the response to the same request. Token counts come from the model's own usage report, so a real call may use more or fewer tokens than this example.