@abliteration/sdk 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/.openapi-generator/FILES +16 -0
  2. package/README.md +11 -0
  3. package/dist/apis/ModelsApi.d.ts +200 -8
  4. package/dist/apis/ModelsApi.js +193 -5
  5. package/dist/esm/apis/ModelsApi.d.ts +200 -8
  6. package/dist/esm/apis/ModelsApi.js +192 -4
  7. package/dist/esm/models/DeletionSummary.d.ts +52 -0
  8. package/dist/esm/models/DeletionSummary.js +53 -0
  9. package/dist/esm/models/DeletionSummaryTimelineInner.d.ts +34 -0
  10. package/dist/esm/models/DeletionSummaryTimelineInner.js +43 -0
  11. package/dist/esm/models/DeletionSummaryTopByDownloadsInner.d.ts +42 -0
  12. package/dist/esm/models/DeletionSummaryTopByDownloadsInner.js +47 -0
  13. package/dist/esm/models/DelistedModel.d.ts +54 -0
  14. package/dist/esm/models/DelistedModel.js +53 -0
  15. package/dist/esm/models/GetHistoricalDeletionSummary200Response.d.ts +67 -0
  16. package/dist/esm/models/GetHistoricalDeletionSummary200Response.js +79 -0
  17. package/dist/esm/models/HistoricalDeletion.d.ts +50 -0
  18. package/dist/esm/models/HistoricalDeletion.js +51 -0
  19. package/dist/esm/models/ListDelistedModels200Response.d.ts +67 -0
  20. package/dist/esm/models/ListDelistedModels200Response.js +79 -0
  21. package/dist/esm/models/ListHistoricalDeletions200Response.d.ts +67 -0
  22. package/dist/esm/models/ListHistoricalDeletions200Response.js +79 -0
  23. package/dist/esm/models/ModelDetail.d.ts +8 -0
  24. package/dist/esm/models/ModelDetail.js +2 -2
  25. package/dist/esm/models/ModelSummary.d.ts +8 -0
  26. package/dist/esm/models/ModelSummary.js +4 -0
  27. package/dist/esm/models/index.d.ts +8 -0
  28. package/dist/esm/models/index.js +8 -0
  29. package/dist/models/DeletionSummary.d.ts +52 -0
  30. package/dist/models/DeletionSummary.js +60 -0
  31. package/dist/models/DeletionSummaryTimelineInner.d.ts +34 -0
  32. package/dist/models/DeletionSummaryTimelineInner.js +50 -0
  33. package/dist/models/DeletionSummaryTopByDownloadsInner.d.ts +42 -0
  34. package/dist/models/DeletionSummaryTopByDownloadsInner.js +54 -0
  35. package/dist/models/DelistedModel.d.ts +54 -0
  36. package/dist/models/DelistedModel.js +60 -0
  37. package/dist/models/GetHistoricalDeletionSummary200Response.d.ts +67 -0
  38. package/dist/models/GetHistoricalDeletionSummary200Response.js +87 -0
  39. package/dist/models/HistoricalDeletion.d.ts +50 -0
  40. package/dist/models/HistoricalDeletion.js +58 -0
  41. package/dist/models/ListDelistedModels200Response.d.ts +67 -0
  42. package/dist/models/ListDelistedModels200Response.js +87 -0
  43. package/dist/models/ListHistoricalDeletions200Response.d.ts +67 -0
  44. package/dist/models/ListHistoricalDeletions200Response.js +87 -0
  45. package/dist/models/ModelDetail.d.ts +8 -0
  46. package/dist/models/ModelDetail.js +2 -2
  47. package/dist/models/ModelSummary.d.ts +8 -0
  48. package/dist/models/ModelSummary.js +4 -0
  49. package/dist/models/index.d.ts +8 -0
  50. package/dist/models/index.js +8 -0
  51. package/docs/DeletionSummary.md +45 -0
  52. package/docs/DeletionSummaryTimelineInner.md +36 -0
  53. package/docs/DeletionSummaryTopByDownloadsInner.md +40 -0
  54. package/docs/DelistedModel.md +46 -0
  55. package/docs/GetHistoricalDeletionSummary200Response.md +48 -0
  56. package/docs/HistoricalDeletion.md +44 -0
  57. package/docs/ListDelistedModels200Response.md +48 -0
  58. package/docs/ListHistoricalDeletions200Response.md +48 -0
  59. package/docs/ModelDetail.md +4 -0
  60. package/docs/ModelSummary.md +4 -0
  61. package/docs/ModelsApi.md +247 -3
  62. package/package.json +1 -1
  63. package/src/apis/ModelsApi.ts +362 -8
  64. package/src/models/DeletionSummary.ts +108 -0
  65. package/src/models/DeletionSummaryTimelineInner.ts +69 -0
  66. package/src/models/DeletionSummaryTopByDownloadsInner.ts +81 -0
  67. package/src/models/DelistedModel.ts +99 -0
  68. package/src/models/GetHistoricalDeletionSummary200Response.ts +132 -0
  69. package/src/models/HistoricalDeletion.ts +93 -0
  70. package/src/models/ListDelistedModels200Response.ts +132 -0
  71. package/src/models/ListHistoricalDeletions200Response.ts +132 -0
  72. package/src/models/ModelDetail.ts +12 -0
  73. package/src/models/ModelSummary.ts +12 -0
  74. package/src/models/index.ts +8 -0
@@ -0,0 +1,36 @@
1
+
2
+ # DeletionSummaryTimelineInner
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `month` | string
10
+ `count` | number
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { DeletionSummaryTimelineInner } from '@abliteration/sdk'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "month": null,
20
+ "count": null,
21
+ } satisfies DeletionSummaryTimelineInner
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as DeletionSummaryTimelineInner
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,40 @@
1
+
2
+ # DeletionSummaryTopByDownloadsInner
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `peak_downloads` | number
11
+ `last_seen_month` | string
12
+ `months_alive` | number
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { DeletionSummaryTopByDownloadsInner } from '@abliteration/sdk'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "id": null,
22
+ "peak_downloads": null,
23
+ "last_seen_month": null,
24
+ "months_alive": null,
25
+ } satisfies DeletionSummaryTopByDownloadsInner
26
+
27
+ console.log(example)
28
+
29
+ // Convert the instance to a JSON string
30
+ const exampleJSON: string = JSON.stringify(example)
31
+ console.log(exampleJSON)
32
+
33
+ // Parse the JSON string back to an object
34
+ const exampleParsed = JSON.parse(exampleJSON) as DeletionSummaryTopByDownloadsInner
35
+ console.log(exampleParsed)
36
+ ```
37
+
38
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
39
+
40
+
@@ -0,0 +1,46 @@
1
+
2
+ # DelistedModel
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `author` | string
11
+ `family` | string
12
+ `params_b` | number
13
+ `downloads` | number
14
+ `last_seen_at` | string
15
+ `days_since_gone` | number
16
+
17
+ ## Example
18
+
19
+ ```typescript
20
+ import type { DelistedModel } from '@abliteration/sdk'
21
+
22
+ // TODO: Update the object below with actual values
23
+ const example = {
24
+ "id": null,
25
+ "author": null,
26
+ "family": null,
27
+ "params_b": null,
28
+ "downloads": null,
29
+ "last_seen_at": null,
30
+ "days_since_gone": null,
31
+ } satisfies DelistedModel
32
+
33
+ console.log(example)
34
+
35
+ // Convert the instance to a JSON string
36
+ const exampleJSON: string = JSON.stringify(example)
37
+ console.log(exampleJSON)
38
+
39
+ // Parse the JSON string back to an object
40
+ const exampleParsed = JSON.parse(exampleJSON) as DelistedModel
41
+ console.log(exampleParsed)
42
+ ```
43
+
44
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
45
+
46
+
@@ -0,0 +1,48 @@
1
+
2
+ # GetHistoricalDeletionSummary200Response
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [DeletionSummary](DeletionSummary.md)
10
+ `cost` | number
11
+ `credits_remaining` | number
12
+ `rate_limit_limit` | number
13
+ `rate_limit_remaining` | number
14
+ `rate_limit_reset` | number
15
+ `metering` | string
16
+ `request_id` | string
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import type { GetHistoricalDeletionSummary200Response } from '@abliteration/sdk'
22
+
23
+ // TODO: Update the object below with actual values
24
+ const example = {
25
+ "data": null,
26
+ "cost": null,
27
+ "credits_remaining": null,
28
+ "rate_limit_limit": null,
29
+ "rate_limit_remaining": null,
30
+ "rate_limit_reset": null,
31
+ "metering": null,
32
+ "request_id": null,
33
+ } satisfies GetHistoricalDeletionSummary200Response
34
+
35
+ console.log(example)
36
+
37
+ // Convert the instance to a JSON string
38
+ const exampleJSON: string = JSON.stringify(example)
39
+ console.log(exampleJSON)
40
+
41
+ // Parse the JSON string back to an object
42
+ const exampleParsed = JSON.parse(exampleJSON) as GetHistoricalDeletionSummary200Response
43
+ console.log(exampleParsed)
44
+ ```
45
+
46
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
47
+
48
+
@@ -0,0 +1,44 @@
1
+
2
+ # HistoricalDeletion
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `first_seen_month` | string
11
+ `last_seen_month` | string
12
+ `total_months_alive` | number
13
+ `peak_downloads` | number
14
+ `created_at` | string
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { HistoricalDeletion } from '@abliteration/sdk'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "id": null,
24
+ "first_seen_month": null,
25
+ "last_seen_month": null,
26
+ "total_months_alive": null,
27
+ "peak_downloads": null,
28
+ "created_at": null,
29
+ } satisfies HistoricalDeletion
30
+
31
+ console.log(example)
32
+
33
+ // Convert the instance to a JSON string
34
+ const exampleJSON: string = JSON.stringify(example)
35
+ console.log(exampleJSON)
36
+
37
+ // Parse the JSON string back to an object
38
+ const exampleParsed = JSON.parse(exampleJSON) as HistoricalDeletion
39
+ console.log(exampleParsed)
40
+ ```
41
+
42
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
43
+
44
+
@@ -0,0 +1,48 @@
1
+
2
+ # ListDelistedModels200Response
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<DelistedModel>](DelistedModel.md)
10
+ `cost` | number
11
+ `credits_remaining` | number
12
+ `rate_limit_limit` | number
13
+ `rate_limit_remaining` | number
14
+ `rate_limit_reset` | number
15
+ `metering` | string
16
+ `request_id` | string
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import type { ListDelistedModels200Response } from '@abliteration/sdk'
22
+
23
+ // TODO: Update the object below with actual values
24
+ const example = {
25
+ "data": null,
26
+ "cost": null,
27
+ "credits_remaining": null,
28
+ "rate_limit_limit": null,
29
+ "rate_limit_remaining": null,
30
+ "rate_limit_reset": null,
31
+ "metering": null,
32
+ "request_id": null,
33
+ } satisfies ListDelistedModels200Response
34
+
35
+ console.log(example)
36
+
37
+ // Convert the instance to a JSON string
38
+ const exampleJSON: string = JSON.stringify(example)
39
+ console.log(exampleJSON)
40
+
41
+ // Parse the JSON string back to an object
42
+ const exampleParsed = JSON.parse(exampleJSON) as ListDelistedModels200Response
43
+ console.log(exampleParsed)
44
+ ```
45
+
46
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
47
+
48
+
@@ -0,0 +1,48 @@
1
+
2
+ # ListHistoricalDeletions200Response
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `data` | [Array<HistoricalDeletion>](HistoricalDeletion.md)
10
+ `cost` | number
11
+ `credits_remaining` | number
12
+ `rate_limit_limit` | number
13
+ `rate_limit_remaining` | number
14
+ `rate_limit_reset` | number
15
+ `metering` | string
16
+ `request_id` | string
17
+
18
+ ## Example
19
+
20
+ ```typescript
21
+ import type { ListHistoricalDeletions200Response } from '@abliteration/sdk'
22
+
23
+ // TODO: Update the object below with actual values
24
+ const example = {
25
+ "data": null,
26
+ "cost": null,
27
+ "credits_remaining": null,
28
+ "rate_limit_limit": null,
29
+ "rate_limit_remaining": null,
30
+ "rate_limit_reset": null,
31
+ "metering": null,
32
+ "request_id": null,
33
+ } satisfies ListHistoricalDeletions200Response
34
+
35
+ console.log(example)
36
+
37
+ // Convert the instance to a JSON string
38
+ const exampleJSON: string = JSON.stringify(example)
39
+ console.log(exampleJSON)
40
+
41
+ // Parse the JSON string back to an object
42
+ const exampleParsed = JSON.parse(exampleJSON) as ListHistoricalDeletions200Response
43
+ console.log(exampleParsed)
44
+ ```
45
+
46
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
47
+
48
+
@@ -29,6 +29,8 @@ Name | Type
29
29
  `last_modified` | string
30
30
  `first_seen_at` | string
31
31
  `last_seen_at` | string
32
+ `is_delisted` | number
33
+ `days_since_gone` | number
32
34
  `readme_text` | string
33
35
  `readme_status` | string
34
36
  `tags` | string
@@ -86,6 +88,8 @@ const example = {
86
88
  "last_modified": null,
87
89
  "first_seen_at": null,
88
90
  "last_seen_at": null,
91
+ "is_delisted": null,
92
+ "days_since_gone": null,
89
93
  "readme_text": null,
90
94
  "readme_status": null,
91
95
  "tags": null,
@@ -19,6 +19,8 @@ Name | Type
19
19
  `is_gguf` | number
20
20
  `created_at` | string
21
21
  `first_seen_at` | string
22
+ `is_delisted` | number
23
+ `last_seen_at` | string
22
24
 
23
25
  ## Example
24
26
 
@@ -40,6 +42,8 @@ const example = {
40
42
  "is_gguf": null,
41
43
  "created_at": null,
42
44
  "first_seen_at": null,
45
+ "is_delisted": null,
46
+ "last_seen_at": null,
43
47
  } satisfies ModelSummary
44
48
 
45
49
  console.log(example)
package/docs/ModelsApi.md CHANGED
@@ -4,18 +4,88 @@ All URIs are relative to *https://abliteration.org*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
+ | [**getHistoricalDeletionSummary**](ModelsApi.md#gethistoricaldeletionsummary) | **GET** /api/v1/models/historical-deletions/summary | Historical deletions — aggregate summary |
7
8
  | [**getModel**](ModelsApi.md#getmodel) | **GET** /api/v1/models/{id} | Get one model |
9
+ | [**listDelistedModels**](ModelsApi.md#listdelistedmodels) | **GET** /api/v1/models/delisted | List delisted models (change stream) |
10
+ | [**listHistoricalDeletions**](ModelsApi.md#listhistoricaldeletions) | **GET** /api/v1/models/historical-deletions/list | Historical deletions — paged list |
8
11
  | [**listModels**](ModelsApi.md#listmodels) | **GET** /api/v1/models | List models |
9
12
 
10
13
 
11
14
 
15
+ ## getHistoricalDeletionSummary
16
+
17
+ > GetHistoricalDeletionSummary200Response getHistoricalDeletionSummary()
18
+
19
+ Historical deletions — aggregate summary
20
+
21
+ Cost: 20 credits, flat. Aggregates from the 24-month HF snapshot analysis: total ever seen, total deleted, deletion rate, average months alive, monthly timeline of losses, top-10 by peak downloads. One call replaces half a dozen separate queries.
22
+
23
+ ### Example
24
+
25
+ ```ts
26
+ import {
27
+ Configuration,
28
+ ModelsApi,
29
+ } from '@abliteration/sdk';
30
+ import type { GetHistoricalDeletionSummaryRequest } from '@abliteration/sdk';
31
+
32
+ async function example() {
33
+ console.log("🚀 Testing @abliteration/sdk SDK...");
34
+ const config = new Configuration({
35
+ // Configure HTTP bearer authorization: bearerAuth
36
+ accessToken: "YOUR BEARER TOKEN",
37
+ });
38
+ const api = new ModelsApi(config);
39
+
40
+ try {
41
+ const data = await api.getHistoricalDeletionSummary();
42
+ console.log(data);
43
+ } catch (error) {
44
+ console.error(error);
45
+ }
46
+ }
47
+
48
+ // Run the test
49
+ example().catch(console.error);
50
+ ```
51
+
52
+ ### Parameters
53
+
54
+ This endpoint does not need any parameter.
55
+
56
+ ### Return type
57
+
58
+ [**GetHistoricalDeletionSummary200Response**](GetHistoricalDeletionSummary200Response.md)
59
+
60
+ ### Authorization
61
+
62
+ [bearerAuth](../README.md#bearerAuth)
63
+
64
+ ### HTTP request headers
65
+
66
+ - **Content-Type**: Not defined
67
+ - **Accept**: `application/json`
68
+
69
+
70
+ ### HTTP response details
71
+ | Status code | Description | Response headers |
72
+ |-------------|-------------|------------------|
73
+ | **200** | Deletion summary. | - |
74
+ | **401** | Missing, unknown or revoked key. | - |
75
+ | **402** | Not enough credits. Only possible while metering is enabled. | - |
76
+ | **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
77
+ | **503** | Catalog temporarily unreadable. Nothing was charged. | - |
78
+
79
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
80
+
81
+
12
82
  ## getModel
13
83
 
14
84
  > GetModel200Response getModel(id)
15
85
 
16
86
  Get one model
17
87
 
18
- Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
88
+ Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded. Delisted models are served here even though they are hidden from the default catalog list; the response then carries `is_delisted=1` and `days_since_gone`.
19
89
 
20
90
  ### Example
21
91
 
@@ -85,13 +155,184 @@ example().catch(console.error);
85
155
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
86
156
 
87
157
 
158
+ ## listDelistedModels
159
+
160
+ > ListDelistedModels200Response listDelistedModels(since, sort, limit, offset)
161
+
162
+ List delisted models (change stream)
163
+
164
+ Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with `since=<last_seen_at of your previous run>` to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or \"wayback\" tools live on this endpoint. See /api#change-stream.
165
+
166
+ ### Example
167
+
168
+ ```ts
169
+ import {
170
+ Configuration,
171
+ ModelsApi,
172
+ } from '@abliteration/sdk';
173
+ import type { ListDelistedModelsRequest } from '@abliteration/sdk';
174
+
175
+ async function example() {
176
+ console.log("🚀 Testing @abliteration/sdk SDK...");
177
+ const config = new Configuration({
178
+ // Configure HTTP bearer authorization: bearerAuth
179
+ accessToken: "YOUR BEARER TOKEN",
180
+ });
181
+ const api = new ModelsApi(config);
182
+
183
+ const body = {
184
+ // string | ISO-8601 date or timestamp. Rows with last_seen_at >= since only. Use your previous poll\'s newest last_seen_at to build an incremental feed. (optional)
185
+ since: since_example,
186
+ // 'recent' | 'downloads' | `recent` (default, newest disappearance first) or `downloads` (biggest casualties first — best for post-mortem coverage). (optional)
187
+ sort: sort_example,
188
+ // number | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (optional)
189
+ limit: 56,
190
+ // number | Rows to skip. Negative and non-numeric values are treated as 0. (optional)
191
+ offset: 56,
192
+ } satisfies ListDelistedModelsRequest;
193
+
194
+ try {
195
+ const data = await api.listDelistedModels(body);
196
+ console.log(data);
197
+ } catch (error) {
198
+ console.error(error);
199
+ }
200
+ }
201
+
202
+ // Run the test
203
+ example().catch(console.error);
204
+ ```
205
+
206
+ ### Parameters
207
+
208
+
209
+ | Name | Type | Description | Notes |
210
+ |------------- | ------------- | ------------- | -------------|
211
+ | **since** | `string` | ISO-8601 date or timestamp. Rows with last_seen_at >= since only. Use your previous poll\'s newest last_seen_at to build an incremental feed. | [Optional] [Defaults to `undefined`] |
212
+ | **sort** | `recent`, `downloads` | `recent` (default, newest disappearance first) or `downloads` (biggest casualties first — best for post-mortem coverage). | [Optional] [Defaults to `'recent'`] [Enum: recent, downloads] |
213
+ | **limit** | `number` | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [Optional] [Defaults to `50`] |
214
+ | **offset** | `number` | Rows to skip. Negative and non-numeric values are treated as 0. | [Optional] [Defaults to `0`] |
215
+
216
+ ### Return type
217
+
218
+ [**ListDelistedModels200Response**](ListDelistedModels200Response.md)
219
+
220
+ ### Authorization
221
+
222
+ [bearerAuth](../README.md#bearerAuth)
223
+
224
+ ### HTTP request headers
225
+
226
+ - **Content-Type**: Not defined
227
+ - **Accept**: `application/json`
228
+
229
+
230
+ ### HTTP response details
231
+ | Status code | Description | Response headers |
232
+ |-------------|-------------|------------------|
233
+ | **200** | Delisted models. | - |
234
+ | **401** | Missing, unknown or revoked key. | - |
235
+ | **402** | Not enough credits. Only possible while metering is enabled. | - |
236
+ | **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
237
+ | **503** | Catalog temporarily unreadable. Nothing was charged. | - |
238
+
239
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
240
+
241
+
242
+ ## listHistoricalDeletions
243
+
244
+ > ListHistoricalDeletions200Response listHistoricalDeletions(sinceMonth, minPeakDownloads, sort, limit, offset)
245
+
246
+ Historical deletions — paged list
247
+
248
+ Cost: 5 credits, flat. Paged/filterable window on the 24-month deletion backlog. Rows are frozen at the moment the model was last seen on the Hub — peak_downloads and total_months_alive never change after death. Sort by size (`downloads`, default), recency (`recent`, newest deaths first) or lifespan (`lifespan`, longest-lived first — surprising deaths).
249
+
250
+ ### Example
251
+
252
+ ```ts
253
+ import {
254
+ Configuration,
255
+ ModelsApi,
256
+ } from '@abliteration/sdk';
257
+ import type { ListHistoricalDeletionsRequest } from '@abliteration/sdk';
258
+
259
+ async function example() {
260
+ console.log("🚀 Testing @abliteration/sdk SDK...");
261
+ const config = new Configuration({
262
+ // Configure HTTP bearer authorization: bearerAuth
263
+ accessToken: "YOUR BEARER TOKEN",
264
+ });
265
+ const api = new ModelsApi(config);
266
+
267
+ const body = {
268
+ // string | ISO YYYY-MM. Rows with last_seen_month >= it only. (optional)
269
+ sinceMonth: sinceMonth_example,
270
+ // number | Only rows whose peak downloads >= this. `casualties over N` queries. (optional)
271
+ minPeakDownloads: 56,
272
+ // 'downloads' | 'recent' | 'lifespan' | `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (longest-lived first). (optional)
273
+ sort: sort_example,
274
+ // number | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (optional)
275
+ limit: 56,
276
+ // number | Rows to skip. Negative and non-numeric values are treated as 0. (optional)
277
+ offset: 56,
278
+ } satisfies ListHistoricalDeletionsRequest;
279
+
280
+ try {
281
+ const data = await api.listHistoricalDeletions(body);
282
+ console.log(data);
283
+ } catch (error) {
284
+ console.error(error);
285
+ }
286
+ }
287
+
288
+ // Run the test
289
+ example().catch(console.error);
290
+ ```
291
+
292
+ ### Parameters
293
+
294
+
295
+ | Name | Type | Description | Notes |
296
+ |------------- | ------------- | ------------- | -------------|
297
+ | **sinceMonth** | `string` | ISO YYYY-MM. Rows with last_seen_month >= it only. | [Optional] [Defaults to `undefined`] |
298
+ | **minPeakDownloads** | `number` | Only rows whose peak downloads >= this. `casualties over N` queries. | [Optional] [Defaults to `undefined`] |
299
+ | **sort** | `downloads`, `recent`, `lifespan` | `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (longest-lived first). | [Optional] [Defaults to `'downloads'`] [Enum: downloads, recent, lifespan] |
300
+ | **limit** | `number` | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [Optional] [Defaults to `50`] |
301
+ | **offset** | `number` | Rows to skip. Negative and non-numeric values are treated as 0. | [Optional] [Defaults to `0`] |
302
+
303
+ ### Return type
304
+
305
+ [**ListHistoricalDeletions200Response**](ListHistoricalDeletions200Response.md)
306
+
307
+ ### Authorization
308
+
309
+ [bearerAuth](../README.md#bearerAuth)
310
+
311
+ ### HTTP request headers
312
+
313
+ - **Content-Type**: Not defined
314
+ - **Accept**: `application/json`
315
+
316
+
317
+ ### HTTP response details
318
+ | Status code | Description | Response headers |
319
+ |-------------|-------------|------------------|
320
+ | **200** | Historical deletions. | - |
321
+ | **401** | Missing, unknown or revoked key. | - |
322
+ | **402** | Not enough credits. Only possible while metering is enabled. | - |
323
+ | **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
324
+ | **503** | Catalog temporarily unreadable. Nothing was charged. | - |
325
+
326
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
327
+
328
+
88
329
  ## listModels
89
330
 
90
- > ListModels200Response listModels(method, family, author, license, downloadsGte, downloadsLte, createdAfter, createdBefore, sort, limit, offset)
331
+ > ListModels200Response listModels(method, family, author, license, downloadsGte, downloadsLte, createdAfter, createdBefore, delisted, sort, limit, offset)
91
332
 
92
333
  List models
93
334
 
94
- Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
335
+ Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded by default (`delisted=live`); pass `delisted=dead|all` to include tombstoned records. A dedicated change-stream endpoint is at GET /api/v1/models/delisted.
95
336
 
96
337
  ### Example
97
338
 
@@ -127,6 +368,8 @@ async function example() {
127
368
  createdAfter: createdAfter_example,
128
369
  // string | ISO-8601 date or timestamp, inclusive. (optional)
129
370
  createdBefore: createdBefore_example,
371
+ // 'live' | 'dead' | 'all' | Tombstone filter. `live` (default): HF-visible models only. `dead`: delisted-only (same shape as this endpoint plus is_delisted=1 and last_seen_at). `all`: both, in one page. For a purpose-built change-stream feed, prefer GET /api/v1/models/delisted. (optional)
372
+ delisted: delisted_example,
130
373
  // 'downloads' | '-downloads' | 'likes' | '-likes' | 'created' | '-created' | 'created_at' | '-created_at' | 'first_seen' | '-first_seen' | 'first_seen_at' | '-first_seen_at' | Bare key is the natural direction (downloads/likes = most first, dates = newest first). A leading `-` flips it. `created` and `first_seen` are aliases for the full column names. (optional)
131
374
  sort: sort_example,
132
375
  // number | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (optional)
@@ -160,6 +403,7 @@ example().catch(console.error);
160
403
  | **downloadsLte** | `number` | | [Optional] [Defaults to `undefined`] |
161
404
  | **createdAfter** | `string` | ISO-8601 date or timestamp, inclusive. | [Optional] [Defaults to `undefined`] |
162
405
  | **createdBefore** | `string` | ISO-8601 date or timestamp, inclusive. | [Optional] [Defaults to `undefined`] |
406
+ | **delisted** | `live`, `dead`, `all` | Tombstone filter. `live` (default): HF-visible models only. `dead`: delisted-only (same shape as this endpoint plus is_delisted=1 and last_seen_at). `all`: both, in one page. For a purpose-built change-stream feed, prefer GET /api/v1/models/delisted. | [Optional] [Defaults to `'live'`] [Enum: live, dead, all] |
163
407
  | **sort** | `downloads`, `-downloads`, `likes`, `-likes`, `created`, `-created`, `created_at`, `-created_at`, `first_seen`, `-first_seen`, `first_seen_at`, `-first_seen_at` | Bare key is the natural direction (downloads/likes = most first, dates = newest first). A leading `-` flips it. `created` and `first_seen` are aliases for the full column names. | [Optional] [Defaults to `'downloads'`] [Enum: downloads, -downloads, likes, -likes, created, -created, created_at, -created_at, first_seen, -first_seen, first_seen_at, -first_seen_at] |
164
408
  | **limit** | `number` | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [Optional] [Defaults to `50`] |
165
409
  | **offset** | `number` | Rows to skip. Negative and non-numeric values are treated as 0. | [Optional] [Defaults to `0`] |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abliteration/sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "OpenAPI client for @abliteration/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {