# DeepSeek Integration via LowCodeAPI

## Overview

Large-scale language models and AI services with advanced chat completion and code generation capabilities

## Base Endpoint

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

## Authentication

LowCodeAPI handles authentication automatically. You only need to:

1. **Sign up** at [https://www.deepseek.com](https://www.deepseek.com)
2. **Get your credentials** from [NA](NA)
3. **Connect your account** in LowCodeAPI dashboard
4. **Use your `api_token`** in all requests

The `api_token` is your LowCodeAPI authentication token. LowCodeAPI will automatically:
- Fetch your DeepSeek API key
- Apply it to each request with `Authorization` header

**Auth Type**: API Key (Authorization header)

## API Categories

- Frontier AI labs

## Common Endpoints

### Category: Chat

#### Create Chat Completion

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

**Full URL**:
```
https://api.lowcodeapi.com/deepseek/chat/completions&api_token={api_token}
```


**Body Parameters**:

| `stop` | object | No | Stop |
| `model` | string | Yes | Model |
| `tools` | object | No | Stop |
| `top_p` | number | No | Top P |
| `stream` | boolean | No | If set, partial message deltas will be sent. |
| `logprobs` | boolean | No | Whether to return log probabilities of the output tokens or not |
| `messages` | array | Yes | A list of messages comprising the conversation so far |
| `max_tokens` | number | No | Max Tokens |


**Example Request**:
```bash
curl -X POST "https://api.lowcodeapi.com/deepseek/chat/completions?&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"stop":"value","model":"value","tools":"value"}'
```

**Official Documentation**: [https://api-docs.deepseek.com/api/create-chat-completion](https://api-docs.deepseek.com/api/create-chat-completion)

---

### Category: Completions

#### Create FIM Completion (Beta)

**Method**: `POST` | **LowCodeAPI Path**: `/beta/completions`

**Full URL**:
```
https://api.lowcodeapi.com/deepseek/beta/completions&api_token={api_token}
```


**Body Parameters**:

| `echo` | boolean | No | Echo back the prompt in addition to the completion |
| `stop` | object | No | Stop |
| `model` | string | Yes | ID of the model to use. |
| `top_p` | number | No | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. |
| `prompt` | number | Yes | The prompt to generate completions for. |
| `stream` | boolean | No | If set, partial message deltas will be sent. |
| `suffix` | string | No | The suffix that comes after a completion of inserted text. |
| `logprobs` | boolean | No | Whether to return log probabilities of the output tokens or not |


**Example Request**:
```bash
curl -X POST "https://api.lowcodeapi.com/deepseek/beta/completions?&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"echo":"value","stop":"value","model":"value"}'
```

**Official Documentation**: [https://api-docs.deepseek.com/api/create-completion](https://api-docs.deepseek.com/api/create-completion)

---

### Category: Models

#### Lists Models

**Method**: `GET` | **LowCodeAPI Path**: `/models`

**Full URL**:
```
https://api.lowcodeapi.com/deepseek/models&api_token={api_token}
```


**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/deepseek/models&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
```

**Official Documentation**: [https://api-docs.deepseek.com/api/list-models](https://api-docs.deepseek.com/api/list-models)

---

### Category: Others

#### Get User Balance

**Method**: `GET` | **LowCodeAPI Path**: `/user/balance`

**Full URL**:
```
https://api.lowcodeapi.com/deepseek/user/balance&api_token={api_token}
```


**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/deepseek/user/balance&api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
```

**Official Documentation**: [https://api-docs.deepseek.com/api/get-user-balance](https://api-docs.deepseek.com/api/get-user-balance)

---

## Usage Examples

### Example 1: Basic Usage

Get started with DeepSeek API by making your first request.

```bash
# Your example code here
# This demonstrates basic usage
curl -X GET "https://api.lowcodeapi.com/deepseek/?api_token=YOUR_API_TOKEN"
```

### Example 2: Advanced Usage

Explore more advanced features and parameters.

```bash
# Your example code here
# This demonstrates advanced usage
curl -X GET "https://api.lowcodeapi.com/deepseek/?api_token=YOUR_API_TOKEN"
```

## Complete Endpoint Reference

For a complete list of all endpoints and their parameters, refer to:
- **OpenAPI Definition**: `https://backend.lowcodeapi.com/deepseek/definition`
- **Official Provider Documentation**: [https://api-docs.deepseek.com](https://api-docs.deepseek.com)

## Rate Limits & Best Practices

- Check your DeepSeek account for specific rate limits
- Use appropriate error handling and retry logic
- Cache responses when appropriate to reduce API calls

## Error Handling

Standard HTTP status codes apply:
- `400` - Invalid request parameters
- `401` - Unauthorized (check your API key)
- `429` - Rate limit exceeded
- `500` - Internal server error