Skip to main content

Official Kyma API client — free LLM API gateway. Every open source model, one endpoint.

Project description

kyma-ai

Official Python client for Kyma API — free LLM API gateway. Every open source model, one endpoint.

Install

pip install kyma-ai

Quick Start

from kyma_ai import Kyma

kyma = Kyma(api_key="kyma-your-key")

# Simple: ask a question
reply = kyma.ask("Explain quantum computing simply")
print(reply)

# Streaming
for chunk in kyma.ask_stream("Write a poem"):
    print(chunk, end="", flush=True)

# Full control: OpenAI-compatible chat
response = kyma.chat.completions.create(
    model="llama-3.3-70b",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"},
    ],
)
print(response.choices[0].message.content)

Available Models

models = kyma.list_models()
for m in models:
    print(m["id"], m.get("name"))

20+ models from Meta, Google, Alibaba, OpenAI, NVIDIA, and more. All free to start.

Check Balance

info = kyma.get_balance()
print(f"Balance: ${info['balance']:.2f}")

OpenAI SDK Compatible

Kyma wraps the official OpenAI SDK. Access it directly:

openai_client = kyma.openai
# Use any OpenAI SDK feature

Get Your API Key

  1. Sign up at kymaapi.com
  2. Get your kyma- API key from the dashboard
  3. Start building!

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

kyma_ai-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

kyma_ai-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file kyma_ai-0.1.0.tar.gz.

File metadata

  • Download URL: kyma_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for kyma_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cb6e865e9c8d3da3350e3013fbbadca3492fd199e678fda2ba7cde3a930b2ec0
MD5 9ec52f75fb8a5b419125a5b1d9ef3b1f
BLAKE2b-256 633982675a17c1ca2e1d1824868e3c6b5d4b89cdd3b6b43a000ec2b5e0080701

See more details on using hashes here.

File details

Details for the file kyma_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kyma_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for kyma_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc99c11bb5b931db02e1356f41db2c99580262ea876254d28540a67e4c34d79a
MD5 40013386ac40c1d1d5e55cc730e5fa86
BLAKE2b-256 1fd15ef57721df84f1693cc333b8189e496efff004a7a8bf420ff68408c70c7e

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