TarqaAITarqaAI
← Back to blog
getting-started

Getting Started: Your First AI Request in 5 Minutes

ST
Sudhanshu Tiwari
4 min read
A quick start guide to making your first API request using TarqaAI. No complex setup required.

Getting Started: Your First AI Request in 5 Minutes

Welcome to TarqaAI! This guide will get you up and running with AI-powered applications in just 5 minutes.

Step 1: Create Your Account (2 minutes)

2

Choose the free tier

3

Verify your email

4

Complete your profile

Your free account includes:

Step 2: Generate Your API Key (30 seconds)

1

Navigate to "API Keys" in your dashboard

2

Click "Create API Key"

3

Name it "development-key"

4

Copy and save it securely

bash
# Your API key will look like this:
tarqa_sk_1234567890abcdef...

Important: Never commit API keys to version control!

Step 3: Install the OpenAI SDK (30 seconds)

TarqaAI implements the OpenAI API spec. Use the standard OpenAI SDK — just point it at TarqaAI.

bash
# JavaScript/Node.js
npm install openai

# Python
pip install openai

Step 4: Make Your First Request (1 minute)

JavaScript / TypeScript

javascript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env.TARQA_API_KEY,
  baseURL: 'https://tarqaai.com/v1',  // only this line differs from OpenAI
});

const response = await client.chat.completions.create({
  model: 'gemini-2.5-flash',   // or claude-opus-4-6, gpt-4.1, llama-4-maverick …
  messages: [
    { role: 'user', content: 'Summarise the key principles of enterprise AI governance.' }
  ],
});

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

Python

python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv('TARQA_API_KEY'),
    base_url='https://tarqaai.com/v1',   # only this line differs from OpenAI
)

response = client.chat.completions.create(
    model='gemini-2.5-flash',
    messages=[
        {'role': 'user', 'content': 'Summarise the key principles of enterprise AI governance.'}
    ],
)

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

Step 5: Verify the Response

bash
export TARQA_API_KEY="your-api-key-here"

# Run the script
node hello-ai.js
# or
python hello_ai.py

You should receive an AI-generated response in standard OpenAI format. Any existing code that calls OpenAI works immediately with TarqaAI after the baseURL change.

Next Steps

1

Switch models — change the model field to claude-opus-4-6, gpt-4.1, llama-4-maverick — no other code changes needed

2

Enable streaming — add stream: true for real-time output

3

Explore RAG — index your documents and query them with AI

4

Monitor usage — view request analytics and costs in your dashboard

ST
About the Author
Sudhanshu Tiwari

Founder and CEO of TarqaAI. Building unified AI infrastructure to make AI integration simple and powerful for developers and enterprises.