File size: 1,001 Bytes
959abc6
5f31b77
 
 
 
959abc6
5f31b77
959abc6
5f31b77
959abc6
 
5f31b77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
title: Uni API
emoji: 🌍
colorFrom: gray
colorTo: yellow
sdk: docker
app_port: 8000
pinned: false
license: gpl-3.0
---

# Uni API Deployment on HuggingFace Spaces

This space deploys the uni-api service, which provides unified management of multiple LLM API backends.

## Features

- Unified API interface for multiple LLM providers
- Load balancing across different API endpoints
- Support for OpenAI, Anthropic, Gemini, and other providers
- Automatic retry and failover mechanisms

## Usage

Once deployed, you can use this API endpoint like any OpenAI-compatible API:

```bash
curl -X POST https://your-space-name.hf.space/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
  "model": "gpt-4o",
  "messages": [{"role": "user", "content": "Hello!"}]
}'
```

## Configuration

The API configuration is managed through the `API_YAML_CONTENT` secret in the Space settings.

For more information, visit: https://github.com/yym68686/uni-api