Documentation

SDKs & Libraries

nabh.cloud is OpenAI-compatible — use the tools you already know.

Use any OpenAI-compatible client

The API implements the OpenAI Chat Completions specification. To use it with the official OpenAI SDKs, change two things: the base URL to https://api.nabh.cloud/v1 and the API key to your nbh_ key. Set the model field to a nabh.cloud model ID (see Models).

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="llama-3-70b-instruct",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

Frameworks & tools

Anything that lets you point at a custom OpenAI-compatible endpoint works out of the box — including LangChain, LlamaIndex, the Vercel AI SDK, and most OpenAI-compatible desktop and CLI tools. Just override the base URL and key.

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    base_url="https://api.nabh.cloud/v1",
    api_key="nbh_your_key_here",
    model="llama-3-70b-instruct",
)
print(llm.invoke("Hello!").content)

Notes

  • Authenticate with Authorization: Bearer nbh_... or X-API-Key: nbh_....
  • Streaming is supported via stream: true (server-sent events).
  • Chat completions, embeddings, and image generation are available; pick the right model for each.
  • Every response returns cost_inr / balance_inr so you can track spend in your own app.