Pular para o conteúdo principal

AI21

AI21 Labs develops the Jamba family of models, built on a unique hybrid Mamba-Transformer architecture (SSM + attention). All Jamba models feature a 256K context window, making them strong candidates for tasks requiring very long input. The API uses an OpenAI-compatible format.

Getting an API Key

  1. Visit studio.ai21.com/account/api-key
  2. Sign in or create an AI21 Studio account
  3. Copy your API key
  4. Paste the key into AISCouncil under Settings > AI Model > AI21
aviso

AI21 does not offer a free API tier. All usage is pay-as-you-go. See ai21.com/pricing for current rates.

API keys are stored locally in your browser (localStorage) and are never included in shared bot URLs.

Supported Models

ModelContextMax OutputInput PriceOutput PriceCapabilities
Jamba 1.5 Large256K4K$2.00/MTok$8.00/MTokTools, streaming
Jamba 1.7 Large256K4K$2.00/MTok$8.00/MTokTools, streaming
Jamba 1.5 Mini256K4K$0.20/MTok$0.40/MTokTools, streaming
Jamba 2 Mini256K4K$0.20/MTok$0.40/MTokTools, streaming

Prices are per million tokens (MTok). See ai21.com/pricing for the latest rates.

Choosing a Model
  • Jamba 1.7 Large is the latest large model -- best quality for complex tasks.
  • Jamba 2 Mini is the latest small model -- fast and affordable at $0.20/MTok input.
  • All models share the same 256K context window, so choose based on quality vs. cost needs.

Mamba Architecture

Jamba uses a hybrid SSM (Structured State Space Model) and Transformer architecture. The Mamba component enables efficient processing of very long sequences without the quadratic cost of pure attention. This is why all Jamba models offer 256K context at reasonable prices -- the architecture handles long input more efficiently than standard Transformers.

Configuration

Select AI21 as the provider when creating a bot profile. The app connects to api.ai21.com/studio/v1 using the OpenAI-compatible format with Bearer authentication.

Tips for Best Results

  • Use Jamba for long-document processing. The 256K context across all models means you can feed in large documents, codebases, or datasets without worrying about truncation.
  • Try the Mini models for cost-sensitive workflows. At $0.20/MTok input with 256K context, Jamba Mini offers one of the best context-per-dollar ratios available.
  • Jamba handles structured data well. The architecture performs strongly on tasks involving tables, JSON, and structured text.