Skip to main content

Your first 10 minutes after adding credits

Add credits with UPI, create an API key, send your first request with curl or the OpenAI Python SDK, and find your balance and usage.

Use this page with an AI assistant

Opens a new chat with this docs URL and the correct AICredits base URLs.

You paid, and now you want to see it work. Follow these steps in order. You do not need to be a developer for steps 1 to 3.

1. Add credits (about 1 minute)

  1. Open Dashboard → Billing.
  2. Pick an amount and choose a payment method (UPI, net banking or card).
  3. Complete the payment in the Razorpay window.

The balance is in rupees. It updates once Razorpay confirms the payment. If it has not changed after a few minutes, refresh the page and then write to support with your payment id.

2. Create an API key (1 minute)

  1. Open Dashboard → API Keys and create a new key.
  2. Give it a name. Optionally set a budget, a budget period (none, daily or monthly), an expiry date, and the models it may use.
  3. Copy the key now. It starts with sk- and is shown only once.

Set a spend limit on the key

The budget field is a spending cap in rupees for that key. When the key reaches it, requests return 402 until you raise the budget or the period resets. The wallet is the overall ceiling either way. A small budget is a good idea for a first key. See Authentication for the key options.

3. Send your first request (2 minutes)

Replace sk-your-key-here with your key. The base URL for OpenAI-style clients ends in /v1.

curl https://api.aicredits.in/v1/chat/completions \
  -H "Authorization: Bearer sk-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-6.1-sol",
    "messages": [{"role": "user", "content": "Say hello in one line."}]
  }'
pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aicredits.in/v1",
    api_key="sk-your-key-here",
)

reply = client.chat.completions.create(
    model="openai/gpt-6.1-sol",
    messages=[{"role": "user", "content": "Say hello in one line."}],
)
print(reply.choices[0].message.content)

If you get an answer, it works. You can try any model from the models page by changing the model value.

No code? The Playground in the dashboard lets you chat with a model using your credits, without writing anything.

4. See your balance and usage (1 minute)

curl https://api.aicredits.in/v1/credits \
  -H "Authorization: Bearer sk-your-key-here"

If something goes wrong

You seeDo this
401The key is wrong or was not copied fully. Fix it
402Wallet empty, or the key budget is reached. Fix it
404The model id is wrong. Copy it from the models page
429Too many requests at once. Slow down

More codes, and which failed calls are charged, are in Why a call failed, and whether you were charged.

Next steps