Documentation
Quickstart
Make your first nabh.cloud API call in under five minutes.
1. Create an account
Sign up for nabh.cloud. You will receive ₹50 in free credits instantly — no card required — which is enough for thousands of requests on the free models.
2. Create an API key
In the dashboard, go to API Keys and create a key. Your key is shown only once, begins with nbh_, and is tied to your wallet. Store it securely — anyone with the key can spend your balance.
3. Install an SDK (optional)
The API is OpenAI-compatible, so you can use the official OpenAI libraries:
pip install openai
4. Make your first request
Point the client at https://api.nabh.cloud/v1 and pass your key. This example uses mistral-7b-instruct, which is available on every plan.
from openai import OpenAI
client = OpenAI(
base_url="https://api.nabh.cloud/v1",
api_key="nbh_your_key_here",
)
resp = client.chat.completions.create(
model="mistral-7b-instruct",
messages=[{"role": "user", "content": "नभ क्या है?"}],
)
print(resp.choices[0].message.content)5. Read the cost
The response body includes cost_inr and balance_inr, and the same values are returned as X-Cost-INR and X-Balance-INR headers — so you always know what each call cost and how much balance remains.
Streaming
Set stream: true to receive tokens as a server-sent event (SSE) stream, exactly like the OpenAI API.
stream = client.chat.completions.create(
model="llama-3-70b-instruct",
messages=[{"role": "user", "content": "Tell me a story"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)Next steps
- Browse the full model catalogue and pricing.
- Learn about authentication and key security.
- Understand rate limits and error handling.
