← Back to Tech Blog

Getting Started: Integrate AI API in 3 Minutes

Welcome to LingTrue! This guide will walk you through integrating our unified AI API gateway into your application in just 3 minutes.

Step 1: Create Your Account

Visit our registration page to create a free account. You'll receive complimentary credits to get started immediately.

Step 2: Generate an API Key

After logging in, navigate to the Token Management page in your dashboard. Click "Create Token" to generate your universal API key.

Your API key works with all 35+ supported models — no need to create separate keys for different providers.

Step 3: Make Your First API Call

LingTrue is fully compatible with the OpenAI SDK format. Simply replace the base URL and API key:

curl https://www.lingtrue.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Step 4: Use with Popular SDKs

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://www.lingtrue.com/v1"
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

Node.js

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://www.lingtrue.com/v1'
});

const response = await client.chat.completions.create({
  model: 'claude-sonnet-4-20250514',
  messages: [{ role: 'user', content: 'Hello!' }]
});
console.log(response.choices[0].message.content);

Smart Routing

LingTrue automatically routes your requests to the optimal provider based on price, latency, and availability. You can access models from OpenAI, Anthropic, Google, and more — all through a single endpoint.

Pro tip: Check the Model Pricing page to see real-time pricing for all available models and find the best value for your use case.

What's Next?