civitai_client library
A comprehensive, production-ready Dart client for the CivitAI API.
Classes
- AbortMultipartUploadParams
- Parameters for aborting a multipart upload.
- AuthConfig
- Authentication configuration for the CivitAI API.
- CheckPermissionsResponse
- Response for the permissions check endpoint.
- CivitaiApi
- Main entry point for the CivitAI API client.
- CompleteMultipartUploadParams
- Parameters for completing a multipart upload.
- ContentRepository
- Repository for interacting with the Content API.
- CreateMultipartUploadParams
- Parameters for creating a multipart upload.
- Creator
- Represents a creator on CivitAI.
- CreatorInfo
- Information about a model's creator.
- CreatorsRepository
- Repository for interacting with the Creators API.
- EnumsRepository
- Repository for interacting with the Enums API.
- GetCreatorsResponse
- Response for the creators endpoint.
- GetCurrentUserParams
- Parameters for retrieving the current user's profile.
- GetCurrentUserResponse
- Response for the current user endpoint.
- GetEnumsResponse
- Response for the enums endpoint.
- GetImagesParams
- Parameters for retrieving a list of images.
- GetImagesResponse
- Response for the images endpoint.
- GetModelByIdParams
- Parameters for retrieving a model by ID.
- GetModelResponse
- Response for the get model by ID endpoint.
- GetModelsParams
- Parameters for retrieving a list of models.
- GetModelsResponse
- Response for the models endpoint.
- GetModelVersionByHashParams
- Parameters for retrieving a model version by hash.
- GetModelVersionByHashResponse
- Response for the get model version by hash endpoint.
- GetModelVersionGenerationDetailsParams
- Parameters for retrieving generation details for a model version.
- GetModelVersionMiniResponse
- Response for the get model version mini endpoint.
- GetModelVersionResponse
- Response for the get model version by ID endpoint.
- GetModelVersionsByHashIdsParams
- Parameters for retrieving model versions by hash IDs.
- GetModelVersionsByHashIdsResponse
- Response for the get model versions by hash IDs endpoint.
- GetTagsResponse
- Response for the tags endpoint.
- GetUserByUsernameParams
- Parameters for retrieving a user by username.
- GetUsersParams
- Parameters for retrieving a list of users.
- GetUsersResponse
- Response for the users endpoint.
- ImageModel
- Represents an image on CivitAI.
- ImagesRepository
- Repository for interacting with the Images API.
- ImageStats
- Statistics about an image.
- ImageUploadResponse
- Response for the image upload endpoint.
- Model
- Represents a model on CivitAI.
- ModelFile
- Represents a file associated with a model version on CivitAI.
- ModelsRepository
- Repository for interacting with the Models API.
- ModelStats
- Statistics about a model.
- ModelVersion
- Represents a version of a model on CivitAI.
- ModelVersionsRepository
- Repository for interacting with the Model Versions API.
- MultipartUploadPart
- Represents a part in a multipart upload.
- MultipartUploadResponse
- Response for the multipart upload creation endpoint.
-
PaginatedResponse<
T> - A paginated response containing items and pagination metadata.
- PaginationMetadata
- Represents pagination metadata for API responses.
- PaginationParams
- Base class for paginated request parameters.
- PartnersRepository
- Repository for interacting with the Partners API.
- PermissionsRepository
- Repository for interacting with the Permissions API.
- RetryConfig
- Configuration for retry behavior.
- RetryPolicy
- Utility for executing functions with retry logic.
- Tag
- Represents a tag on CivitAI.
- TagsRepository
- Repository for interacting with the Tags API.
- UploadRepository
- Repository for interacting with the Upload API.
- User
- Represents a user on CivitAI.
- UserFilePreferences
- User's file format preferences.
- UsersRepository
- Repository for interacting with the Users API.
- VaultRepository
- Repository for interacting with the Vault API.
Enums
- ApiScope
- API key scopes for the CivitAI API.
- AuthMethod
- Authentication methods supported by the CivitAI API.
- BaseModel
- Base model for AI models.
- EntityType
- Entity types for permissions.
- FileType
- File types for model files.
- ImageSort
- Sort options for images in listing APIs.
- MediaType
- Media type for content.
- MetricTimeframe
- Period options for filtering by time.
- ModelHashType
- Hash type for model file hashes.
- ModelSort
- Sort options for models in listing APIs.
- ModelStatus
- Model status.
- ModelType
- Enum representing the different types of models available on CivitAI.
- NsfwLevel
- NSFW level for content filtering.
- PermissionType
- Permission types.
Exceptions / Errors
- CivitaiApiException
- Exception thrown for any API errors not covered by more specific exceptions.
- CivitaiBadRequestException
- Exception thrown when an HTTP 400 (Bad Request) response is received.
- CivitaiClientException
- Exception thrown when a request fails due to a client error (4xx).
- CivitaiConflictException
- Exception thrown when an HTTP 409 (Conflict) response is received.
- CivitaiException
- Base exception class for all CivitAI API exceptions.
- CivitaiForbiddenException
- Exception thrown when an HTTP 403 (Forbidden) response is received.
- CivitaiNetworkException
- Exception thrown when a request fails due to a network error.
- CivitaiNotFoundException
- Exception thrown when an HTTP 404 (Not Found) response is received.
- CivitaiParsingException
- Exception thrown when parsing a response fails.
- CivitaiRateLimitException
- Exception thrown when an HTTP 429 (Too Many Requests) response is received.
- CivitaiServerException
- Exception thrown when a request fails due to a server error (5xx).
- CivitaiTimeoutException
- Exception thrown when a request times out.
- Exception thrown when an HTTP 401 (Unauthorized) response is received.
- CivitaiUnexpectedResponseException
- Exception thrown when the API response doesn't match the expected format.
- CivitaiUnknownException
- Exception thrown when an unknown error occurs.