> ## Documentation Index
> Fetch the complete documentation index at: https://student-213fb9fc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# cURL Reference

> Make API calls to AJ STUDIOZ Cloud Infra using cURL

## Authentication

All requests require the `Authorization: Bearer YOUR_API_KEY` header.

```bash theme={null}
export AJSTUDIOZ_API_KEY="your-api-key-here"
```

***

## Ollama-Compatible API

### Chat

```bash theme={null}
curl https://api.ajstudioz.co.in/api/chat \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma3:27b",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "What is the speed of light?"}
    ],
    "stream": false
  }'
```

### Chat (Streaming)

```bash theme={null}
curl https://api.ajstudioz.co.in/api/chat \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v3.2",
    "messages": [{"role": "user", "content": "Count to 10."}],
    "stream": true
  }'
```

### Generate (Text Completion)

```bash theme={null}
curl https://api.ajstudioz.co.in/api/generate \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma3:4b",
    "prompt": "Once upon a time in a galaxy far away",
    "stream": false
  }'
```

### List Models

```bash theme={null}
curl https://api.ajstudioz.co.in/api/tags \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY"
```

### Show Model Info

```bash theme={null}
curl https://api.ajstudioz.co.in/api/show \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma3:27b"
  }'
```

### Embeddings

```bash theme={null}
curl https://api.ajstudioz.co.in/api/embeddings \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma3:4b",
    "prompt": "AJ STUDIOZ Cloud Infra provides AI inference"
  }'
```

***

## OpenAI-Compatible API

### Chat Completions

```bash theme={null}
curl https://api.ajstudioz.co.in/v1/chat/completions \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5",
    "messages": [
      {"role": "user", "content": "What is the meaning of life?"}
    ],
    "temperature": 0.8,
    "max_tokens": 200
  }'
```

### Text Completions

```bash theme={null}
curl https://api.ajstudioz.co.in/v1/completions \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma3:4b",
    "prompt": "The benefits of cloud computing include",
    "max_tokens": 100
  }'
```

### List Models (OpenAI format)

```bash theme={null}
curl https://api.ajstudioz.co.in/v1/models \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY"
```

### Embeddings (OpenAI format)

```bash theme={null}
curl https://api.ajstudioz.co.in/v1/embeddings \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma3:4b",
    "input": "Hello, world!"
  }'
```

***

## Pretty JSON Output

Pipe through `jq` for readable output:

```bash theme={null}
curl https://api.ajstudioz.co.in/api/tags \
  -H "Authorization: Bearer $AJSTUDIOZ_API_KEY" | jq '.models[] | {name, size}'
```
