> ## 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.

# Baseten

> Get $30 in free credits for deploying and running AI models on Baseten

## Overview

Baseten provides a generous \$30 in trial credits to new users. Unlike token-based pricing, Baseten charges by compute time, giving you flexibility to run any supported model from their extensive library.

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

  <Card title="Pricing Model" icon="clock">
    Pay by compute time
  </Card>
</CardGroup>

## Available Models

Baseten offers access to any model in their extensive library. You pay based on the compute time used rather than per token, which can be more cost-effective for certain workloads.

<Info>
  Browse the complete model library at [baseten.co/library](https://www.baseten.co/library/)
</Info>

### Model Categories

* **Language Models**: Various sizes and architectures
* **Vision Models**: Image generation and analysis
* **Audio Models**: Speech and audio processing
* **Custom Models**: Deploy your own models

## Getting Started

### 1. Create an Account

Visit [app.baseten.co](https://app.baseten.co/) and sign up for a free account to receive your \$30 in credits.

### 2. Deploy a Model

Choose a model from the library or deploy your own.

### 3. Make API Calls

```python theme={null}
import requests

url = "https://model-<model-id>.api.baseten.co/production/predict"
headers = {
    "Authorization": f"Api-Key {YOUR_BASETEN_API_KEY}"
}

data = {
    "prompt": "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://model-<model-id>.api.baseten.co/production/predict',
  {
    method: 'POST',
    headers: {
      'Authorization': `Api-Key ${process.env.BASETEN_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      prompt: 'What is the capital of France?',
      max_tokens: 100
    })
  }
);

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

```bash theme={null}
curl -X POST https://model-<model-id>.api.baseten.co/production/predict \
  -H "Authorization: Api-Key YOUR_BASETEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "What is the capital of France?",
    "max_tokens": 100
  }'
```

## Pricing Model

<Note>
  Baseten charges by **compute time** rather than tokens. This means you're billed for the actual GPU/CPU time your model uses, which can be more economical for certain use cases.
</Note>

### Advantages of Compute-Time Pricing

* **Predictable costs** for batch processing
* **Cost-effective** for models with variable token generation
* **Flexible** for custom model deployments

## Use Cases

* **Model Deployment**: Deploy and test custom models
* **Batch Processing**: Run large-scale inference jobs
* **API Integration**: Build production applications with reliable endpoints
* **Model Comparison**: Test different models to find the best fit

## Resources

<CardGroup cols={2}>
  <Card title="Baseten Platform" icon="link" href="https://app.baseten.co/">
    Access the platform
  </Card>

  <Card title="Model Library" icon="book" href="https://www.baseten.co/library/">
    Browse available models
  </Card>
</CardGroup>

<Warning>
  Monitor your compute time usage to maximize your \$30 credit allocation. Different models have different compute costs.
</Warning>
