Skip to main content

Official InferenceKey SDK — declare AI workloads in code, ensure they exist, and call the resulting OpenAI-compatible endpoints.

Project description

inferencekey (Python)

Official Python SDK for the InferenceKey platform — a thin, typed layer over the shared Rust core (inferencekey-core).

Declare AI workloads in code, ensure they exist on the platform, and call the resulting OpenAI-compatible endpoints.

from inferencekey import ManagementClient, DataClient, WorkloadSpec, Backend

mgmt = ManagementClient.from_env(project="acme")          # INFERENCEKEY_SDK_TOKEN
ref = mgmt.ensure(WorkloadSpec(
    name="support-bot", slug="support-bot",
    model="meta-llama/Llama-3.1-8B-Instruct", backend=Backend.VLLM,
    command="vllm serve meta-llama/Llama-3.1-8B-Instruct --max-model-len 8192",
))

data = DataClient.from_env(project="acme")
out = data.endpoint(ref.workload_slug, api_key="ik_live_...").generate_text(prompt="Hola")
print(out.text)

Two tokens, two clients (least privilege): ik_sdk_ provisions (control plane); ik_live_ calls inference (data plane, per workload). Full docs at docs.inferencekey.com.

License: Apache-2.0.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

inferencekey-0.260709.1212-cp39-abi3-manylinux_2_34_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ x86-64

inferencekey-0.260709.1212-cp39-abi3-manylinux_2_34_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ ARM64

File details

Details for the file inferencekey-0.260709.1212-cp39-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for inferencekey-0.260709.1212-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6b48bc1df33030e3288d50e58d94faf87ed68f56f4cc79aea14dba8d6b4d3c12
MD5 08047750949a9a1a6ec0f84307cd9a88
BLAKE2b-256 32666e11c5f2f8bc4e89d94946f5baafbbe0ffb5f4b7fb12fd2998a5ea5c3d81

See more details on using hashes here.

File details

Details for the file inferencekey-0.260709.1212-cp39-abi3-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for inferencekey-0.260709.1212-cp39-abi3-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 af0000133af2fa2ea2fc33f5b54fc8b342431266c424c1378430a160a186f33d
MD5 18e6772e29adc04b1f589b955ad604be
BLAKE2b-256 23c1785c4d68dfe6913e6e5cee00210b92991f19eda8b72824087572330d8c6c

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