Skip to main content

Official Python SDK for TajikGPT API — chat, images, and video generation

Project description

TajikGPT Python SDK

Official Python client for TajikGPT API.

Installation

pip install tajikgpt

Quick Start

from tajikgpt import TajikGPT

client = TajikGPT(api_key="sk-tj-your-key")

# Chat
response = client.chat.completions.create(
    model="tj-1.0",
    messages=[{"role": "user", "content": "Привет!"}]
)
print(response.choices[0].message.content)

# Image generation
image = client.images.generate(
    prompt="Sunset over Tajikistan mountains",
    image_model="tj-image-1.0"
)
print(image.url)

# Video generation (Plus/Pro only)
video = client.video.generate(
    prompt="A beautiful mountain landscape timelapse"
)
print(video.url)

Models

Model Description Tier
tj-0.5 Legacy Free
tj-1.0-mini Fast, simple tasks Free
tj-1.0 Balanced speed & quality Free
tj-1.0-pro Smart + Vision, Web Search Plus+
tj-1.0-ultra Top model Plus+
tj-coder Code assistant Free
tj-image-1.0 High quality images All
tj-image-0.5 Legacy images All
tj-video-1.0 Video generation (Alpha) Plus/Pro

Error Handling

from tajikgpt import TajikGPT, AuthenticationError, RateLimitError

client = TajikGPT(api_key="sk-tj-your-key")

try:
    response = client.chat.completions.create(
        model="tj-1.0",
        messages=[{"role": "user", "content": "Hello"}]
    )
except AuthenticationError:
    print("Invalid API key")
except RateLimitError:
    print("Too many requests, wait and retry")

Get API Key

  1. Go to tajikgpt.com/pricing
  2. Subscribe to Pro plan
  3. Find your API key in profile

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tajikgpt-1.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tajikgpt-1.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file tajikgpt-1.1.0.tar.gz.

File metadata

  • Download URL: tajikgpt-1.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tajikgpt-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f9a2a78941e4df573e4f7ae6216b307724028a1837f77b907a70d35764178a05
MD5 bfafda4036f92567f611e55e8e17dc46
BLAKE2b-256 ee096bf321c88e2931173d9c35d26c4475796336aa5e1f0b30317f329b140bef

See more details on using hashes here.

File details

Details for the file tajikgpt-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: tajikgpt-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tajikgpt-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2021344037deebc326fd7f0fb96dc3b03e244e014ffc9ce4c14712171262d77
MD5 38f46cb520a6fca655cce878920d2cc9
BLAKE2b-256 7298d8c984a87e824a2114839e30c5b9df7a718a45b75fe9f5487bdd58a78c26

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page