Skip to main content
DocsQuickstart

Docs / Quickstart

Run your first model request with one API key.

This quickstart keeps only paths that can be verified immediately: create an API key, set an environment variable, and make a curl request. DeepAILab SDKs are not shown as the primary path until they are publicly available.

Verify first, then integrate.

1. Create an API key

Create a key from the API Keys page. Store it in local environment variables or server-side secret management, never in client-side code.

2. Set environment variable

Set the key in your shell or deployment environment.

export DEEPAILAB_API_KEY="your-api-key-here"

3. Make the first request

DeepAILab API follows an OpenAI-compatible shape. Start with curl to verify network, key, model id, and quota.

curl https://api.deepailab.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DEEPAILAB_API_KEY" \
  -d '{
    "model": "claude-sonnet-4-6",
    "messages": [
      {"role": "user", "content": "Explain DeepAILab API in one sentence"}
    ]
  }'

4. Configure local AI tools

If you use Claude Code, OpenClaw, OpenCode, or DAL Code, start from /dev-tools and follow Detect, Preview, Install, Verify, Rollback.

Use OpenAI-compatible clients.

We recommend REST/curl or OpenAI-compatible clients for fast integration with the DeepAILab API.

JavaScript

Use the official openai npm package with baseURL.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.DEEPAILAB_API_KEY,
  baseURL: "https://api.deepailab.ai/v1",
});

const response = await client.chat.completions.create({
  model: "claude-sonnet-4-6",
  messages: [{ role: "user", content: "Hello DeepAILab" }],
});

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

Python

Use the official openai Python package with base_url.

from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["DEEPAILAB_API_KEY"],
    base_url="https://api.deepailab.ai/v1",
)

response = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Hello DeepAILab"}],
)

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

Next steps