PHPackages                             tourze/deep-seek-api-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tourze/deep-seek-api-bundle

ActiveSymfony-bundle[API Development](/categories/api)

tourze/deep-seek-api-bundle
===========================

DeepSeek API integration bundle for Symfony

0.0.1(6mo ago)00MITPHPCI failing

Since Nov 16Pushed 5mo agoCompare

[ Source](https://github.com/tourze/deep-seek-api-bundle)[ Packagist](https://packagist.org/packages/tourze/deep-seek-api-bundle)[ RSS](/packages/tourze-deep-seek-api-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (46)Versions (2)Used By (0)

DeepSeekApiBundle
=================

[](#deepseekapibundle)

[English](README.md) | [中文](README.zh-CN.md)

A Symfony bundle for integrating with DeepSeek API, providing API key management, model listing, and balance checking capabilities.

Features
--------

[](#features)

- Multiple API key management with automatic rotation
- List available models for each API key
- Check account balance in multiple currencies
- Validate API keys
- Command-line tools for API interaction

Installation
------------

[](#installation)

```
composer require tourze/deep-seek-api-bundle
```

Configuration
-------------

[](#configuration)

Configure your API keys in your Symfony configuration:

```
# config/packages/deep_seek_api.yaml
deep_seek_api:
    api_keys:
        - 'your-api-key-1'
        - 'your-api-key-2'
```

Commands
--------

[](#commands)

### Analyze Balance Trends

[](#analyze-balance-trends)

Analyze balance changes and usage patterns over time.

```
# Analyze balance for the last 7 days
bin/console deep-seek:analyze-balance

# Analyze balance for specific number of days
bin/console deep-seek:analyze-balance --days=30

# Analyze with specific time interval (hourly, daily, weekly)
bin/console deep-seek:analyze-balance --interval=daily

# Display in specific currency
bin/console deep-seek:analyze-balance --currency=CNY

# Show alerts for significant changes
bin/console deep-seek:analyze-balance --show-alerts
```

### Manage API Keys

[](#manage-api-keys)

Manage DeepSeek API keys including listing, adding, and deactivating.

```
# List all API keys
bin/console deep-seek:api-key list

# Add a new API key
bin/console deep-seek:api-key add sk-your-api-key --name="Production Key"

# Deactivate an API key
bin/console deep-seek:api-key deactivate sk-your-api-key

# Activate an API key
bin/console deep-seek:api-key activate sk-your-api-key

# Show API key details
bin/console deep-seek:api-key show sk-your-api-key
```

### Check Balance

[](#check-balance)

Check the current balance for all API keys or a specific key.

```
# Check balance for all keys
bin/console deepseek:balance:check

# Check balance with detailed output
bin/console deepseek:balance:check --verbose
```

### List Models

[](#list-models)

List all available models from DeepSeek API.

```
# List models for all keys
bin/console deepseek:models:list

# List models in JSON format
bin/console deepseek:models:list --json
```

### Validate API Key

[](#validate-api-key)

Validate whether API keys are working correctly.

```
# Validate all API keys
bin/console deepseek:api-key:validate --all-keys

# Validate specific API key
bin/console deepseek:api-key:validate --key=sk-your-api-key
```

### Sync Data

[](#sync-data)

Synchronize models and balance data from DeepSeek API.

```
# Sync all data (models and balances)
bin/console deep-seek:sync-data

# Sync only models
bin/console deep-seek:sync-data --models-only

# Sync only balances
bin/console deep-seek:sync-data --balances-only

# Force sync even if recently synced
bin/console deep-seek:sync-data --force
```

Usage in Code
-------------

[](#usage-in-code)

### Using DeepSeekService

[](#using-deepseekservice)

```
use Tourze\DeepSeekApiBundle\Service\DeepSeekService;

class MyService
{
    public function __construct(
        private DeepSeekService $deepSeekService
    ) {}

    public function example(): void
    {
        // List models
        $models = $this->deepSeekService->listModels();

        // Check balance
        $balance = $this->deepSeekService->getBalance();

        // Validate API key
        $isValid = $this->deepSeekService->validateApiKey('your-api-key');
    }
}
```

### Managing API Keys

[](#managing-api-keys)

```
use Tourze\DeepSeekApiBundle\Service\ApiKeyManager;

class MyKeyManager
{
    public function __construct(
        private ApiKeyManager $apiKeyManager
    ) {}

    public function example(): void
    {
        // Add a new API key
        $this->apiKeyManager->addApiKey('new-api-key');

        // Rotate to next key
        $this->apiKeyManager->rotateToNextKey();

        // Get current key
        $currentKey = $this->apiKeyManager->getCurrentKey();

        // Mark key as invalid
        $this->apiKeyManager->markKeyAsInvalid('bad-key');
    }
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance71

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

184d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e354fdb316da535dfa8ba2e9193a473c403b6bc6fb9170778d1dc50e304c6e9d?d=identicon)[tourze](/maintainers/tourze)

---

Top Contributors

[![tourze](https://avatars.githubusercontent.com/u/13899502?v=4)](https://github.com/tourze "tourze (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-deep-seek-api-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-deep-seek-api-bundle/health.svg)](https://phpackages.com/packages/tourze-deep-seek-api-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
