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

API Endpoints

Method Endpoint Description
POST /tj/chat Chat with AI
POST /tj/images/generate Generate images
POST /tj/video/generate Generate video
GET /tj/models List models
GET /tj/models/{id} Get model info

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.2.0.tar.gz (4.4 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.2.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tajikgpt-1.2.0.tar.gz
Algorithm Hash digest
SHA256 0c4895575e96edc9d5246651d36bb999c8ef0f56ed3a561863125fb4342fb732
MD5 a85c2303275e72c00f087ed5fd3ef81a
BLAKE2b-256 e60830604282e97d86010f79b228dfda1f335b6ccd6eaa23c34ad226b74bffde

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tajikgpt-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d17aa34be59bd3324cc925570b48243854da02ba693f2a95fbbffe69c04162f
MD5 877d0a57c80e22973aad8505e7cd4391
BLAKE2b-256 95fd37834235fcccc25ac5b816c284aef384483cae295d383571b23a7c79c994

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