# Groq Integration via LowCodeAPI

## Overview

Groq provides fast AI inference with access to state-of-the-art open-source models including Llama, Mixtral, and more. Build AI applications with ultra-low latency.

## Base Endpoint

```
https://api.lowcodeapi.com/groq/
```

## Authentication

LowCodeAPI handles authentication automatically using API key credentials.

**Auth Type**: API Key

## Common Endpoints

### Category: Chat

#### Create Chat Completion

**Method**: `POST` | **LowCodeAPI Path**: `/v1/chat/completions`

**Full URL**:
```
https://api.lowcodeapi.com/groq/v1/chat/completions?api_token={api_token}
```

**Description**: Create a chat completion

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `api_token` | string | Yes | Your LowCodeAPI authentication token |

**Body Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `messages` | array | Yes | Array of message objects |
| `model` | string | Yes | Model to use (e.g., llama3-70b-8192) |
| `temperature` | number | No | Sampling temperature |
| `max_tokens` | number | No | Maximum tokens to generate |

**Example Request**:
```bash
curl -X POST "https://api.lowcodeapi.com/groq/v1/chat/completions?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "Explain quantum computing"}
    ],
    "model": "llama3-70b-8192",
    "temperature": 0.7,
    "max_tokens": 500
  }'
```

---

## Usage Examples

### Example 1: Chat Completion

```bash
# Simple chat completion
# No ID required - creates new chat
curl -X POST "https://api.lowcodeapi.com/groq/v1/chat/completions?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "system", "content": "You are a helpful assistant"},
      {"role": "user", "content": "Write a haiku about AI"}
    ],
    "model": "llama3-70b-8192"
  }'
```

## Complete Endpoint Reference

- **Official Documentation**: [https://console.groq.com/docs](https://console.groq.com/docs)