|
Login
|
Ctrl K
Login
Community
AI Games
Marketplace
Blogs
Bounties
Pricing
Generate
Discord ThreadsReddit Instagram LinkedIn

Create

TextImageVideoAudioAI ChatText ArenaImage ArenaAll ModelsExplore more

Image Models

Seedream-5-ProNano-Banana-ProNano-BananaGemini-2.5-FlashFlux-Kontext-MaxExplore more

Video Models

Seedance-2.5Kling-v3.0-ProGen-4.5Veo-3-FastWan 2.1Explore more

Text Models

Grok-4.6Kimi-K2-ThinkingGrok 4.2GPT-4oExplore more

Audio Models

Lyria-3.5Sonilo-v1.1Lyria-3-Pro-PreviewTTS-1.5-MaxQwen3-TTSExplore more

AI Apps & Prompts

All AI AppsBest promptsAI Art AppsVeo3 fastFlux 2 proMarketing AgentsPhotography promptsExplore more

Community

AI GamesBountiesAI AcademyCommunityBlog

Company

Pricing & PlansAI Model Prices (₹)Sell on RentPromptsBusinessAPI DocsTermsPrivacyContact Us

©2026 RentPrompts, LLC. All rights reserved.

  1. Home
  2. /AI Model API

RentPrompts API

One API key for every AI model

Call GPT-5.2, Claude Fable 5.1, Gemini 3.8 Flash, Grok 4.2, FLUX 2 Pro, Kling Image V3 and every other text, image, video, audio model through one OpenAI-compatible API. Pay only for successful calls, in Joules topped up with UPI or card — no USD card or subscription needed.

Get your API keyRead the quickstart

Every price is in Joules, the RentPrompts credit: 1 Joule = ₹1 ≈ $0.0108 · $1 ≈ 93 Joules.

POST/v1/chat/completions
curl https://payload.rentprompts.com/api/v1/chat/completions \
  -H "Authorization: Bearer $RENTPROMPTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-m27",
    "messages": [{ "role": "user", "content": "Hello" }]
  }'
Response · 200 OK
{
  "choices": [
    { "message": { "role": "assistant", "content": "Hi there!" } }
  ],
  "usage": { "prompt_tokens": 9, "completion_tokens": 8 },
  "rentprompts": { "cost_joules": 0.0021, "balance_joules": 248.31 }
}
  • One key, every model

    Text, image, video and audio through one API.

  • OpenAI-compatible

    Point any OpenAI SDK at our base URL.

  • Pay only for success

    Failed calls are never charged.

  • Spend caps per key

    Set a monthly limit on every key.

Get your API key

Keys live in Dashboard → API keys.

Get started

  • Quickstart
  • Code examples
  • Models and pricing

Reference

  • Authentication
  • Endpoints
  • Errors
  • Rate limits
  • Streaming
  • Tools and JSON
  • Media inputs
  • Idempotency
  • Async jobs
  • Webhooks
  • Billing
  • Security

Resources

  • FAQ
  • Changelog
  • Status
  • OpenAPI spec
  • Docs as Markdown
  • Your API keys
  • Try models in AI Chat

Quickstart

  1. 1

    Create a key

    Sign up free, verify your email, then create a key. It is shown once, so store it in an environment variable.

  2. 2

    Add Joules

    Calls are paid from your wallet. Top up any amount; only successful generations are charged.

  3. 3

    Make your first call

    Use base URL https://payload.rentprompts.com/api/v1 with any OpenAI SDK, or plain HTTP:

curl https://payload.rentprompts.com/api/v1/chat/completions \
  -H "Authorization: Bearer rp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "minimax-m27",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about APIs."
    }
  ],
  "max_tokens": 256
}'

Want to try a model before writing code? Chat with any text model or run image, video and audio models in the browser — same models, same prices.

Code examples

Pick a model and a language. Text models use chat completions (images can be sent in the messages), images use image generations, and video and audio use /v1/run with a job.

Model

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": "minimax-m27",
  "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 →

Models and pricing

What each model takes and makes, and its price in Joules exactly as the API bills it (1 Joule = ₹1 ≈ $0.0108; $1 ≈ 93 Joules). Open a model for its settings and code.

140 models · prices in Joules

ModelTakes → MakesPrice (Joules)
  • MiniMax M2.7Featuredminimax-m27 · MiniMaxTakes TextText (Text model)0.12 in · 0.2 out / 1K tokens0.12 Joules in · 0.2 Joules out / 1K tokens
  • Kling Image V3Featuredkling-image-v3 · Kling (Kuaishou)Takes TextImage (Image model)3.8 / image3.8 Joules / image
  • GPT-5.2Featuredgpt-52-2025-12-11 · OpenAITakes TextText (Text model)0.68 in · 1.9 out / 1K tokens0.68 Joules in · 1.9 Joules out / 1K tokens
  • Kimi K2 ThinkingFeaturedkimi-k2-thinking · Moonshot AITakes TextText (Text model)0.27 in · 0.5 out / 1K tokens0.27 Joules in · 0.5 Joules out / 1K tokens
  • Nano Banana Pro Editnano-banana-pro-edit · GoogleTakes Text (optional) + ImageImage (Image model)15.2 / image15.2 Joules / image
  • Nano Banana Pronano-banana-pro · GoogleTakes TextImage (Image model)12.66 / image12.66 Joules / image
  • FLUX 2 Proflux-2-pro · Black Forest LabsTakes TextImage (Image model)3.61 / image3.61 Joules / image
  • GPT Image 1gpt-image-1 · OpenAITakes TextImage (Image model)10.79 / image10.79 Joules / image
  • Nano Banananano-banana · GoogleTakes TextImage (Image model)7.74 / image7.74 Joules / image
  • Grok 4.2grok-42 · xAITakes TextText (Text model)0.32 in · 0.45 out / 1K tokens0.32 Joules in · 0.45 Joules out / 1K tokens
  • Grok Imaginegrok-imagine · xAITakes TextVideo· async (Video model)6 / second6 Joules / second
  • Lyria 3 Pro Previewlyria-3-pro-preview · GoogleTakes TextAudio (Audio model)9 / request9 Joules / request

1–12 of 140

…

API reference

Authentication

Send your key as a bearer token on every request. The base URL is https://payload.rentprompts.com/api/v1. Create, rotate and revoke keys under Dashboard → API keys; a new key is shown once, so copy it into an environment variable straight away.

Authorization: Bearer rp_live_YOUR_KEY

Older profile keys (a UUID sent as Authorization: users API-Key <uuid>) still work but are deprecated — create an rp_live_ key to get scopes, spend caps and usage per key.

Endpoints

EndpointAuthUse
POST /v1/chat/completionsAPI keyText models (including those that read images), OpenAI-compatible. Live token streaming, tools and JSON schema output on models with those capabilities.
POST /v1/images/generationsAPI keyImage models. Async image models answer 202 with a job; add "webhook" to be notified when it finishes.
POST /v1/runAPI keyUniversal endpoint for any model type. Required for async-only models (video, and some image and audio models): answers 202 with a job; accepts "webhook".
GET /v1/jobs/{id}API keyStatus and output of an async job.
GET /v1/modelsNoneThe public model catalog with pricing.
GET /v1/models/{id}NoneOne model.
GET /v1/balanceAPI keyYour wallet balance in Joules.
GET /v1/usage?days=30API keyUsage summary for the calling key.

Errors

Every error has the same JSON shape:

{
  "error": {
    "type": "billing_error",
    "code": "insufficient_balance",
    "message": "…",
    "param": "model"
  }
}
HTTPcodeWhat to do
400invalid_request, model_not_supported_on_endpointThe body is malformed, or the model is called on the wrong endpoint (async models cannot use chat completions: call them on /v1/run).
400unsupported_parameterA parameter this model does not support, such as tools on a model without capabilities.tools, or n > 1. Remove it and retry.
401invalid_api_key, key_revoked, key_expiredThe key is missing, wrong, revoked or past its expiry.
402insufficient_balance, spend_cap_exceededAdd Joules, or raise the key's monthly cap.
403scope_not_allowed, account_suspended, email_not_verifiedThe key may not use this model type, or the account cannot use the API.
404model_not_found, job_not_foundUnknown model id, or a job that is not yours.
409key_limit_reachedYou already have the maximum number of active keys.
413request_too_largeThe request body is over 25 MB. Send media as public https URLs instead of inline data.
422idempotency_key_reusedThis Idempotency-Key was already used with a different request body. Use a new key for a new request.
429rate_limit_exceeded, concurrency_limitSlow down; wait for the retry-after header.
503provider_error, provider_timeout, model_unavailable, api_disabledUpstream or temporary problem, or a synchronous call that ran past 90 seconds (provider_timeout: use stream: true or POST /v1/run for long generations). Not charged; retry with backoff.

Useful response headers:

HeaderMeaning
x-request-idUnique id of the request — include it when contacting support.
x-rp-cost-joulesWhat this request cost.
x-rp-balance-joulesYour wallet balance after the request.
x-ratelimit-limit-requestsRequests allowed per minute for this key.
x-ratelimit-remaining-requestsRequests left in the current minute.
retry-afterSeconds to wait (on 429 responses).
idempotent-replayed"true" when the response is a stored replay of an earlier request with the same Idempotency-Key.

Rate limits

LimitValue
Requests per key60 / minute
Requests per account120 / minute
Concurrent requests per account5
Job status polls (GET /v1/jobs/{id}) per key300 / minute
Media URL size (fetched server-side, public https only)15 MB each
Request body25 MB
Active keys per account10
max_tokens (text)default 1,024, max 8,192

On 429, wait for retry-after seconds, then retry with exponential backoff.

Status polling (GET /v1/jobs/{id}) has its own limit of 300 requests per minute per key, so polling never uses up your generation limit.

Streaming

Send "stream": true to receive the answer as server-sent events in the OpenAI chat.completion.chunk format, ending with data: [DONE]. Models whose catalog entry has capabilities.streaming: true stream tokens as they are generated; other models send the whole answer in one chunk. Add "stream_options": { "include_usage": true } to get a final chunk with usage and rentprompts.cost_joules. If you disconnect early you are charged only for what was generated; if the model fails mid-answer, the stream ends with an error event and you pay only for the text already sent.

Tools and structured output

On models with capabilities.tools: true, tools, tool_choice, parallel_tool_calls, assistant tool_calls and tool messages work exactly as in the OpenAI API, and response_format accepts json_object and json_schema. The whole conversation is sent to the model with its roles. Other models refuse tools with 400 unsupported_parameter. n greater than 1, logprobs and logit_bias are not supported.

"tools": [{
  "type": "function",
  "function": {
    "name": "get_weather",
    "parameters": { "type": "object", "properties": { "city": { "type": "string" } } }
  }
}],
"tool_choice": "auto"

Images, video and audio inputs

Pass media as URLs. They are fetched on the RentPrompts servers: public https URLs only, at most 15 MB each. The whole request body may be at most 25 MB (larger bodies get 413 request_too_large).

Idempotency

Send an Idempotency-Key header (any unique string, e.g. a UUID) to make retries safe: the same key within 24 hours is never charged twice. Reusing a key with a different request body returns 422 idempotency_key_reused, and a retry sent while the first request is still running returns 409. Streamed responses are not stored for replay.

Async jobs

Video, and some image and audio models, run asynchronously and must be called on POST /v1/run. They answer HTTP 202 with a poll_url. Poll GET /v1/jobs/{id} every few seconds until status is succeeded (the file is in output.url or output.urls) or failed. Only the key's own account can read a job.

{ "id": "job_…", "object": "job", "status": "succeeded",
  "output": { "url": "https://…" } }

Webhooks

Instead of polling, add "webhook": "https://your-server/rentprompts" to an async request. When the job finishes, RentPrompts sends a POST with a job.succeeded or job.failed event whose data is the same job object GET /v1/jobs/{id} returns. Answer with any 2xx within 15 seconds. Failed deliveries are retried after 5 s, 1 min, 5 min, 30 min, 2 h, 8 h and 24 h, always with the same webhook-id, so use it to ignore duplicates.

Events are signed with Standard Webhooks: webhook-signature is v1, + base64 HMAC-SHA256 of webhook-id.webhook-timestamp.body, keyed with your key's webhook secret (API keys page → key menu → Webhook signing secret). Any Standard Webhooks library verifies it; reject events older than 5 minutes.

import { Webhook } from "standardwebhooks";

const wh = new Webhook(process.env.RENTPROMPTS_WEBHOOK_SECRET);
// rawBody: the exact request body string; headers: the request headers
const event = wh.verify(rawBody, headers); // throws if the signature is wrong
if (event.type === "job.succeeded") console.log(event.data.output.url);

Billing

You are charged only for successful generations, at the same prices as the website and exactly the price listed in the catalog, from the same Joule wallet. When a request starts, its worst-case cost is reserved from your balance (it must fit in your balance minus requests already in flight); when it finishes you are charged the actual cost and the rest is released. In the rare case a charge cannot be collected straight away, the unpaid amount is collected automatically on your next request. Each response includes cost_joules and your remaining balance. 1 Joule = ₹1 ≈ $0.0108 ($1 ≈ 93 Joules). Joules are bought on the Pricing page.

Security best practices

  • Never put a key in browser, mobile or desktop app code — call the API from your own server.
  • Store keys in environment variables or a secret manager, never in source control.
  • Use one key per app or environment, restrict its model types, and set a monthly spend cap.
  • Give keys an expiry and rotate them from the key menu: rotation issues a new secret with the same settings and stops the old one at once.
  • If a key leaks, revoke it immediately — revocation takes effect on the next request.

Changelog, status and machine-readable docs

  • API changelog and versioning policy — what changed, and how long deprecated behaviour keeps working.
  • API status — a live check of the API and the model catalog.
  • OpenAPI 3.1 spec — import into Postman, Insomnia or a code generator.
  • These docs as Markdown and llms.txt — for AI coding assistants and agents.

FAQ

Is the RentPrompts API compatible with the OpenAI SDK?

+

Yes. Point the official OpenAI Python or Node SDK at the RentPrompts base URL, pass your rp_live_ key as the API key, and call chat.completions.create or images.generate with any model id from the catalog. Video and audio models use the universal /v1/run endpoint.

What is a Joule and how much does a call cost?

+

Joules are RentPrompts credits. You buy them on the Pricing page (/pricing): a custom amount costs ₹1 per Joule plus 18% GST, and the Joules go into the same wallet you use on the website. Every model's price in the catalog is listed in Joules. For example, a text model priced at 0.0025 Joules per 1,000 input tokens and 0.01 Joules per 1,000 output tokens costs 0.0025 + 0.005 = 0.0075 Joules for a call with 1,000 input and 500 output tokens. Each model's page shows this worked out from its own price.

How am I billed?

+

Requests are paid from your RentPrompts wallet in Joules, at exactly the price shown in the catalog — the same prices as the website. When a request starts, its worst-case cost is reserved from your balance; when it finishes you are charged the actual cost and the rest of the reservation is released. Failed generations are never charged. In the rare case a charge cannot be collected straight away, the unpaid amount is collected automatically on your next request. Each response reports cost_joules and your remaining balance.

What happens when my balance runs out?

+

Requests that could cost more than your available balance are rejected with HTTP 402 insufficient_balance before the model is called. Add Joules from your wallet and retry.

Can I limit how much a key spends?

+

Yes. Every key can have an optional monthly spend cap in Joules. Once a key reaches its cap, its requests fail with 402 spend_cap_exceeded until the next month or until you raise the cap. You can also restrict a key to specific model types and give it an expiry date.

What are the rate limits?

+

60 requests per minute per key, 120 per minute per account, and 5 concurrent requests per account. Exceeding a limit returns HTTP 429 with a retry-after header.

How do video and other long-running generations work?

+

Asynchronous models must be called on POST /v1/run. They answer HTTP 202 with a job object and a poll_url. Poll GET /v1/jobs/{id} until the status is succeeded (the output contains the file URL) or failed. Status polling has its own limit of 300 requests per minute per key.

Does the API support streaming, tools and JSON output?

+

Yes, for models whose catalog entry shows capabilities.streaming and capabilities.tools as true (models hosted on OpenAI-compatible providers — most text models). Those stream tokens live over server-sent events, accept tools, tool_choice and tool messages for function calling, and accept response_format with json_object or json_schema. Other text models still answer stream: true with the full reply in one chunk and refuse tools with HTTP 400 unsupported_parameter. n greater than 1, logprobs and logit_bias are not supported on any model.

Can I get a webhook instead of polling a video job?

+

Yes. Add "webhook": "https://your-server/path" to a /v1/run or /v1/images/generations request. When the job finishes, RentPrompts POSTs a signed job.succeeded or job.failed event to that URL, retrying for about 35 hours until your server answers 2xx. Events are signed with the Standard Webhooks scheme using your key's webhook secret, which you find on the API keys page.

Can I try a model before writing code?

+

Yes. Every model in the API runs on the website too: chat with text models in AI Chat (/generate/ai-chat) and try image, video and audio models from Generate (/generate/models). Prices are the same as the API (a few small text models are free on the website), paid from the same Joule wallet.

I lost my API key. Can I see it again?

+

No. Keys are stored only as hashes, so the full key is shown once at creation. Revoke the lost key and create a new one.

Does RentPrompts store my prompts or outputs from API calls?

+

The request log keeps metadata only — time, model, status, tokens, cost and latency. Prompt and output content is never stored in the log.

Start building

Free to sign up. One key for every model; pay only for what succeeds.

Get your API keySee what's new