Live Production API · OpenAI SDK Compatible · 262K Context

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.

Create API Key ($1.00 Free Starter Credit) → View ChemBench & Frontier Scorecard GET /v1/models
Base URL https://api.darvi.ai/v1

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.

Default · Balanced
darvi-gen

Balanced reasoning effort (low) for fast, high-accuracy scientific synthesis, Q&A, coding, and general intelligence.

Deep Reasoning
darvi-gen-high

Extended multi-step reasoning (high) for complex retrosynthesis, reaction mechanisms, Olympiad chemistry, and hard STEM prompts.

Low Latency
darvi-gen-fast

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
Automatic 50% Academic Researcher Discount: Sign in on darvi.ai/developers with your verified university or Rasayan academic email. Your API keys automatically bill at $0.75 / 1M input and $3.00 / 1M output tokens. Output tokens include internal reasoning tokens reported in 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.