(hash: string)
| 49 | } |
| 50 | |
| 51 | export async function getCivitModelByHash(hash: string) { |
| 52 | const headers = resolveCivitHeaders(); |
| 53 | const ret = await proxyFetch(`https://civitai.com/api/v1/model-versions/by-hash/${hash}`, { |
| 54 | headers |
| 55 | }, 5); |
| 56 | const data = await ret.json() |
| 57 | return data |
| 58 | } |
| 59 | |
| 60 | export async function listCivitModels(params: any = {}) { |
| 61 | const { limit = 10, page = 1, query = "", modelId, modelVersionId, nsfw, sort, tag, types, cursor } = params; |
no test coverage detected