ZeliAI — 16개+ AI 모델을 하나의 API로. Python SDK for the ZeliAI B2B API.
Project description
ZeliAI Python SDK
16개+ AI 모델을 하나의 API로. GPT-5, Claude, Gemini, Grok — 모든 모델을
pip install zeliai한 줄로.
설치
pip install zeliai
빠른 시작
from zeliai import ZeliAI
client = ZeliAI(api_key="zeliai-xxxx...")
# 채팅
response = client.chat("파이썬으로 퀵소트 설명해줘", model="gpt-5.2")
print(response.content)
인증
API 키를 직접 전달하거나 환경변수로 설정하세요:
export ZELIAI_API_KEY="zeliai-xxxx..."
# 환경변수 자동 감지
client = ZeliAI()
API 가이드
💬 채팅
# 기본 채팅
response = client.chat("안녕하세요!")
print(response.content)
# 모델 지정
response = client.chat("설명해줘", model="claude-opus-4.5")
# 시스템 지시
response = client.chat(
"매출 데이터 분석해줘",
model="gemini-3-pro",
system="당신은 전문 데이터 분석가입니다. 한국어로 답변하세요."
)
# 대화 이어가기 (세션)
r1 = client.chat("내 이름은 지민이야", model="gpt-5.2")
r2 = client.chat("내 이름이 뭐라고 했지?", model="gpt-5.2", session_id=r1.session_id)
🌊 스트리밍
for chunk in client.chat_stream("긴 이야기를 해줘", model="gpt-5.2"):
print(chunk, end="", flush=True)
🔍 검색
result = client.search("2026년 AI 트렌드")
print(result.ai_summary)
for r in result.results:
print(f" 📄 {r.title}: {r.url}")
📄 문서 Q&A
result = client.document_qa(
question="이 계약서의 만료일은 언제인가요?",
file_path="contract.pdf",
model="gpt-5.2"
)
print(result.answer)
📊 모델 & 사용량
# 사용 가능한 모델
for m in client.models():
print(f"{m.id}: {m.description}")
# 사용량 확인
usage = client.usage()
print(f"총 요청: {usage.total_requests}, 총 토큰: {usage.total_tokens}")
# 서버 상태
print(client.health())
예외 처리
from zeliai import ZeliAI, AuthenticationError, RateLimitError, ModelNotFoundError
try:
response = client.chat("테스트")
except AuthenticationError:
print("❌ API 키가 유효하지 않습니다")
except RateLimitError:
print("⏳ 요청 한도 초과. 잠시 후 다시 시도하세요")
except ModelNotFoundError as e:
print(f"🤖 {e.message}")
지원 모델
| Provider | Models | Model ID |
|---|---|---|
| OpenAI | GPT-5.2, GPT-5, GPT-5 Mini, GPT-5 Nano | gpt-5.2, gpt-5, gpt-5-mini, gpt-5-nano |
| Anthropic | Claude Opus 4.5, Opus 4.1, Sonnet 4 | claude-opus-4.5, claude-opus-4.1, claude-sonnet-4 |
| Gemini 3 Pro, 2.5 Pro, 2.5 Flash | gemini-3-pro, gemini-2.5-pro, gemini-2.5-flash |
|
| xAI | Grok-4, Grok-4.1 FR, Grok Code | grok-4, grok-4.1-fast, grok-code-fast |
전체 모델 목록: client.models()
Context Manager
with ZeliAI(api_key="zeliai-xxxx...") as client:
response = client.chat("안녕!")
print(response.content)
# 자동 리소스 정리
License
MIT
ZeliAI — zeliai.com
문의: dev@zeliai.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zeliai-0.1.0.tar.gz
(10.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
zeliai-0.1.0-py3-none-any.whl
(10.6 kB
view details)
File details
Details for the file zeliai-0.1.0.tar.gz.
File metadata
- Download URL: zeliai-0.1.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dff4e8add82d511a097a2c034f468c16e730353ed363d7705ec9293e790b0dc
|
|
| MD5 |
8ee7fc470cbe8e4daf96015afbbacebd
|
|
| BLAKE2b-256 |
0288fa1b03b8d17d393f631f38d1ceea57dc3af525409409286834ae46250291
|
File details
Details for the file zeliai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zeliai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd1d993e51ffcc1cf0588c49acb699de0ddaf19243ee73ce29b6bf2409c48bf4
|
|
| MD5 |
117d0dc6aa00dd36b5cb88d169ad5231
|
|
| BLAKE2b-256 |
522b2d39467f4ec3286a5144d42ba6eaa342c67d0e870c3972a3cef9a7807380
|