Documentation ¶
Index ¶
- Constants
- type Creator
- type CreatorsResponse
- type File
- type Hash
- type Image
- type ImageMetadata
- func (m *ImageMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (m *ImageMetadata) MarshalBinary() ([]byte, error)
- func (m ImageMetadata) MarshalJSON() ([]byte, error)
- func (m *ImageMetadata) UnmarshalBinary(b []byte) error
- func (m *ImageMetadata) UnmarshalJSON(data []byte) error
- func (m *ImageMetadata) Validate(formats strfmt.Registry) error
- type ImageResource
- type ImageStats
- type ImageTag
- type ImageTagData
- type ImagesResponse
- type Metadata
- type Model
- type ModelCreator
- type ModelVersion
- type ModelsResponse
- type Rank
- type StandardError
- type Stats
- type Tag
- type TagsResponse
Constants ¶
const ( // ModelTypeCheckpoint captures enum value "Checkpoint" ModelTypeCheckpoint string = "Checkpoint" // ModelTypeTextualInversion captures enum value "TextualInversion" ModelTypeTextualInversion string = "TextualInversion" // ModelTypeHypernetwork captures enum value "Hypernetwork" ModelTypeHypernetwork string = "Hypernetwork" // ModelTypeAestheticGradient captures enum value "AestheticGradient" ModelTypeAestheticGradient string = "AestheticGradient" // ModelTypeLORA captures enum value "LORA" ModelTypeLORA string = "LORA" // ModelTypeLyCORIS captures enum value "LyCORIS" ModelTypeLyCORIS string = "LyCORIS" // ModelTypeControlnet captures enum value "Controlnet" ModelTypeControlnet string = "Controlnet" // ModelTypeWildcards captures enum value "Wildcards" ModelTypeWildcards string = "Wildcards" // ModelTypePoses captures enum value "Poses" ModelTypePoses string = "Poses" // ModelTypeOther captures enum value "Other" ModelTypeOther string = "Other" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Creator ¶
type Creator struct { // Url to get all models from this user. // Example: https://civitai.com/api/v1/models?username=Civitai Link string `json:"link,omitempty"` // The amount of models linked to this user. // Example: 848 ModelCount int64 `json:"modelCount,omitempty"` // The username of the creator. // Example: Civitai Username string `json:"username,omitempty"` }
Creator creator
swagger:model Creator
func (*Creator) ContextValidate ¶
ContextValidate validates this creator based on context it is used
func (*Creator) MarshalBinary ¶
MarshalBinary interface implementation
func (*Creator) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type CreatorsResponse ¶
type CreatorsResponse struct { // items Items []*Creator `json:"items"` // metadata Metadata *Metadata `json:"metadata,omitempty"` }
CreatorsResponse creators response
swagger:model CreatorsResponse
func (*CreatorsResponse) ContextValidate ¶
ContextValidate validate this creators response based on the context it is used
func (*CreatorsResponse) MarshalBinary ¶
func (m *CreatorsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CreatorsResponse) UnmarshalBinary ¶
func (m *CreatorsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type File ¶
type File struct { // download Url DownloadURL string `json:"downloadUrl,omitempty"` // The format of the file ('pickle' or 'safetensor'). Format string `json:"format,omitempty"` // hashes Hashes *Hash `json:"hashes,omitempty"` // id ID int64 `json:"id,omitempty"` // name Name string `json:"name,omitempty"` // pickle scan message PickleScanMessage string `json:"pickleScanMessage,omitempty"` // Status of the pickle scan ('Pending', 'Success', 'Danger', 'Error'). PickleScanResult string `json:"pickleScanResult,omitempty"` // If the file is the primary file for the model version. Primary bool `json:"primary,omitempty"` // The date in which the file was scanned. // Format: date-time ScannedAt strfmt.DateTime `json:"scannedAt,omitempty"` // The size of the model file. SizeKB float64 `json:"sizeKB,omitempty"` // type Type string `json:"type,omitempty"` // Status of the virus scan ('Pending', 'Success', 'Danger', 'Error'). VirusScanResult string `json:"virusScanResult,omitempty"` }
File file
swagger:model File
func (*File) ContextValidate ¶
ContextValidate validate this file based on the context it is used
func (*File) MarshalBinary ¶
MarshalBinary interface implementation
func (*File) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Hash ¶
type Hash struct { // auto v1 // Example: 95F8D0A7 AutoV1 string `json:"AutoV1,omitempty"` // auto v2 // Example: 95AFA0D9EA AutoV2 string `json:"AutoV2,omitempty"` // b l a k e3 // Example: CC4CD6EA2B502C61B4BD86CA5C4B07AF269877877CEC7FB14EEAE846555CED1E BLAKE3 string `json:"BLAKE3,omitempty"` // c r c32 // Example: F28B4B59 CRC32 string `json:"CRC32,omitempty"` // s h a256 // Example: 95AFA0D9EADAC2A04671ED18202FCF09C990148E1CD0AE477BF57F763B948615 SHA256 string `json:"SHA256,omitempty"` }
Hash hash
swagger:model Hash
func (*Hash) ContextValidate ¶
ContextValidate validates this hash based on context it is used
func (*Hash) MarshalBinary ¶
MarshalBinary interface implementation
func (*Hash) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Image ¶
type Image struct { // The date the image was posted. // Example: 2023-04-06T09:14:50.762Z // Format: date-time CreatedAt strfmt.DateTime `json:"createdAt,omitempty"` // generation process GenerationProcess string `json:"generationProcess,omitempty"` // The blurhash of the image. Hash string `json:"hash,omitempty"` // The original height of the image. Height int64 `json:"height,omitempty"` // The id of the image. ID int64 `json:"id,omitempty"` // The generation params of the image. Meta *ImageMetadata `json:"meta,omitempty"` // needs review NeedsReview bool `json:"needsReview,omitempty"` // Whether or not the image is NSFW (note: if the model is NSFW, treat all images on the model as NSFW). Nsfw interface{} `json:"nsfw,omitempty"` // The ID of the post the image belongs to. PostID int64 `json:"postId,omitempty"` // scanned at // Format: date-time ScannedAt strfmt.DateTime `json:"scannedAt,omitempty"` // stats Stats *ImageStats `json:"stats,omitempty"` // tags Tags []*ImageTag `json:"tags"` // The url for the image. URL string `json:"url,omitempty"` // user Id UserID int64 `json:"userId,omitempty"` // The username of the creator. Username string `json:"username,omitempty"` // The original width of the image. Width int64 `json:"width,omitempty"` }
Image image
swagger:model Image
func (*Image) ContextValidate ¶
ContextValidate validate this image based on the context it is used
func (*Image) MarshalBinary ¶
MarshalBinary interface implementation
func (*Image) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ImageMetadata ¶
type ImageMetadata struct { // resources Resources []*ImageResource `json:"resources"` // image metadata additional properties ImageMetadataAdditionalProperties map[string]interface{} `json:"-"` }
ImageMetadata image metadata
swagger:model ImageMetadata
func (*ImageMetadata) ContextValidate ¶
ContextValidate validate this image metadata based on the context it is used
func (*ImageMetadata) MarshalBinary ¶
func (m *ImageMetadata) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (ImageMetadata) MarshalJSON ¶
func (m ImageMetadata) MarshalJSON() ([]byte, error)
MarshalJSON marshals this object with additional properties into a JSON object
func (*ImageMetadata) UnmarshalBinary ¶
func (m *ImageMetadata) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
func (*ImageMetadata) UnmarshalJSON ¶
func (m *ImageMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals this object with additional properties from JSON
type ImageResource ¶
type ImageResource struct { // hash Hash string `json:"hash,omitempty"` // name Name string `json:"name,omitempty"` // type Type string `json:"type,omitempty"` // weight Weight float64 `json:"weight,omitempty"` }
ImageResource image resource
swagger:model ImageResource
func (*ImageResource) ContextValidate ¶
ContextValidate validates this image resource based on context it is used
func (*ImageResource) MarshalBinary ¶
func (m *ImageResource) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ImageResource) UnmarshalBinary ¶
func (m *ImageResource) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ImageStats ¶ added in v0.2.0
type ImageStats struct { // The number of comment reactions. CommentCount int64 `json:"commentCount,omitempty"` // The number of cry reactions. CryCount int64 `json:"cryCount,omitempty"` // dislike count DislikeCount int64 `json:"dislikeCount,omitempty"` // The number of heart reactions. HeartCount int64 `json:"heartCount,omitempty"` // The number of laugh reactions. LaughCount int64 `json:"laughCount,omitempty"` // The number of like reactions. LikeCount int64 `json:"likeCount,omitempty"` }
ImageStats image stats
swagger:model ImageStats
func (*ImageStats) ContextValidate ¶ added in v0.2.0
ContextValidate validates this image stats based on context it is used
func (*ImageStats) MarshalBinary ¶ added in v0.2.0
func (m *ImageStats) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ImageStats) UnmarshalBinary ¶ added in v0.2.0
func (m *ImageStats) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ImageTag ¶
type ImageTag struct { // automated Automated bool `json:"automated,omitempty"` // needs review NeedsReview bool `json:"needsReview,omitempty"` // tag Tag *ImageTagData `json:"tag,omitempty"` }
ImageTag image tag
swagger:model ImageTag
func (*ImageTag) ContextValidate ¶
ContextValidate validate this image tag based on the context it is used
func (*ImageTag) MarshalBinary ¶
MarshalBinary interface implementation
func (*ImageTag) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ImageTagData ¶
type ImageTagData struct { // id ID int64 `json:"id,omitempty"` // is category IsCategory bool `json:"isCategory,omitempty"` // name Name string `json:"name,omitempty"` // type Type string `json:"type,omitempty"` }
ImageTagData image tag data
swagger:model ImageTagData
func (*ImageTagData) ContextValidate ¶
ContextValidate validates this image tag data based on context it is used
func (*ImageTagData) MarshalBinary ¶
func (m *ImageTagData) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ImageTagData) UnmarshalBinary ¶
func (m *ImageTagData) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ImagesResponse ¶ added in v0.2.0
type ImagesResponse struct { // items Items []*Image `json:"items"` // metadata Metadata *Metadata `json:"metadata,omitempty"` }
ImagesResponse images response
swagger:model ImagesResponse
func (*ImagesResponse) ContextValidate ¶ added in v0.2.0
ContextValidate validate this images response based on the context it is used
func (*ImagesResponse) MarshalBinary ¶ added in v0.2.0
func (m *ImagesResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ImagesResponse) UnmarshalBinary ¶ added in v0.2.0
func (m *ImagesResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Metadata ¶
type Metadata struct { // The the current page you are at. // Example: 2 CurrentPage int64 `json:"currentPage,omitempty"` // The url to get the next batch of items. // Example: https://civitai.com/api/v1/creators?limit=3\u0026page=3 NextPage string `json:"nextPage,omitempty"` // The the size of the batch. // Example: 3 PageSize int64 `json:"pageSize,omitempty"` // The url to get the previous batch of items. // Example: https://civitai.com/api/v1/creators?limit=3\u0026page=1 PrevPage string `json:"prevPage,omitempty"` // The total number of items available. // Example: 46 TotalItems int64 `json:"totalItems,omitempty"` // The total number of pages. // Example: 16 TotalPages int64 `json:"totalPages,omitempty"` }
Metadata metadata
swagger:model Metadata
func (*Metadata) ContextValidate ¶
ContextValidate validates this metadata based on context it is used
func (*Metadata) MarshalBinary ¶
MarshalBinary interface implementation
func (*Metadata) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Model ¶
type Model struct { // allow commercial use AllowCommercialUse string `json:"allowCommercialUse,omitempty"` // allow derivatives AllowDerivatives bool `json:"allowDerivatives,omitempty"` // allow different license AllowDifferentLicense bool `json:"allowDifferentLicense,omitempty"` // allow no credit AllowNoCredit bool `json:"allowNoCredit,omitempty"` // creator Creator *ModelCreator `json:"creator,omitempty"` // The description of the model (HTML). Description string `json:"description,omitempty"` // The identifier for the model. ID int64 `json:"id,omitempty"` // model versions ModelVersions []*ModelVersion `json:"modelVersions"` // The name of the model. Name string `json:"name,omitempty"` // Whether the model is NSFW or not. Nsfw bool `json:"nsfw,omitempty"` // poi Poi bool `json:"poi,omitempty"` // rank Rank *Rank `json:"rank,omitempty"` // stats Stats *Stats `json:"stats,omitempty"` // The tags associated with the model. Tags []interface{} `json:"tags"` // The model type. // Enum: [Checkpoint TextualInversion Hypernetwork AestheticGradient LORA LyCORIS Controlnet Wildcards Poses Other] Type string `json:"type,omitempty"` }
Model model
swagger:model Model
func (*Model) ContextValidate ¶
ContextValidate validate this model based on the context it is used
func (*Model) MarshalBinary ¶
MarshalBinary interface implementation
func (*Model) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ModelCreator ¶
type ModelCreator struct { // The url of the creators avatar. Image string `json:"image,omitempty"` // The name of the creator. Username string `json:"username,omitempty"` }
ModelCreator model creator
swagger:model ModelCreator
func (*ModelCreator) ContextValidate ¶
ContextValidate validates this model creator based on context it is used
func (*ModelCreator) MarshalBinary ¶
func (m *ModelCreator) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ModelCreator) UnmarshalBinary ¶
func (m *ModelCreator) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ModelVersion ¶
type ModelVersion struct { // base model BaseModel string `json:"baseModel,omitempty"` // The date in which the version was created. // Format: date-time CreatedAt strfmt.DateTime `json:"createdAt,omitempty"` // The description of the model version (usually a changelog). Description string `json:"description,omitempty"` // The download url to get the model file for this specific version. DownloadURL string `json:"downloadUrl,omitempty"` // early access time frame EarlyAccessTimeFrame int64 `json:"earlyAccessTimeFrame,omitempty"` // files Files []*File `json:"files"` // The identifier for the model version. ID int64 `json:"id,omitempty"` // images Images []*Image `json:"images"` // model Id ModelID int64 `json:"modelId,omitempty"` // The name of the model version. Name string `json:"name,omitempty"` // The words used to trigger the model. TrainedWords []string `json:"trainedWords"` // updated at // Format: date-time UpdatedAt strfmt.DateTime `json:"updatedAt,omitempty"` }
ModelVersion model version
swagger:model ModelVersion
func (*ModelVersion) ContextValidate ¶
ContextValidate validate this model version based on the context it is used
func (*ModelVersion) MarshalBinary ¶
func (m *ModelVersion) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ModelVersion) UnmarshalBinary ¶
func (m *ModelVersion) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type ModelsResponse ¶
type ModelsResponse struct { // items Items []*Model `json:"items"` // metadata Metadata *Metadata `json:"metadata,omitempty"` }
ModelsResponse models response
swagger:model ModelsResponse
func (*ModelsResponse) ContextValidate ¶
ContextValidate validate this models response based on the context it is used
func (*ModelsResponse) MarshalBinary ¶
func (m *ModelsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*ModelsResponse) UnmarshalBinary ¶
func (m *ModelsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Rank ¶
type Rank struct { // comment count all time CommentCountAllTime int64 `json:"commentCountAllTime,omitempty"` // download count all time DownloadCountAllTime int64 `json:"downloadCountAllTime,omitempty"` // favorite count all time FavoriteCountAllTime int64 `json:"favoriteCountAllTime,omitempty"` // rating all time RatingAllTime float64 `json:"ratingAllTime,omitempty"` // rating count all time RatingCountAllTime int64 `json:"ratingCountAllTime,omitempty"` }
Rank rank
swagger:model Rank
func (*Rank) ContextValidate ¶
ContextValidate validates this rank based on context it is used
func (*Rank) MarshalBinary ¶
MarshalBinary interface implementation
func (*Rank) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type StandardError ¶
type StandardError struct { // error // Example: Something went wrong while writing the file to disk, the server may be out of storage space. // Required: true Error *string `json:"error"` }
StandardError standard error
swagger:model StandardError
func (*StandardError) ContextValidate ¶
ContextValidate validates this standard error based on context it is used
func (*StandardError) MarshalBinary ¶
func (m *StandardError) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*StandardError) UnmarshalBinary ¶
func (m *StandardError) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Stats ¶
type Stats struct { // comment count CommentCount int64 `json:"commentCount,omitempty"` // download count DownloadCount int64 `json:"downloadCount,omitempty"` // favorite count FavoriteCount int64 `json:"favoriteCount,omitempty"` // rating Rating float64 `json:"rating,omitempty"` // rating count RatingCount int64 `json:"ratingCount,omitempty"` }
Stats stats
swagger:model Stats
func (*Stats) ContextValidate ¶
ContextValidate validates this stats based on context it is used
func (*Stats) MarshalBinary ¶
MarshalBinary interface implementation
func (*Stats) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Tag ¶
type Tag struct { // Url to get all models from this tag. Link string `json:"link,omitempty"` // The amount of models linked to this tag. ModelCount int64 `json:"modelCount,omitempty"` // The name of the tag. Name string `json:"name,omitempty"` }
Tag tag
swagger:model Tag
func (*Tag) ContextValidate ¶
ContextValidate validates this tag based on context it is used
func (*Tag) MarshalBinary ¶
MarshalBinary interface implementation
func (*Tag) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type TagsResponse ¶
type TagsResponse struct { // items Items []*Tag `json:"items"` // metadata Metadata *Metadata `json:"metadata,omitempty"` }
TagsResponse tags response
swagger:model TagsResponse
func (*TagsResponse) ContextValidate ¶
ContextValidate validate this tags response based on the context it is used
func (*TagsResponse) MarshalBinary ¶
func (m *TagsResponse) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TagsResponse) UnmarshalBinary ¶
func (m *TagsResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation