--- id: gradio-client version: "2.6.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # gradio-client — Python library for easily interacting with trained machine learning models License: permissive · Maintenance: active · Downloads: 11.5M/mo ## What it is and what it does gradio_client is a lightweight Python library that wraps any Gradio app—whether running on Hugging Face Spaces or a custom server—as a callable Python API. It handles connection setup, parameter marshalling, file uploads, and response parsing, letting you invoke trained ML models or interactive tools with a simple `.predict()` call. The library manages authentication (including private Spaces via HF tokens) and provides introspection via `.view_api()` to discover available endpoints and their signatures. Typical use is calling public Spaces or duplicating them for private, unlimited access. It depends on fsspec for file handling, httpx for HTTP requests, huggingface-hub for Space discovery and authentication, packaging for version handling, and typing-extensions for runtime type hints. Maintenance is active, the API surface is minimal, and there are no known security vulnerabilities. Use it for: - Call a Hugging Face Space audio transcription model to process audio files in a batch pipeline. - Integrate a public Gradio chatbot or image generator into a web service without hosting your own inference. - Duplicate a Space to create a private copy and make unlimited API calls without rate limiting. - Inspect and call multiple named endpoints in a single Gradio app from Python. - Build a CLI tool that wraps a remote ML model by connecting to its Gradio interface. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Calls any Gradio app as a Python API with a simple Client interface, handling authentication, file uploads, and response parsing automatically. Yes. Low install friction, active maintenance, no vulnerabilities, and a permissive license make this a safe choice. Install if you need to call any Gradio app as an API—the three-line usage pattern is genuine and the library handles the boilerplate. Only caveat: requires Python 3.10+, and public Spaces may rate-limit heavy usage (though duplication solves that). ## Install pip install gradio-client uv add gradio-client poetry add gradio-client ## Installing gradio-client Before you install: Low friction: pure Python wheel with five lightweight runtime dependencies (fsspec, httpx, huggingface-hub, packaging, typing-extensions). Active maintenance—last commit 2026-08-14, released 2026-07-29, no known vulnerabilities. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for proprietary applications. Quickstart: from gradio_client import Client client = Client("abidlabs/whisper") result = client.predict("audio_sample.wav") print(result) Requires Python 3.10 or higher. Verify before relying: - Whether rate limiting on public Spaces is a practical concern for typical workloads. - Performance characteristics when calling endpoints with large file uploads or long-running predictions. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 11.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags gradio api client, call gradio app programmatically, gradio space python client, machine learning model api wrapper, hugging face space client, gradio prediction client, remote ml model inference, api-client, ml-inference, huggingface [View on SkillFed](https://skillfed.io/packages/gradio-client) · [View on PyPI](https://pypi.org/project/gradio-client/)