Skip to main content

civitai_api

Coverage

This project provide a easy way to communicating with Civitai-API.

It supports both Sync and Async request implementation, and both Async implementation (AsyncIO and Trio) by using Anyio.

See usage example in : /tests/test_v1.py.

You may need to register your own CivitAI api key, see here.

Exception handling

There are 3 types of Exception you should care of

  1. QueryParamsError
    • only for the endpoints which could return multiple results.
  2. FileNotFoundError
    • only for the endpoints which could return single results.
  3. ConnectionAbortedError
    • every endpoint could trigger this Exception when the number of requests reach Civitai server's limitation.

Attention

  1. you could only get model's availability from endpoint models or modelId endpoints!
    • some of the models have an EarlyAccess duration at the first time they get published.
  2. Trainned Prompts could only get from VersionId or Hash endpoints!

Metadata

Release files for civitai-api 3.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for civitai-api 3.0.3
File Size Uploaded Provenance Actions
civitai_api-3.0.3.tar.gz 10.2 kB Without provenance Details for civitai_api-3.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for civitai-api 3.0.3
File Interpreter ABI Platform Actions
civitai_api-3.0.3-py3-none-any.whl Python 3 none any Details for civitai_api-3.0.3-py3-none-any.whl

Total release size: 22.4 kB

Release files / civitai_api-3.0.3.tar.gz

Download URL civitai_api-3.0.3.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
733722374676aa46ce6cf81fbbbb7e7fe5f73818010121c3914671e64ca5486b
BLAKE2b-256 checksum
How to use checksums
43aa65af0573ea3798fb6dcd107e942b4c99156ea4afccb69c39879418e5bf1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.2

Release files / civitai_api-3.0.3-py3-none-any.whl

Download URL civitai_api-3.0.3-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f73e45da9cb6c4165dc0e55660340ad00130bc99946c59ced4086776f7365b32
BLAKE2b-256 checksum
How to use checksums
2c68a57a56d7164723b13c83caed812e2c089bc042c2b3b76fb288ff281c96f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.2

Security for civitai-api 3.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page