Quick Start

Get your first API call running in under 2 minutes.

1. Get an API Key

Sign in to the dashboard and create an API key. Copy it — you won't see it again.

2. Make Your First Request

DirectAI is OpenAI-compatible. Point any OpenAI SDK or HTTP client at https://api.agilecloud.ai and use your API key.

cURL

curl https://api.agilecloud.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-2.5-3b",
    "messages": [
      {"role": "user", "content": "Hello, world!"}
    ]
  }'

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    base_url="https://api.agilecloud.ai/v1",
    api_key="YOUR_API_KEY",
)

response = client.chat.completions.create(
    model="qwen-2.5-3b",
    messages=[{"role": "user", "content": "Hello, world!"}],
)

print(response.choices[0].message.content)

JavaScript (OpenAI SDK)

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.agilecloud.ai/v1",
  apiKey: "YOUR_API_KEY",
});

const response = await client.chat.completions.create({
  model: "qwen-2.5-3b",
  messages: [{ role: "user", content: "Hello, world!" }],
});

console.log(response.choices[0].message.content);

3. Explore Endpoints

DirectAI exposes three primary inference endpoints, plus passthrough access to frontier models:

4. What's Included

Every request through DirectAI automatically gets compliance and platform features at no extra cost:

  • Content safety guardrails and PII detection
  • Prompt injection prevention
  • Audit logging with correlation IDs
  • HIPAA and SOC 2 compliance exports
  • Token-bucket rate limiting
  • Semantic caching — deduplicate similar requests for cost savings
  • Batch API — async bulk inference at 50% off
  • RAG — managed vector search and grounded generation
  • Smart routing — A/B testing, budget controls, and fallback chains
  • Prompt management — versioned templates with Jinja2 rendering