API Keys Overview

Quick Access: Account Settings

LangMart API keys are your credentials for accessing the LangMart platform programmatically. They authenticate your requests and enable you to use AI models through a unified, OpenAI-compatible API.

What Are LangMart API Keys?

A LangMart API key is a secret token that:

  • Authenticates your requests to LangMart's API
  • Links usage to your account for billing and analytics
  • Controls access permissions (read, write, admin)
  • Works with any provider you've connected (OpenAI, Anthropic, etc.)

LangMart Keys vs Provider Keys

It's important to understand the difference:

Type Purpose Example
LangMart API Key Authenticates with LangMart sk-test-abc123...
Provider API Key Authenticates with AI providers sk-openai..., sk-ant-...

How They Work Together

Your Application
       │
       │ LangMart API Key (authenticates you)
       ▼
┌─────────────┐
│   LangMart  │
│  (Gateway)  │
└──────┬──────┘
       │ Provider API Key (stored in your connection)
       ▼
┌─────────────┐
│  Provider   │
│ (OpenAI,    │
│ Anthropic)  │
└─────────────┘

You use ONE LangMart key to access ALL your connected providers. The provider keys are stored securely in your connections.

When to Use API Keys

Use LangMart API Keys When:

  • Building applications that call AI models
  • Integrating AI into your backend services
  • Running scripts or automation
  • Testing AI models programmatically

Use the Web Interface When:

  • Exploring models interactively
  • Managing connections and settings
  • Viewing analytics dashboards
  • Administrative tasks

Key Formats

LangMart API keys follow this format:

sk-{env}-{random}
Component Description Example
sk- Standard prefix sk-
{env} Environment identifier test, prod
{random} 64 random hex characters a1b2c3...

Examples:

  • Development key: sk-test-a1b2c3d4e5f6...
  • Production key: sk-prod-x9y8z7w6v5u4...

Key Types

Permanent Keys

  • Created manually via dashboard or API
  • Don't expire unless you set an expiration date
  • Best for: production applications, long-running services

Temporary Keys

  • Auto-generated for short-term use
  • Expire after a set duration (hours or days)
  • Best for: testing, demos, temporary access

Session Keys

  • System-generated during login
  • Tied to your browser session
  • Used internally by the web interface

Permissions

API keys can have different permission levels:

Permission Description Can Do
read Read-only access List models, view analytics
write Standard access Make inference requests, create connections
admin Full access Manage organization, create keys, admin operations

Default: New keys are created with ['read', 'write'] permissions.

Key Limits

Each account has limits on API keys:

Limit Value
Maximum active keys 10 per user
Key name length 1-100 characters
Concurrent requests Based on your plan

Quick Start

Ready to create your first API key? See Creating API Keys.

Security Notice

Treat API keys like passwords:

  • Never share keys publicly
  • Never commit keys to version control
  • Rotate keys if they may be compromised
  • Use environment variables in your code

See API Key Security for detailed best practices.

Feature Direct Link
Account Settings https://langmart.ai/settings
Connections https://langmart.ai/connections
Support https://langmart.ai/support