@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
@@ -22,14 +22,61 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ListModelsSortEnum = exports.ModelsApi = void 0;
25
+ exports.ListModelsSortEnum = exports.ListModelsDelistedEnum = exports.ListHistoricalDeletionsSortEnum = exports.ListDelistedModelsSortEnum = exports.ModelsApi = void 0;
26
26
  const runtime = require("../runtime");
27
+ const GetHistoricalDeletionSummary200Response_1 = require("../models/GetHistoricalDeletionSummary200Response");
27
28
  const GetModel200Response_1 = require("../models/GetModel200Response");
29
+ const ListDelistedModels200Response_1 = require("../models/ListDelistedModels200Response");
30
+ const ListHistoricalDeletions200Response_1 = require("../models/ListHistoricalDeletions200Response");
28
31
  const ListModels200Response_1 = require("../models/ListModels200Response");
29
32
  /**
30
33
  *
31
34
  */
32
35
  class ModelsApi extends runtime.BaseAPI {
36
+ /**
37
+ * Creates request options for getHistoricalDeletionSummary without sending the request
38
+ */
39
+ getHistoricalDeletionSummaryRequestOpts() {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ const queryParameters = {};
42
+ const headerParameters = {};
43
+ if (this.configuration && this.configuration.accessToken) {
44
+ const token = this.configuration.accessToken;
45
+ const tokenString = yield token("bearerAuth", []);
46
+ if (tokenString) {
47
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
48
+ }
49
+ }
50
+ let urlPath = `/api/v1/models/historical-deletions/summary`;
51
+ return {
52
+ path: urlPath,
53
+ method: 'GET',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ };
57
+ });
58
+ }
59
+ /**
60
+ * 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.
61
+ * Historical deletions — aggregate summary
62
+ */
63
+ getHistoricalDeletionSummaryRaw(initOverrides) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const requestOptions = yield this.getHistoricalDeletionSummaryRequestOpts();
66
+ const response = yield this.request(requestOptions, initOverrides);
67
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetHistoricalDeletionSummary200Response_1.GetHistoricalDeletionSummary200ResponseFromJSON)(jsonValue));
68
+ });
69
+ }
70
+ /**
71
+ * 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.
72
+ * Historical deletions — aggregate summary
73
+ */
74
+ getHistoricalDeletionSummary(initOverrides) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ const response = yield this.getHistoricalDeletionSummaryRaw(initOverrides);
77
+ return yield response.value();
78
+ });
79
+ }
33
80
  /**
34
81
  * Creates request options for getModel without sending the request
35
82
  */
@@ -58,7 +105,7 @@ class ModelsApi extends runtime.BaseAPI {
58
105
  });
59
106
  }
60
107
  /**
61
- * 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.
108
+ * 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`.
62
109
  * Get one model
63
110
  */
64
111
  getModelRaw(requestParameters, initOverrides) {
@@ -69,7 +116,7 @@ class ModelsApi extends runtime.BaseAPI {
69
116
  });
70
117
  }
71
118
  /**
72
- * 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.
119
+ * 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`.
73
120
  * Get one model
74
121
  */
75
122
  getModel(requestParameters, initOverrides) {
@@ -78,6 +125,121 @@ class ModelsApi extends runtime.BaseAPI {
78
125
  return yield response.value();
79
126
  });
80
127
  }
128
+ /**
129
+ * Creates request options for listDelistedModels without sending the request
130
+ */
131
+ listDelistedModelsRequestOpts(requestParameters) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ const queryParameters = {};
134
+ if (requestParameters['since'] != null) {
135
+ queryParameters['since'] = requestParameters['since'];
136
+ }
137
+ if (requestParameters['sort'] != null) {
138
+ queryParameters['sort'] = requestParameters['sort'];
139
+ }
140
+ if (requestParameters['limit'] != null) {
141
+ queryParameters['limit'] = requestParameters['limit'];
142
+ }
143
+ if (requestParameters['offset'] != null) {
144
+ queryParameters['offset'] = requestParameters['offset'];
145
+ }
146
+ const headerParameters = {};
147
+ if (this.configuration && this.configuration.accessToken) {
148
+ const token = this.configuration.accessToken;
149
+ const tokenString = yield token("bearerAuth", []);
150
+ if (tokenString) {
151
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
152
+ }
153
+ }
154
+ let urlPath = `/api/v1/models/delisted`;
155
+ return {
156
+ path: urlPath,
157
+ method: 'GET',
158
+ headers: headerParameters,
159
+ query: queryParameters,
160
+ };
161
+ });
162
+ }
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
+ * List delisted models (change stream)
166
+ */
167
+ listDelistedModelsRaw(requestParameters, initOverrides) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ const requestOptions = yield this.listDelistedModelsRequestOpts(requestParameters);
170
+ const response = yield this.request(requestOptions, initOverrides);
171
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListDelistedModels200Response_1.ListDelistedModels200ResponseFromJSON)(jsonValue));
172
+ });
173
+ }
174
+ /**
175
+ * 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.
176
+ * List delisted models (change stream)
177
+ */
178
+ listDelistedModels() {
179
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
180
+ const response = yield this.listDelistedModelsRaw(requestParameters, initOverrides);
181
+ return yield response.value();
182
+ });
183
+ }
184
+ /**
185
+ * Creates request options for listHistoricalDeletions without sending the request
186
+ */
187
+ listHistoricalDeletionsRequestOpts(requestParameters) {
188
+ return __awaiter(this, void 0, void 0, function* () {
189
+ const queryParameters = {};
190
+ if (requestParameters['sinceMonth'] != null) {
191
+ queryParameters['since_month'] = requestParameters['sinceMonth'];
192
+ }
193
+ if (requestParameters['minPeakDownloads'] != null) {
194
+ queryParameters['min_peak_downloads'] = requestParameters['minPeakDownloads'];
195
+ }
196
+ if (requestParameters['sort'] != null) {
197
+ queryParameters['sort'] = requestParameters['sort'];
198
+ }
199
+ if (requestParameters['limit'] != null) {
200
+ queryParameters['limit'] = requestParameters['limit'];
201
+ }
202
+ if (requestParameters['offset'] != null) {
203
+ queryParameters['offset'] = requestParameters['offset'];
204
+ }
205
+ const headerParameters = {};
206
+ if (this.configuration && this.configuration.accessToken) {
207
+ const token = this.configuration.accessToken;
208
+ const tokenString = yield token("bearerAuth", []);
209
+ if (tokenString) {
210
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
211
+ }
212
+ }
213
+ let urlPath = `/api/v1/models/historical-deletions/list`;
214
+ return {
215
+ path: urlPath,
216
+ method: 'GET',
217
+ headers: headerParameters,
218
+ query: queryParameters,
219
+ };
220
+ });
221
+ }
222
+ /**
223
+ * 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).
224
+ * Historical deletions — paged list
225
+ */
226
+ listHistoricalDeletionsRaw(requestParameters, initOverrides) {
227
+ return __awaiter(this, void 0, void 0, function* () {
228
+ const requestOptions = yield this.listHistoricalDeletionsRequestOpts(requestParameters);
229
+ const response = yield this.request(requestOptions, initOverrides);
230
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListHistoricalDeletions200Response_1.ListHistoricalDeletions200ResponseFromJSON)(jsonValue));
231
+ });
232
+ }
233
+ /**
234
+ * 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).
235
+ * Historical deletions — paged list
236
+ */
237
+ listHistoricalDeletions() {
238
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
239
+ const response = yield this.listHistoricalDeletionsRaw(requestParameters, initOverrides);
240
+ return yield response.value();
241
+ });
242
+ }
81
243
  /**
82
244
  * Creates request options for listModels without sending the request
83
245
  */
@@ -108,6 +270,9 @@ class ModelsApi extends runtime.BaseAPI {
108
270
  if (requestParameters['createdBefore'] != null) {
109
271
  queryParameters['created_before'] = requestParameters['createdBefore'];
110
272
  }
273
+ if (requestParameters['delisted'] != null) {
274
+ queryParameters['delisted'] = requestParameters['delisted'];
275
+ }
111
276
  if (requestParameters['sort'] != null) {
112
277
  queryParameters['sort'] = requestParameters['sort'];
113
278
  }
@@ -135,7 +300,7 @@ class ModelsApi extends runtime.BaseAPI {
135
300
  });
136
301
  }
137
302
  /**
138
- * 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.
303
+ * 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.
139
304
  * List models
140
305
  */
141
306
  listModelsRaw(requestParameters, initOverrides) {
@@ -146,7 +311,7 @@ class ModelsApi extends runtime.BaseAPI {
146
311
  });
147
312
  }
148
313
  /**
149
- * 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.
314
+ * 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.
150
315
  * List models
151
316
  */
152
317
  listModels() {
@@ -157,6 +322,29 @@ class ModelsApi extends runtime.BaseAPI {
157
322
  }
158
323
  }
159
324
  exports.ModelsApi = ModelsApi;
325
+ /**
326
+ * @export
327
+ */
328
+ exports.ListDelistedModelsSortEnum = {
329
+ Recent: 'recent',
330
+ Downloads: 'downloads',
331
+ };
332
+ /**
333
+ * @export
334
+ */
335
+ exports.ListHistoricalDeletionsSortEnum = {
336
+ Downloads: 'downloads',
337
+ Recent: 'recent',
338
+ Lifespan: 'lifespan',
339
+ };
340
+ /**
341
+ * @export
342
+ */
343
+ exports.ListModelsDelistedEnum = {
344
+ Live: 'live',
345
+ Dead: 'dead',
346
+ All: 'all',
347
+ };
160
348
  /**
161
349
  * @export
162
350
  */
@@ -10,7 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
+ import { type GetHistoricalDeletionSummary200Response } from '../models/GetHistoricalDeletionSummary200Response';
13
14
  import { type GetModel200Response } from '../models/GetModel200Response';
15
+ import { type ListDelistedModels200Response } from '../models/ListDelistedModels200Response';
16
+ import { type ListHistoricalDeletions200Response } from '../models/ListHistoricalDeletions200Response';
14
17
  import { type ListModels200Response } from '../models/ListModels200Response';
15
18
  export interface GetModelRequest {
16
19
  /**
@@ -18,6 +21,46 @@ export interface GetModelRequest {
18
21
  */
19
22
  id: string;
20
23
  }
24
+ export interface ListDelistedModelsRequest {
25
+ /**
26
+ * 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.
27
+ */
28
+ since?: string;
29
+ /**
30
+ * `recent` (default, newest disappearance first) or `downloads` (biggest casualties first — best for post-mortem coverage).
31
+ */
32
+ sort?: ListDelistedModelsSortEnum;
33
+ /**
34
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
35
+ */
36
+ limit?: number;
37
+ /**
38
+ * Rows to skip. Negative and non-numeric values are treated as 0.
39
+ */
40
+ offset?: number;
41
+ }
42
+ export interface ListHistoricalDeletionsRequest {
43
+ /**
44
+ * ISO YYYY-MM. Rows with last_seen_month >= it only.
45
+ */
46
+ sinceMonth?: string;
47
+ /**
48
+ * Only rows whose peak downloads >= this. `casualties over N` queries.
49
+ */
50
+ minPeakDownloads?: number;
51
+ /**
52
+ * `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (longest-lived first).
53
+ */
54
+ sort?: ListHistoricalDeletionsSortEnum;
55
+ /**
56
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
57
+ */
58
+ limit?: number;
59
+ /**
60
+ * Rows to skip. Negative and non-numeric values are treated as 0.
61
+ */
62
+ offset?: number;
63
+ }
21
64
  export interface ListModelsRequest {
22
65
  /**
23
66
  * M-code, case-insensitive. See GET /api/v1/methods.
@@ -51,6 +94,10 @@ export interface ListModelsRequest {
51
94
  * ISO-8601 date or timestamp, inclusive.
52
95
  */
53
96
  createdBefore?: string;
97
+ /**
98
+ * 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.
99
+ */
100
+ delisted?: ListModelsDelistedEnum;
54
101
  /**
55
102
  * 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.
56
103
  */
@@ -71,6 +118,25 @@ export interface ListModelsRequest {
71
118
  * @interface ModelsApiInterface
72
119
  */
73
120
  export interface ModelsApiInterface {
121
+ /**
122
+ * Creates request options for getHistoricalDeletionSummary without sending the request
123
+ * @throws {RequiredError}
124
+ * @memberof ModelsApiInterface
125
+ */
126
+ getHistoricalDeletionSummaryRequestOpts(): Promise<runtime.RequestOpts>;
127
+ /**
128
+ * 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.
129
+ * @summary Historical deletions — aggregate summary
130
+ * @param {*} [options] Override http request option.
131
+ * @throws {RequiredError}
132
+ * @memberof ModelsApiInterface
133
+ */
134
+ getHistoricalDeletionSummaryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHistoricalDeletionSummary200Response>>;
135
+ /**
136
+ * 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.
137
+ * Historical deletions — aggregate summary
138
+ */
139
+ getHistoricalDeletionSummary(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetHistoricalDeletionSummary200Response>;
74
140
  /**
75
141
  * Creates request options for getModel without sending the request
76
142
  * @param {string} id
@@ -79,7 +145,7 @@ export interface ModelsApiInterface {
79
145
  */
80
146
  getModelRequestOpts(requestParameters: GetModelRequest): Promise<runtime.RequestOpts>;
81
147
  /**
82
- * 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.
148
+ * 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`.
83
149
  * @summary Get one model
84
150
  * @param {string} id
85
151
  * @param {*} [options] Override http request option.
@@ -88,10 +154,66 @@ export interface ModelsApiInterface {
88
154
  */
89
155
  getModelRaw(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModel200Response>>;
90
156
  /**
91
- * 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.
157
+ * 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`.
92
158
  * Get one model
93
159
  */
94
160
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
161
+ /**
162
+ * Creates request options for listDelistedModels without sending the request
163
+ * @param {string} [since] ISO-8601 date or timestamp. Rows with last_seen_at &gt;&#x3D; since only. Use your previous poll\&#39;s newest last_seen_at to build an incremental feed.
164
+ * @param {'recent' | 'downloads'} [sort] &#x60;recent&#x60; (default, newest disappearance first) or &#x60;downloads&#x60; (biggest casualties first — best for post-mortem coverage).
165
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
166
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
167
+ * @throws {RequiredError}
168
+ * @memberof ModelsApiInterface
169
+ */
170
+ listDelistedModelsRequestOpts(requestParameters: ListDelistedModelsRequest): Promise<runtime.RequestOpts>;
171
+ /**
172
+ * 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.
173
+ * @summary List delisted models (change stream)
174
+ * @param {string} [since] ISO-8601 date or timestamp. Rows with last_seen_at &gt;&#x3D; since only. Use your previous poll\&#39;s newest last_seen_at to build an incremental feed.
175
+ * @param {'recent' | 'downloads'} [sort] &#x60;recent&#x60; (default, newest disappearance first) or &#x60;downloads&#x60; (biggest casualties first — best for post-mortem coverage).
176
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
177
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
178
+ * @param {*} [options] Override http request option.
179
+ * @throws {RequiredError}
180
+ * @memberof ModelsApiInterface
181
+ */
182
+ listDelistedModelsRaw(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDelistedModels200Response>>;
183
+ /**
184
+ * 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.
185
+ * List delisted models (change stream)
186
+ */
187
+ listDelistedModels(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDelistedModels200Response>;
188
+ /**
189
+ * Creates request options for listHistoricalDeletions without sending the request
190
+ * @param {string} [sinceMonth] ISO YYYY-MM. Rows with last_seen_month &gt;&#x3D; it only.
191
+ * @param {number} [minPeakDownloads] Only rows whose peak downloads &gt;&#x3D; this. &#x60;casualties over N&#x60; queries.
192
+ * @param {'downloads' | 'recent' | 'lifespan'} [sort] &#x60;downloads&#x60; (default, biggest first), &#x60;recent&#x60; (newest last_seen_month first), &#x60;lifespan&#x60; (longest-lived first).
193
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
194
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
195
+ * @throws {RequiredError}
196
+ * @memberof ModelsApiInterface
197
+ */
198
+ listHistoricalDeletionsRequestOpts(requestParameters: ListHistoricalDeletionsRequest): Promise<runtime.RequestOpts>;
199
+ /**
200
+ * 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).
201
+ * @summary Historical deletions — paged list
202
+ * @param {string} [sinceMonth] ISO YYYY-MM. Rows with last_seen_month &gt;&#x3D; it only.
203
+ * @param {number} [minPeakDownloads] Only rows whose peak downloads &gt;&#x3D; this. &#x60;casualties over N&#x60; queries.
204
+ * @param {'downloads' | 'recent' | 'lifespan'} [sort] &#x60;downloads&#x60; (default, biggest first), &#x60;recent&#x60; (newest last_seen_month first), &#x60;lifespan&#x60; (longest-lived first).
205
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
206
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
207
+ * @param {*} [options] Override http request option.
208
+ * @throws {RequiredError}
209
+ * @memberof ModelsApiInterface
210
+ */
211
+ listHistoricalDeletionsRaw(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListHistoricalDeletions200Response>>;
212
+ /**
213
+ * 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).
214
+ * Historical deletions — paged list
215
+ */
216
+ listHistoricalDeletions(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
95
217
  /**
96
218
  * Creates request options for listModels without sending the request
97
219
  * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
@@ -102,6 +224,7 @@ export interface ModelsApiInterface {
102
224
  * @param {number} [downloadsLte]
103
225
  * @param {string} [createdAfter] ISO-8601 date or timestamp, inclusive.
104
226
  * @param {string} [createdBefore] ISO-8601 date or timestamp, inclusive.
227
+ * @param {'live' | 'dead' | 'all'} [delisted] Tombstone filter. &#x60;live&#x60; (default): HF-visible models only. &#x60;dead&#x60;: delisted-only (same shape as this endpoint plus is_delisted&#x3D;1 and last_seen_at). &#x60;all&#x60;: both, in one page. For a purpose-built change-stream feed, prefer GET /api/v1/models/delisted.
105
228
  * @param {'downloads' | '-downloads' | 'likes' | '-likes' | 'created' | '-created' | 'created_at' | '-created_at' | 'first_seen' | '-first_seen' | 'first_seen_at' | '-first_seen_at'} [sort] Bare key is the natural direction (downloads/likes &#x3D; most first, dates &#x3D; newest first). A leading &#x60;-&#x60; flips it. &#x60;created&#x60; and &#x60;first_seen&#x60; are aliases for the full column names.
106
229
  * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
107
230
  * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
@@ -110,7 +233,7 @@ export interface ModelsApiInterface {
110
233
  */
111
234
  listModelsRequestOpts(requestParameters: ListModelsRequest): Promise<runtime.RequestOpts>;
112
235
  /**
113
- * 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.
236
+ * 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.
114
237
  * @summary List models
115
238
  * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
116
239
  * @param {string} [family] Base family, for example qwen or llama.
@@ -120,6 +243,7 @@ export interface ModelsApiInterface {
120
243
  * @param {number} [downloadsLte]
121
244
  * @param {string} [createdAfter] ISO-8601 date or timestamp, inclusive.
122
245
  * @param {string} [createdBefore] ISO-8601 date or timestamp, inclusive.
246
+ * @param {'live' | 'dead' | 'all'} [delisted] Tombstone filter. &#x60;live&#x60; (default): HF-visible models only. &#x60;dead&#x60;: delisted-only (same shape as this endpoint plus is_delisted&#x3D;1 and last_seen_at). &#x60;all&#x60;: both, in one page. For a purpose-built change-stream feed, prefer GET /api/v1/models/delisted.
123
247
  * @param {'downloads' | '-downloads' | 'likes' | '-likes' | 'created' | '-created' | 'created_at' | '-created_at' | 'first_seen' | '-first_seen' | 'first_seen_at' | '-first_seen_at'} [sort] Bare key is the natural direction (downloads/likes &#x3D; most first, dates &#x3D; newest first). A leading &#x60;-&#x60; flips it. &#x60;created&#x60; and &#x60;first_seen&#x60; are aliases for the full column names.
124
248
  * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
125
249
  * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
@@ -129,7 +253,7 @@ export interface ModelsApiInterface {
129
253
  */
130
254
  listModelsRaw(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModels200Response>>;
131
255
  /**
132
- * 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.
256
+ * 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.
133
257
  * List models
134
258
  */
135
259
  listModels(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModels200Response>;
@@ -138,35 +262,103 @@ export interface ModelsApiInterface {
138
262
  *
139
263
  */
140
264
  export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
265
+ /**
266
+ * Creates request options for getHistoricalDeletionSummary without sending the request
267
+ */
268
+ getHistoricalDeletionSummaryRequestOpts(): Promise<runtime.RequestOpts>;
269
+ /**
270
+ * 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.
271
+ * Historical deletions — aggregate summary
272
+ */
273
+ getHistoricalDeletionSummaryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHistoricalDeletionSummary200Response>>;
274
+ /**
275
+ * 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.
276
+ * Historical deletions — aggregate summary
277
+ */
278
+ getHistoricalDeletionSummary(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetHistoricalDeletionSummary200Response>;
141
279
  /**
142
280
  * Creates request options for getModel without sending the request
143
281
  */
144
282
  getModelRequestOpts(requestParameters: GetModelRequest): Promise<runtime.RequestOpts>;
145
283
  /**
146
- * 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.
284
+ * 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`.
147
285
  * Get one model
148
286
  */
149
287
  getModelRaw(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModel200Response>>;
150
288
  /**
151
- * 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.
289
+ * 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`.
152
290
  * Get one model
153
291
  */
154
292
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
293
+ /**
294
+ * Creates request options for listDelistedModels without sending the request
295
+ */
296
+ listDelistedModelsRequestOpts(requestParameters: ListDelistedModelsRequest): Promise<runtime.RequestOpts>;
297
+ /**
298
+ * 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.
299
+ * List delisted models (change stream)
300
+ */
301
+ listDelistedModelsRaw(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDelistedModels200Response>>;
302
+ /**
303
+ * 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.
304
+ * List delisted models (change stream)
305
+ */
306
+ listDelistedModels(requestParameters?: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDelistedModels200Response>;
307
+ /**
308
+ * Creates request options for listHistoricalDeletions without sending the request
309
+ */
310
+ listHistoricalDeletionsRequestOpts(requestParameters: ListHistoricalDeletionsRequest): Promise<runtime.RequestOpts>;
311
+ /**
312
+ * 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).
313
+ * Historical deletions — paged list
314
+ */
315
+ listHistoricalDeletionsRaw(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListHistoricalDeletions200Response>>;
316
+ /**
317
+ * 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).
318
+ * Historical deletions — paged list
319
+ */
320
+ listHistoricalDeletions(requestParameters?: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
155
321
  /**
156
322
  * Creates request options for listModels without sending the request
157
323
  */
158
324
  listModelsRequestOpts(requestParameters: ListModelsRequest): Promise<runtime.RequestOpts>;
159
325
  /**
160
- * 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.
326
+ * 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.
161
327
  * List models
162
328
  */
163
329
  listModelsRaw(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModels200Response>>;
164
330
  /**
165
- * 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.
331
+ * 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.
166
332
  * List models
167
333
  */
168
334
  listModels(requestParameters?: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModels200Response>;
169
335
  }
336
+ /**
337
+ * @export
338
+ */
339
+ export declare const ListDelistedModelsSortEnum: {
340
+ readonly Recent: "recent";
341
+ readonly Downloads: "downloads";
342
+ };
343
+ export type ListDelistedModelsSortEnum = typeof ListDelistedModelsSortEnum[keyof typeof ListDelistedModelsSortEnum];
344
+ /**
345
+ * @export
346
+ */
347
+ export declare const ListHistoricalDeletionsSortEnum: {
348
+ readonly Downloads: "downloads";
349
+ readonly Recent: "recent";
350
+ readonly Lifespan: "lifespan";
351
+ };
352
+ export type ListHistoricalDeletionsSortEnum = typeof ListHistoricalDeletionsSortEnum[keyof typeof ListHistoricalDeletionsSortEnum];
353
+ /**
354
+ * @export
355
+ */
356
+ export declare const ListModelsDelistedEnum: {
357
+ readonly Live: "live";
358
+ readonly Dead: "dead";
359
+ readonly All: "all";
360
+ };
361
+ export type ListModelsDelistedEnum = typeof ListModelsDelistedEnum[keyof typeof ListModelsDelistedEnum];
170
362
  /**
171
363
  * @export
172
364
  */