Build with Darvi-Gen via a single OpenAI-compatible API.
Direct programmatic access to Darvi-Gen by Rasayan Labs Inc. Engineered for frontier chemistry, drug discovery, scientific reasoning, and general-purpose intelligence with SSE streaming, vision inputs, tool calling, and strict JSON outputs.
Available Models
All model aliases share a 262,144-token context window, vision (image_url), function calling, and strict structured JSON outputs. You can also pass reasoning_effort ("none", "low", or "high") on any request.
Balanced reasoning effort (low) for fast, high-accuracy scientific synthesis, Q&A, coding, and general intelligence.
Extended multi-step reasoning (high) for complex retrosynthesis, reaction mechanisms, Olympiad chemistry, and hard STEM prompts.
Direct response mode (reasoning_effort: "none") optimized for high-throughput extraction, classification, and instant chat.
Transparent Token Pricing
Pay strictly for what you use from your prepaid credit balance. Verified users receive $1.00 free starter credit and can top up anytime ($10 / $25 / $50 / $100) via secure Bank of America checkout.
| Model ID | Context Window | Standard Rate (Input / Output per 1M tokens) | Verified Academic Rate (50% Off) | Capabilities |
|---|---|---|---|---|
| darvi-gen | 262,144 | $1.50 / $6.00 | $0.75 / $3.00 | Text, Vision, Tools, JSON, Streaming |
| darvi-gen-high | 262,144 | $1.50 / $6.00 | $0.75 / $3.00 | Deep Reasoning, Vision, Tools, JSON |
| darvi-gen-fast | 262,144 | $1.50 / $6.00 | $0.75 / $3.00 | Low-Latency Direct Output, Vision, Tools |
usage.completion_tokens_details.reasoning_tokens. Prompts and completions are never stored on disk.
Quickstart
Drop directly into any OpenAI SDK by pointing base_url to https://api.darvi.ai/v1 and passing your sk-darvi-... API key.
from openai import OpenAI
client = OpenAI(
base_url="https://api.darvi.ai/v1",
api_key="sk-darvi-YOUR_API_KEY",
)
response = client.chat.completions.create(
model="darvi-gen",
messages=[
{"role": "user", "content": "Propose a 2-step synthesis of ibuprofen from isobutylbenzene."}
],
stream=True,
stream_options={"include_usage": True},
)
for chunk in response:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.darvi.ai/v1",
apiKey: process.env.DARVI_API_KEY,
});
const completion = await client.chat.completions.create({
model: "darvi-gen-high",
messages: [
{ role: "user", content: "Compare Suzuki-Miyaura vs Buchwald-Hartwig catalyst selection." }
],
});
console.log(completion.choices[0].message.content);
console.log(completion.usage);
curl https://api.darvi.ai/v1/chat/completions \
-H "Authorization: Bearer sk-darvi-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "darvi-gen",
"reasoning_effort": "low",
"stream": true,
"stream_options": {"include_usage": true},
"messages": [
{"role": "user", "content": "What is the IUPAC name and molecular weight of aspirin?"}
]
}'
curl https://api.darvi.ai/v1/usage \ -H "Authorization: Bearer sk-darvi-YOUR_API_KEY"
Endpoints & Headers
| Method & Path | Auth | Description |
|---|---|---|
| POST /v1/chat/completions | Bearer Key | OpenAI-compatible chat completions (streaming SSE, vision, tool calling, strict JSON, reasoning_effort). |
| GET /v1/models | Optional | Lists available Darvi models and capabilities. |
| GET /v1/pricing | Public | Machine-readable JSON pricing table for standard & academic rates. |
| GET /v1/usage | Bearer Key | Returns current credit balance, active rate tier, and 24h / 30d / all-time token consumption. |
| GET /health | Public | Real-time service and inference cluster health status. |