Quick Start Guide

Get started with LangMart in just a few minutes. This guide walks you through signing up, getting your API key, and making your first API call.

Step 1: Sign Up or Sign In

The fastest way to get started is with Google or GitHub:

  1. Go to https://langmart.ai
  2. Click Sign in with Google or Sign in with GitHub
  3. Authorize LangMart to access your account
  4. You're in! You'll be redirected to the dashboard.

Option B: Guest Access

Want to try LangMart without creating an account?

  1. Go to https://langmart.ai
  2. Click Continue as Guest
  3. A temporary guest session will be created automatically

Note: Guest sessions have limited features. Sign up with OAuth to save your work and access all features.

Step 2: Get Your API Key

Once logged in, you need an API key to make API calls:

  1. Go to Settings in the sidebar (or click your profile icon)
  2. Navigate to the API Keys tab
  3. Click Create New Key
  4. Give your key a descriptive name (e.g., "Development", "Production")
  5. Copy your key immediately - it won't be shown again!

Your API key looks like: sk-langmart-xxxxxxxxxxxxxxxx

Security: Treat your API key like a password. Never commit it to source control or share it publicly.

Step 3: Make Your First API Call

LangMart provides an OpenAI-compatible API. You can use it with any OpenAI client library or make direct HTTP requests.

Using cURL

curl -X POST https://api.langmart.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "groq/llama-3.3-70b-versatile",
    "messages": [
      {"role": "user", "content": "Hello! What can you do?"}
    ]
  }'

Using Python (OpenAI SDK)

from openai import OpenAI

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

response = client.chat.completions.create(
    model="groq/llama-3.3-70b-versatile",
    messages=[
        {"role": "user", "content": "Hello! What can you do?"}
    ]
)

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

Using JavaScript/TypeScript

import OpenAI from 'openai';

const openai = new OpenAI({
  apiKey: 'YOUR_API_KEY',
  baseURL: 'https://api.langmart.ai/v1',
});

const response = await openai.chat.completions.create({
  model: 'groq/llama-3.3-70b-versatile',
  messages: [
    { role: 'user', content: 'Hello! What can you do?' }
  ],
});

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

Model Name Format

LangMart uses the format provider/model-name for model selection:

Model ID Provider Description
groq/llama-3.3-70b-versatile Groq Fast Llama 3.3 70B
openai/gpt-4o OpenAI GPT-4o
anthropic/claude-3.5-sonnet Anthropic Claude 3.5 Sonnet
google/gemini-1.5-pro Google Gemini 1.5 Pro

Browse all available models on the Models page in the dashboard.

Step 4: Use the Chat Interface

Don't want to write code? Use the built-in chat interface:

  1. Click Chat in the sidebar
  2. Select a model from the dropdown
  3. Type your message and press Enter
  4. View the response with token usage and timing

Chat Features

  • Model Selection - Switch between any available model
  • System Prompts - Set custom system instructions
  • Conversation History - Maintain multi-turn conversations
  • Token Count - See input/output token usage
  • Response Time - Track latency for each response
  • Export - Export conversations for later reference

Step 5: Explore the Dashboard

Now that you're set up, explore these key sections:

Section What You'll Find
Models Browse all available models with pricing and capabilities
Chat Interactive chat interface to test models
Analytics Usage statistics, costs, and performance metrics
Connections Add your own provider API keys (optional)
Settings Manage API keys, preferences, and account settings

What's Next?

Troubleshooting

"Invalid API key" Error

  • Make sure you copied the full API key including the sk-langmart- prefix
  • Check that you're using the correct header format: Authorization: Bearer YOUR_KEY

"Model not found" Error

  • Verify the model name follows the provider/model-name format
  • Check the Models page to ensure the model is available

Rate Limit Errors

  • LangMart automatically retries on rate limits with appropriate backoff
  • If you see persistent rate limits, your provider API key may have reached its quota

Connection Timeout

  • Check your network connection
  • Verify the API endpoint: https://api.langmart.ai
  • For longer responses, ensure your client has adequate timeout settings

Need more help? Check the Troubleshooting Guide or contact support.