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(7mo ago)00MITPHPCI failing

Since Nov 16Pushed 6mo 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 today

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

25

—

LowBetter than 35% of packages

Maintenance65

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

231d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13899502?v=4)[tourze](/maintainers/tourze)[@tourze](https://github.com/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

[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M577](/packages/shopware-core)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)[sylius/sylius

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

8.5k5.9M737](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)

PHPackages © 2026

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