Skip to main content

Getting Started

Go from a new account to your first request in about five minutes. Keep the Divyam console open alongside this page.

1. Sign up or sign in​

  1. Open the console. Choose Sign up for a new account or Sign in for an existing one.
  2. To sign up, enter your name and work email, accept the terms, and select Create account. To sign in, enter your email and select Send me a code.
  3. Enter the six-digit code from your email and select Verify and continue. If the code expires, select Resend code.

The email code only signs you into the console. Your application uses an API key instead.

2. Create an API key​

  1. In Getting Started, under Create an API key, select Issue a key.
  2. Enter a Key name that identifies the application, such as customer-app-test, and select Create key.
  3. Select Copy key and store the key in your application's secret settings.
  4. Check I understand this key will not be shown again, then select Done.
The key is shown once

Divyam shows the full key only once, when you create it. If you lose it, create a new key and revoke the old one. See API keys.

Shortcut: do step 3 with an AI agent

Have your API key from step 2 ready, then paste this into Claude Code, Codex or another coding agent. It saves your key, sends the first request, and confirms it worked.

Prompt
Save my Divyam API key and send a test request using https://docs.divyam.ai/divyam-setup.md

Your key never goes in the chat. The agent asks for it in a private prompt and saves it here, so later setups reuse it:

SystemWhere the key is saved
macOSLogin Keychain
Linux with a desktop keyringThe desktop keyring
Linux without a keyringA file only your user can read
WindowsA file encrypted for your Windows user account

Setting up an application also saves the key in that application's own settings.

When it's done, continue with step 4.

3. Send your first request​

Copy the Base URL shown under your key, and choose a model under Connect your application. The examples below use base URL https://api.preview.divyam.ai/v1 and model divyam-as/gpt-6-sol.

note

The model you choose in the console only changes the example. Your application sends its own model value with every request.

Put your key in an environment variable. In Bash, run this, paste the key at the prompt, and press Enter:

read -rsp 'Divyam API key: ' DIVYAM_API_KEY; printf '\n'; export DIVYAM_API_KEY

Then send a request from the same terminal:

Install the SDK with python3 -m pip install openai (Python 3.10 or later). Save this as first_request.py and run python3 first_request.py:

import os

from openai import OpenAI

client = OpenAI(
api_key=os.environ["DIVYAM_API_KEY"],
base_url="https://api.preview.divyam.ai/v1",
)
response = client.chat.completions.create(
model="divyam-as/gpt-6-sol",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(response.choices[0].message.content)

You should see a one-sentence answer. An SDK takes the base URL, and a direct HTTP request needs the full /chat/completions URL. If you get an error, see Troubleshooting.

For more on each language, including connecting your own application, see Code examples.

4. Find the request in Logs​

Open Logs in the console. Your request appears within a minute, newest first, with its status, token counts and latency. Select View request or View response to read the content. See Logs and usage for filters and details.

5. Check Usage and Credits​

Open Usage to see requests, tokens, success rate and spend for the period, and Credits & Billing to see your remaining credit. Both catch up within a few minutes of a request. See Logs and usage and Credits and billing.

To connect a real application, pick a guide under Integrations.

Find your way​

Console pageWhat it's forDocs
Getting StartedCreate a key and prepare your first request.Getting Started
API KeysCreate, rename, rotate and revoke keys.API keys
Models & PricingChoose a model and see its rates.Models and pricing
LogsFind single requests, their status, tokens and content.Logs and usage
UsageReview requests, tokens, spend and routing over time.Logs and usage
Credits & BillingCheck granted, spent and remaining credit.Credits and billing
AlertsGet emailed when credit is low or daily spend is high.Alerts