katcloud
한국에이아이통신(주) KAT Cloud API 용 Python SDK 입니다. 표준 라이브러리만 쓰고 Python 3.8 이상에서 동작합니다.
KAT Cloud 는 AI 에이전트를 한국 전화망에 연결하는 통신 인프라입니다. 070 번호 발급, 문자, 통화 기록, AI 발신, 웹훅을 API 로 다룹니다.
- 문서: https://katcloud.kr/docs/api
- 콘솔(API 키 발급): https://app.katcloud.kr
설치
pip install katcloud
사용
from katcloud import Client, KatError
kat = Client(api_key="zpa...") # 또는 환경 변수 KATCLOUD_API_KEY
# 번호 발급
group_id = kat.create_group(group_title="my-agent")
for group in kat.list_groups():
print(group["phoneNumber"])
# 문자 보내기
chat_id = kat.send_message("01098765432", "예약이 확정되었습니다.", from_number="07012345678")
# AI 발신 (실제 전화가 걸리고 요금이 생길 수 있습니다)
call = kat.create_ai_outbound_call(group_id, {
"agentId": 12,
"callerChannelId": 34,
"destination": "01098765432",
"inputs": {},
})
try:
kat.list_agents(group_id)
except KatError as e:
print(e.status, e.code, e.message)
0.2.0 에서 늘어난 것
공개 API 의 경로를 거의 모두 메서드로 부를 수 있습니다. 메서드 하나가 API 경로 하나입니다.
- 그룹: 요금제 목록, 그룹 조회·수정, 멤버, 예산 한도, 통화 안내멘트, 착신전환
- 번호: 추가 견적·추가·반납, 번호별 착신 경로 조회·변경·시험
- AI 에이전트: 만들기·수정·삭제, 변경 이력, 음성 목록, 번호 연결, 매뉴얼, 도구
- 통화: 통화 이벤트, 녹음 중지, 통화 기록 삭제, 상대방 기록 삭제, 녹음·마스킹·보관 설정
- 미디어 스트림: 발신·조회·종료·전환, 수신 번호 설정
- SIP 트렁크: 목록·만들기·수정·삭제·비밀번호 재발급
- 그룹별 웹훅, 카카오 알림톡, 채팅방, 크레딧·사용량 조회
요청 본문은 API 문서의 필드 이름 그대로 dict(객체)로 넘깁니다. 서버에 새 필드가 생겨도 SDK 를 올리지 않고 쓸 수 있습니다. 요금제나 설정에 따라 일부 경로는 403 으로 거절될 수 있습니다.
자동 재시도도 생겼습니다. 429(요청 제한)는 모든 요청을, 네트워크 오류와 502·503·504 는 조회(GET)만 다시 보냅니다. 전화 걸기나 문자 보내기 같은 요청은 두 번 실행될 수 있어 자동으로 다시 보내지 않습니다. 기본 2회이고 Client(max_retries=0) 으로 끕니다.
kat.set_number_routing(group_id, "07012345678", {...}) # 번호 착신 경로
kat.create_agent(group_id, {...}) # AI 에이전트 만들기
kat.list_call_events(group_id, call_id) # 통화 이벤트
kat.get_credit_summary() # 남은 크레딧
웹훅 서명 검증
from katcloud import construct_event
event = construct_event(raw_body, headers, secret) # 실패하면 WebhookSignatureError
라이선스
MIT
Metadata
Release files for katcloud 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| katcloud-0.2.1.tar.gz | 20.8 kB | With provenance | Details for katcloud-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| katcloud-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for katcloud-0.2.1-py3-none-any.whl |
Total release size: 36.4 kB
Release files / katcloud-0.2.1.tar.gz
| Download URL | katcloud-0.2.1.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
784f65807c33a0ecf3ea76511257f011b64916dd65d08346a65c41a01b2537cb
|
|
BLAKE2b-256 checksum How to use checksums |
4e7818d9c6c95df2d53fc47a4477d11ed4948c295cffb90f65b84b1bc730edc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logRelease files / katcloud-0.2.1-py3-none-any.whl
| Download URL | katcloud-0.2.1-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5040f3c1954364f15eb25800cbcd04dbc7d61b194abaf22c4d261dac31d00c1d
|
|
BLAKE2b-256 checksum How to use checksums |
d1f35761b92c00b412f62a3456e60fc92539d7b9fd9d91656eab749c4849406b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logSecurity for katcloud 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for katcloud-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.