> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/cheahjs/free-llm-api-resources/llms.txt
> Use this file to discover all available pages before exploring further.

# AI21 Studio

> Get $10 in free credits for 3 months to access the Jamba family of models

## Overview

AI21 Studio provides \$10 in trial credits valid for 3 months, giving you access to their Jamba family of models, which combine transformer and Mamba architectures for efficient long-context processing.

<CardGroup cols={2}>
  <Card title="Trial Credits" icon="dollar-sign">
    \$10 in free credits
  </Card>

  <Card title="Duration" icon="calendar">
    Valid for 3 months
  </Card>
</CardGroup>

## Available Models

AI21 Studio specializes in the **Jamba family of models**, which feature a hybrid architecture combining transformers and Mamba for efficient processing of long contexts.

### Jamba Models

<Info>
  The Jamba family is designed for **long-context understanding** and generation, making them ideal for document analysis, summarization, and extended conversations.
</Info>

* **Jamba 1.5 Large**: High-performance model for complex tasks
* **Jamba 1.5 Mini**: Efficient model for faster inference
* **Jamba Instruct**: Optimized for instruction-following

## Getting Started

### 1. Sign Up

Visit [studio.ai21.com](https://studio.ai21.com/) and create a free account to receive your \$10 in trial credits.

### 2. Get Your API Key

Navigate to your account settings to generate an API key.

### 3. Make API Calls

```python theme={null}
import requests

url = "https://api.ai21.com/studio/v1/chat/completions"
headers = {
    "Authorization": f"Bearer {YOUR_AI21_API_KEY}",
    "Content-Type": "application/json"
}

data = {
    "model": "jamba-1.5-large",
    "messages": [{
        "role": "user",
        "content": "What is the capital of France?"
    }],
    "max_tokens": 100
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
```

```javascript theme={null}
const response = await fetch(
  'https://api.ai21.com/studio/v1/chat/completions',
  {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.AI21_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      model: 'jamba-1.5-large',
      messages: [{
        role: 'user',
        content: 'What is the capital of France?'
      }],
      max_tokens: 100
    })
  }
);

const result = await response.json();
console.log(result);
```

```bash theme={null}
curl https://api.ai21.com/studio/v1/chat/completions \
  -H "Authorization: Bearer YOUR_AI21_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jamba-1.5-large",
    "messages": [{
      "role": "user",
      "content": "What is the capital of France?"
    }],
    "max_tokens": 100
  }'
```

## Key Features

### Hybrid Architecture

The Jamba models combine:

* **Transformer layers**: For attention-based processing
* **Mamba layers**: For efficient long-sequence handling

### Long Context Windows

<Note>
  Jamba models excel at processing **very long contexts**, making them ideal for document analysis, legal text processing, and extensive conversational history.
</Note>

## Use Cases

* **Document Analysis**: Process and understand long documents
* **Summarization**: Generate summaries of extensive content
* **Long Conversations**: Maintain context over extended dialogues
* **Research**: Analyze academic papers and technical documentation
* **Legal/Medical**: Process domain-specific long-form text

## Resources

<CardGroup cols={2}>
  <Card title="AI21 Studio" icon="link" href="https://studio.ai21.com/">
    Access the platform
  </Card>

  <Card title="Documentation" icon="book" href="https://docs.ai21.com/">
    View API documentation
  </Card>
</CardGroup>

<Warning>
  Your \$10 credit expires after 3 months. Plan your usage accordingly to maximize value.
</Warning>
