OpenGradient SDK banner
OpenGradient OpenGradient

OpenGradient SDK

AI community

Description

Python SDK for using verifiable AI inference on OpenGradient

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

OpenGradient Python SDK

[![Checks](https://github.com/OpenGradient/sdk/actions/workflows/test.yml/badge.svg)](https://github.com/OpenGradient/sdk/actions/workflows/test.yml) [![E2E Tests](https://github.com/OpenGradient/sdk/actions/workflows/e2e.yml/badge.svg)](https://github.com/OpenGradient/sdk/actions/workflows/e2e.yml) [![PyPI](https://img.shields.io/pypi/v/opengradient)](https://pypi.org/project/opengradient/)

A Python SDK for decentralized model management and inference services on the OpenGradient platform. The SDK provides programmatic access to distributed AI infrastructure with cryptographic verification capabilities.

Quick Summary for Developers

**New to OpenGradient?** Start here.

Question Answer
What is it? A decentralized network that runs AI inference inside TEEs and settles every request on-chain
What problem does it solve? Centralized AI is a black box. OpenGradient gives cryptographic proof for every inference
How do I use it? Install the SDK, get a private key, call llm.chat() like OpenAI but with transaction_hash and tee_signature in every response
What is Model Hub? A decentralized registry to upload, discover, and run custom ONNX models on-chain
What is MemSync? A long-term memory layer for AI agents with persistent context across sessions

30-Second Quickstart

Install, set up a private key with OPG tokens, and run:

import asyncio, os, opengradient as og

async def main():
    llm = og.LLM(private_key=os.environ["OG_PRIVATE_KEY"])
    llm.ensure_opg_approval(min_allowance=0.1)
    result = await llm.chat(
        model=og.TEE_LLM.GEMINI_2_5_FLASH,
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(result.chat_output["content"])  # AI response
    print(result.transaction_hash)         # on-chain proof

asyncio.run(main())

Overview

OpenGradient enables developers to build AI applications