@openrouter/sdk 0.5.1 → 0.9.11

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 (280) hide show
  1. package/FUNCTIONS.md +5 -1
  2. package/esm/funcs/analyticsGetUserActivity.d.ts +1 -1
  3. package/esm/funcs/analyticsGetUserActivity.js +4 -2
  4. package/esm/funcs/apiKeysCreate.d.ts +1 -1
  5. package/esm/funcs/apiKeysCreate.js +5 -3
  6. package/esm/funcs/apiKeysDelete.d.ts +1 -1
  7. package/esm/funcs/apiKeysDelete.js +3 -1
  8. package/esm/funcs/apiKeysGet.d.ts +1 -1
  9. package/esm/funcs/apiKeysGet.js +3 -1
  10. package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +1 -1
  11. package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +14 -3
  12. package/esm/funcs/apiKeysList.d.ts +1 -1
  13. package/esm/funcs/apiKeysList.js +4 -2
  14. package/esm/funcs/apiKeysUpdate.d.ts +1 -1
  15. package/esm/funcs/apiKeysUpdate.js +3 -1
  16. package/esm/funcs/betaResponsesSend.d.ts +9 -5
  17. package/esm/funcs/betaResponsesSend.js +10 -5
  18. package/esm/funcs/chatSend.d.ts +11 -7
  19. package/esm/funcs/chatSend.js +28 -7
  20. package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +1 -2
  21. package/esm/funcs/creditsCreateCoinbaseCharge.js +7 -4
  22. package/esm/funcs/creditsGetCredits.d.ts +2 -2
  23. package/esm/funcs/creditsGetCredits.js +15 -4
  24. package/esm/funcs/embeddingsGenerate.js +4 -2
  25. package/esm/funcs/embeddingsListModels.d.ts +2 -1
  26. package/esm/funcs/embeddingsListModels.js +15 -3
  27. package/esm/funcs/endpointsList.js +2 -0
  28. package/esm/funcs/endpointsListZdrEndpoints.d.ts +1 -1
  29. package/esm/funcs/endpointsListZdrEndpoints.js +14 -3
  30. package/esm/funcs/generationsGetGeneration.js +3 -1
  31. package/esm/funcs/guardrailsBulkAssignKeys.d.ts +1 -1
  32. package/esm/funcs/guardrailsBulkAssignKeys.js +3 -1
  33. package/esm/funcs/guardrailsBulkAssignMembers.d.ts +1 -1
  34. package/esm/funcs/guardrailsBulkAssignMembers.js +3 -1
  35. package/esm/funcs/guardrailsBulkUnassignKeys.d.ts +1 -1
  36. package/esm/funcs/guardrailsBulkUnassignKeys.js +3 -1
  37. package/esm/funcs/guardrailsBulkUnassignMembers.d.ts +1 -1
  38. package/esm/funcs/guardrailsBulkUnassignMembers.js +3 -1
  39. package/esm/funcs/guardrailsCreate.d.ts +1 -1
  40. package/esm/funcs/guardrailsCreate.js +5 -3
  41. package/esm/funcs/guardrailsDelete.d.ts +1 -1
  42. package/esm/funcs/guardrailsDelete.js +3 -1
  43. package/esm/funcs/guardrailsGet.d.ts +1 -1
  44. package/esm/funcs/guardrailsGet.js +3 -1
  45. package/esm/funcs/guardrailsList.d.ts +1 -1
  46. package/esm/funcs/guardrailsList.js +4 -2
  47. package/esm/funcs/guardrailsListGuardrailKeyAssignments.d.ts +1 -1
  48. package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +3 -1
  49. package/esm/funcs/guardrailsListGuardrailMemberAssignments.d.ts +1 -1
  50. package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +3 -1
  51. package/esm/funcs/guardrailsListKeyAssignments.d.ts +1 -1
  52. package/esm/funcs/guardrailsListKeyAssignments.js +4 -2
  53. package/esm/funcs/guardrailsListMemberAssignments.d.ts +1 -1
  54. package/esm/funcs/guardrailsListMemberAssignments.js +4 -2
  55. package/esm/funcs/guardrailsUpdate.d.ts +1 -1
  56. package/esm/funcs/guardrailsUpdate.js +3 -1
  57. package/esm/funcs/modelsCount.d.ts +2 -1
  58. package/esm/funcs/modelsCount.js +15 -3
  59. package/esm/funcs/modelsList.js +3 -1
  60. package/esm/funcs/modelsListForUser.d.ts +1 -1
  61. package/esm/funcs/modelsListForUser.js +15 -3
  62. package/esm/funcs/oAuthCreateAuthCode.js +4 -2
  63. package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +4 -2
  64. package/esm/funcs/providersList.d.ts +1 -1
  65. package/esm/funcs/providersList.js +14 -3
  66. package/esm/lib/config.d.ts +2 -2
  67. package/esm/lib/config.js +2 -2
  68. package/esm/lib/model-result.d.ts +3 -5
  69. package/esm/lib/model-result.js +98 -46
  70. package/esm/models/assistantmessage.d.ts +47 -36
  71. package/esm/models/assistantmessage.js +35 -47
  72. package/esm/models/assistantmessageimages.d.ts +33 -0
  73. package/esm/models/assistantmessageimages.js +44 -0
  74. package/esm/models/chatgenerationparams.d.ts +318 -182
  75. package/esm/models/chatgenerationparams.js +157 -143
  76. package/esm/models/chatgenerationtokenusage.d.ts +48 -0
  77. package/esm/models/chatmessagecontentitem.d.ts +15 -10
  78. package/esm/models/chatmessagecontentitem.js +25 -4
  79. package/esm/models/chatmessagecontentitemaudio.d.ts +20 -2
  80. package/esm/models/chatmessagecontentitemaudio.js +9 -2
  81. package/esm/models/chatmessagecontentitemcachecontrol.d.ts +14 -3
  82. package/esm/models/chatmessagecontentitemcachecontrol.js +9 -2
  83. package/esm/models/chatmessagecontentitemimage.d.ts +26 -3
  84. package/esm/models/chatmessagecontentitemimage.js +12 -2
  85. package/esm/models/chatmessagecontentitemtext.d.ts +17 -2
  86. package/esm/models/chatmessagecontentitemtext.js +9 -2
  87. package/esm/models/chatmessagecontentitemvideo.d.ts +12 -55
  88. package/esm/models/chatmessagecontentitemvideo.js +5 -72
  89. package/esm/models/chatmessagecontentitemvideolegacy.d.ts +28 -0
  90. package/esm/models/chatmessagecontentitemvideolegacy.js +33 -0
  91. package/esm/models/chatmessagetokenlogprob.d.ts +15 -0
  92. package/esm/models/chatmessagetokenlogprobs.d.ts +9 -0
  93. package/esm/models/chatmessagetoolcall.d.ts +23 -2
  94. package/esm/models/chatmessagetoolcall.js +9 -2
  95. package/esm/models/chatresponse.d.ts +29 -1
  96. package/esm/models/chatresponse.js +6 -1
  97. package/esm/models/chatresponsechoice.d.ts +13 -2
  98. package/esm/models/chatresponsechoice.js +1 -2
  99. package/esm/models/chatstreamingchoice.d.ts +13 -2
  100. package/esm/models/chatstreamingchoice.js +1 -2
  101. package/esm/models/chatstreamingmessagechunk.d.ts +29 -2
  102. package/esm/models/chatstreamingmessagechunk.js +5 -2
  103. package/esm/models/chatstreamingmessagetoolcall.d.ts +38 -1
  104. package/esm/models/chatstreamingmessagetoolcall.js +9 -1
  105. package/esm/models/chatstreamingresponsechunk.d.ts +45 -11
  106. package/esm/models/chatstreamingresponsechunk.js +11 -25
  107. package/esm/models/chatstreamoptions.d.ts +8 -0
  108. package/esm/models/debugoptions.d.ts +18 -0
  109. package/esm/models/debugoptions.js +18 -0
  110. package/esm/models/developermessage.d.ts +35 -0
  111. package/esm/models/developermessage.js +24 -0
  112. package/esm/models/errors/index.d.ts +0 -1
  113. package/esm/models/errors/index.js +0 -1
  114. package/esm/models/index.d.ts +13 -5
  115. package/esm/models/index.js +13 -5
  116. package/esm/models/jsonschemaconfig.d.ts +17 -2
  117. package/esm/models/jsonschemaconfig.js +1 -1
  118. package/esm/models/message.d.ts +10 -23
  119. package/esm/models/message.js +3 -20
  120. package/esm/models/modelscountresponse.d.ts +4 -4
  121. package/esm/models/modelscountresponse.js +4 -4
  122. package/esm/models/namedtoolchoice.d.ts +15 -2
  123. package/esm/models/namedtoolchoice.js +6 -1
  124. package/esm/models/openairesponsesreasoningconfig.d.ts +1 -1
  125. package/esm/models/openairesponsesreasoningconfig.js +1 -1
  126. package/esm/models/openresponsesnonstreamingresponse.d.ts +4 -4
  127. package/esm/models/openresponsesnonstreamingresponse.js +3 -3
  128. package/esm/models/openresponsesreasoning.d.ts +2 -2
  129. package/esm/models/openresponsesreasoning.js +1 -1
  130. package/esm/models/openresponsesreasoningconfig.d.ts +2 -2
  131. package/esm/models/openresponsesreasoningconfig.js +1 -1
  132. package/esm/models/openresponsesrequest.d.ts +31 -13
  133. package/esm/models/openresponsesrequest.js +25 -0
  134. package/esm/models/operations/bulkassignkeystoguardrail.d.ts +30 -0
  135. package/esm/models/operations/bulkassignkeystoguardrail.js +4 -0
  136. package/esm/models/operations/bulkassignmemberstoguardrail.d.ts +30 -0
  137. package/esm/models/operations/bulkassignmemberstoguardrail.js +4 -0
  138. package/esm/models/operations/bulkunassignkeysfromguardrail.d.ts +30 -0
  139. package/esm/models/operations/bulkunassignkeysfromguardrail.js +4 -0
  140. package/esm/models/operations/bulkunassignmembersfromguardrail.d.ts +30 -0
  141. package/esm/models/operations/bulkunassignmembersfromguardrail.js +4 -0
  142. package/esm/models/operations/createauthkeyscode.d.ts +66 -2
  143. package/esm/models/operations/createauthkeyscode.js +30 -1
  144. package/esm/models/operations/createcoinbasecharge.d.ts +41 -0
  145. package/esm/models/operations/createcoinbasecharge.js +16 -0
  146. package/esm/models/operations/createembeddings.d.ts +42 -2
  147. package/esm/models/operations/createembeddings.js +16 -1
  148. package/esm/models/operations/createguardrail.d.ts +42 -2
  149. package/esm/models/operations/createguardrail.js +16 -1
  150. package/esm/models/operations/createkeys.d.ts +42 -2
  151. package/esm/models/operations/createkeys.js +16 -1
  152. package/esm/models/operations/createresponses.d.ts +40 -0
  153. package/esm/models/operations/createresponses.js +16 -0
  154. package/esm/models/operations/deleteguardrail.d.ts +30 -0
  155. package/esm/models/operations/deleteguardrail.js +8 -0
  156. package/esm/models/operations/deletekeys.d.ts +30 -0
  157. package/esm/models/operations/deletekeys.js +8 -0
  158. package/esm/models/operations/exchangeauthcodeforapikey.d.ts +42 -2
  159. package/esm/models/operations/exchangeauthcodeforapikey.js +16 -1
  160. package/esm/models/operations/getcredits.d.ts +38 -0
  161. package/esm/models/operations/getcredits.js +13 -0
  162. package/esm/models/operations/getcurrentkey.d.ts +45 -1
  163. package/esm/models/operations/getcurrentkey.js +15 -0
  164. package/esm/models/operations/getgeneration.d.ts +153 -0
  165. package/esm/models/operations/getgeneration.js +135 -0
  166. package/esm/models/operations/getguardrail.d.ts +30 -0
  167. package/esm/models/operations/getguardrail.js +7 -0
  168. package/esm/models/operations/getkey.d.ts +30 -0
  169. package/esm/models/operations/getkey.js +7 -0
  170. package/esm/models/operations/getmodels.d.ts +30 -0
  171. package/esm/models/operations/getmodels.js +4 -0
  172. package/esm/models/operations/getuseractivity.d.ts +30 -0
  173. package/esm/models/operations/getuseractivity.js +8 -0
  174. package/esm/models/operations/index.d.ts +2 -0
  175. package/esm/models/operations/index.js +2 -0
  176. package/esm/models/operations/list.d.ts +30 -0
  177. package/esm/models/operations/list.js +4 -0
  178. package/esm/models/operations/listembeddingsmodels.d.ts +40 -0
  179. package/esm/models/operations/listembeddingsmodels.js +20 -0
  180. package/esm/models/operations/listendpoints.d.ts +30 -0
  181. package/esm/models/operations/listendpoints.js +8 -0
  182. package/esm/models/operations/listendpointszdr.d.ts +38 -0
  183. package/esm/models/operations/listendpointszdr.js +14 -0
  184. package/esm/models/operations/listguardrailkeyassignments.d.ts +30 -0
  185. package/esm/models/operations/listguardrailkeyassignments.js +7 -0
  186. package/esm/models/operations/listguardrailmemberassignments.d.ts +30 -0
  187. package/esm/models/operations/listguardrailmemberassignments.js +7 -0
  188. package/esm/models/operations/listguardrails.d.ts +30 -0
  189. package/esm/models/operations/listguardrails.js +7 -0
  190. package/esm/models/operations/listkeyassignments.d.ts +30 -0
  191. package/esm/models/operations/listkeyassignments.js +7 -0
  192. package/esm/models/operations/listmemberassignments.d.ts +30 -0
  193. package/esm/models/operations/listmemberassignments.js +7 -0
  194. package/esm/models/operations/listmodelscount.d.ts +40 -0
  195. package/esm/models/operations/listmodelscount.js +20 -0
  196. package/esm/models/operations/listmodelsuser.d.ts +38 -0
  197. package/esm/models/operations/listmodelsuser.js +14 -0
  198. package/esm/models/operations/listproviders.d.ts +38 -0
  199. package/esm/models/operations/listproviders.js +13 -0
  200. package/esm/models/operations/sendchatcompletionrequest.d.ts +53 -1
  201. package/esm/models/operations/sendchatcompletionrequest.js +36 -2
  202. package/esm/models/operations/updateguardrail.d.ts +30 -0
  203. package/esm/models/operations/updateguardrail.js +4 -0
  204. package/esm/models/operations/updatekeys.d.ts +30 -0
  205. package/esm/models/operations/updatekeys.js +4 -0
  206. package/esm/models/providername.d.ts +4 -0
  207. package/esm/models/providername.js +4 -0
  208. package/esm/models/providerpreferences.d.ts +46 -27
  209. package/esm/models/providerpreferences.js +29 -15
  210. package/esm/models/providersort.d.ts +6 -0
  211. package/esm/models/providersort.js +3 -0
  212. package/esm/models/providersortconfig.d.ts +30 -2
  213. package/esm/models/providersortconfig.js +15 -2
  214. package/esm/models/publicendpoint.d.ts +0 -39
  215. package/esm/models/publicpricing.d.ts +0 -39
  216. package/esm/models/reasoningdetailencrypted.d.ts +42 -0
  217. package/esm/models/reasoningdetailencrypted.js +42 -0
  218. package/esm/models/reasoningdetailsummary.d.ts +42 -0
  219. package/esm/models/reasoningdetailsummary.js +42 -0
  220. package/esm/models/reasoningdetailtext.d.ts +44 -0
  221. package/esm/models/reasoningdetailtext.js +44 -0
  222. package/esm/models/reasoningdetailunion.d.ts +19 -0
  223. package/esm/models/reasoningdetailunion.js +28 -0
  224. package/esm/models/responseformatjsonobject.d.ts +20 -0
  225. package/esm/models/responseformatjsonobject.js +21 -0
  226. package/esm/models/responseformatjsonschema.d.ts +6 -0
  227. package/esm/models/responseformattext.d.ts +15 -0
  228. package/esm/models/responseformattext.js +13 -0
  229. package/esm/models/responseformattextconfig.d.ts +3 -3
  230. package/esm/models/responseformattextconfig.js +3 -3
  231. package/esm/models/responseformattextgrammar.d.ts +6 -0
  232. package/esm/models/responseformattextpython.d.ts +15 -0
  233. package/esm/models/responseformattextpython.js +13 -0
  234. package/esm/models/responseserrorfield.d.ts +4 -4
  235. package/esm/models/responseserrorfield.js +4 -4
  236. package/esm/models/responsesoutputitemreasoning.d.ts +2 -2
  237. package/esm/models/responsesoutputitemreasoning.js +2 -2
  238. package/esm/models/systemmessage.d.ts +12 -0
  239. package/esm/models/toolchoiceoption.d.ts +31 -0
  240. package/esm/models/toolchoiceoption.js +32 -0
  241. package/esm/models/tooldefinitionjson.d.ts +38 -4
  242. package/esm/models/tooldefinitionjson.js +14 -2
  243. package/esm/models/toolresponsemessage.d.ts +12 -0
  244. package/esm/models/usermessage.d.ts +12 -0
  245. package/esm/models/videoinput.d.ts +23 -0
  246. package/esm/models/videoinput.js +22 -0
  247. package/esm/sdk/analytics.d.ts +1 -1
  248. package/esm/sdk/analytics.js +1 -1
  249. package/esm/sdk/apikeys.d.ts +6 -6
  250. package/esm/sdk/apikeys.js +7 -7
  251. package/esm/sdk/chat.d.ts +10 -6
  252. package/esm/sdk/credits.d.ts +3 -4
  253. package/esm/sdk/credits.js +3 -3
  254. package/esm/sdk/embeddings.d.ts +1 -1
  255. package/esm/sdk/embeddings.js +2 -2
  256. package/esm/sdk/endpoints.d.ts +1 -1
  257. package/esm/sdk/endpoints.js +2 -2
  258. package/esm/sdk/guardrails.d.ts +13 -13
  259. package/esm/sdk/guardrails.js +13 -13
  260. package/esm/sdk/models.d.ts +2 -2
  261. package/esm/sdk/models.js +4 -4
  262. package/esm/sdk/providers.d.ts +1 -1
  263. package/esm/sdk/providers.js +2 -2
  264. package/esm/sdk/responses.d.ts +9 -5
  265. package/esm/sdk/sdk.d.ts +2 -2
  266. package/esm/sdk/sdk.js +3 -3
  267. package/jsr.json +1 -1
  268. package/package.json +1 -1
  269. package/esm/models/chaterror.d.ts +0 -17
  270. package/esm/models/chaterror.js +0 -25
  271. package/esm/models/errors/chaterror.d.ts +0 -19
  272. package/esm/models/errors/chaterror.js +0 -32
  273. package/esm/models/providersortunion.d.ts +0 -10
  274. package/esm/models/providersortunion.js +0 -13
  275. package/esm/models/responsesformatjsonobject.d.ts +0 -20
  276. package/esm/models/responsesformatjsonobject.js +0 -21
  277. package/esm/models/schema0.d.ts +0 -84
  278. package/esm/models/schema0.js +0 -87
  279. package/esm/models/schema2.d.ts +0 -92
  280. package/esm/models/schema2.js +0 -109
@@ -7,10 +7,14 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  /** @internal */
9
9
  export const ListRequest$outboundSchema = z.object({
10
+ httpReferer: z.string().optional(),
11
+ xTitle: z.string().optional(),
10
12
  includeDisabled: z.string().optional(),
11
13
  offset: z.string().optional(),
12
14
  }).transform((v) => {
13
15
  return remap$(v, {
16
+ httpReferer: "HTTP-Referer",
17
+ xTitle: "X-Title",
14
18
  includeDisabled: "include_disabled",
15
19
  });
16
20
  });
@@ -0,0 +1,40 @@
1
+ import * as z from "zod/v4";
2
+ export type ListEmbeddingsModelsGlobals = {
3
+ /**
4
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
+ *
6
+ * @remarks
7
+ * This is used to track API usage per application.
8
+ */
9
+ httpReferer?: string | undefined;
10
+ /**
11
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
+ *
13
+ * @remarks
14
+ */
15
+ xTitle?: string | undefined;
16
+ };
17
+ export type ListEmbeddingsModelsRequest = {
18
+ /**
19
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
20
+ *
21
+ * @remarks
22
+ * This is used to track API usage per application.
23
+ */
24
+ httpReferer?: string | undefined;
25
+ /**
26
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
27
+ *
28
+ * @remarks
29
+ */
30
+ xTitle?: string | undefined;
31
+ };
32
+ /** @internal */
33
+ export type ListEmbeddingsModelsRequest$Outbound = {
34
+ "HTTP-Referer"?: string | undefined;
35
+ "X-Title"?: string | undefined;
36
+ };
37
+ /** @internal */
38
+ export declare const ListEmbeddingsModelsRequest$outboundSchema: z.ZodType<ListEmbeddingsModelsRequest$Outbound, ListEmbeddingsModelsRequest>;
39
+ export declare function listEmbeddingsModelsRequestToJSON(listEmbeddingsModelsRequest: ListEmbeddingsModelsRequest): string;
40
+ //# sourceMappingURL=listembeddingsmodels.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 52a7fdf31054
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ /** @internal */
8
+ export const ListEmbeddingsModelsRequest$outboundSchema = z.object({
9
+ httpReferer: z.string().optional(),
10
+ xTitle: z.string().optional(),
11
+ }).transform((v) => {
12
+ return remap$(v, {
13
+ httpReferer: "HTTP-Referer",
14
+ xTitle: "X-Title",
15
+ });
16
+ });
17
+ export function listEmbeddingsModelsRequestToJSON(listEmbeddingsModelsRequest) {
18
+ return JSON.stringify(ListEmbeddingsModelsRequest$outboundSchema.parse(listEmbeddingsModelsRequest));
19
+ }
20
+ //# sourceMappingURL=listembeddingsmodels.js.map
@@ -2,7 +2,35 @@ import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
4
  import * as models from "../index.js";
5
+ export type ListEndpointsGlobals = {
6
+ /**
7
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
8
+ *
9
+ * @remarks
10
+ * This is used to track API usage per application.
11
+ */
12
+ httpReferer?: string | undefined;
13
+ /**
14
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
15
+ *
16
+ * @remarks
17
+ */
18
+ xTitle?: string | undefined;
19
+ };
5
20
  export type ListEndpointsRequest = {
21
+ /**
22
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
23
+ *
24
+ * @remarks
25
+ * This is used to track API usage per application.
26
+ */
27
+ httpReferer?: string | undefined;
28
+ /**
29
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
30
+ *
31
+ * @remarks
32
+ */
33
+ xTitle?: string | undefined;
6
34
  author: string;
7
35
  slug: string;
8
36
  };
@@ -17,6 +45,8 @@ export type ListEndpointsResponse = {
17
45
  };
18
46
  /** @internal */
19
47
  export type ListEndpointsRequest$Outbound = {
48
+ "HTTP-Referer"?: string | undefined;
49
+ "X-Title"?: string | undefined;
20
50
  author: string;
21
51
  slug: string;
22
52
  };
@@ -3,12 +3,20 @@
3
3
  * @generated-id: 253a81bc10af
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import { safeParse } from "../../lib/schemas.js";
7
8
  import * as models from "../index.js";
8
9
  /** @internal */
9
10
  export const ListEndpointsRequest$outboundSchema = z.object({
11
+ httpReferer: z.string().optional(),
12
+ xTitle: z.string().optional(),
10
13
  author: z.string(),
11
14
  slug: z.string(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ httpReferer: "HTTP-Referer",
18
+ xTitle: "X-Title",
19
+ });
12
20
  });
13
21
  export function listEndpointsRequestToJSON(listEndpointsRequest) {
14
22
  return JSON.stringify(ListEndpointsRequest$outboundSchema.parse(listEndpointsRequest));
@@ -2,6 +2,36 @@ import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
4
  import * as models from "../index.js";
5
+ export type ListEndpointsZdrGlobals = {
6
+ /**
7
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
8
+ *
9
+ * @remarks
10
+ * This is used to track API usage per application.
11
+ */
12
+ httpReferer?: string | undefined;
13
+ /**
14
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
15
+ *
16
+ * @remarks
17
+ */
18
+ xTitle?: string | undefined;
19
+ };
20
+ export type ListEndpointsZdrRequest = {
21
+ /**
22
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
23
+ *
24
+ * @remarks
25
+ * This is used to track API usage per application.
26
+ */
27
+ httpReferer?: string | undefined;
28
+ /**
29
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
30
+ *
31
+ * @remarks
32
+ */
33
+ xTitle?: string | undefined;
34
+ };
5
35
  /**
6
36
  * Returns a list of endpoints
7
37
  */
@@ -9,6 +39,14 @@ export type ListEndpointsZdrResponse = {
9
39
  data: Array<models.PublicEndpoint>;
10
40
  };
11
41
  /** @internal */
42
+ export type ListEndpointsZdrRequest$Outbound = {
43
+ "HTTP-Referer"?: string | undefined;
44
+ "X-Title"?: string | undefined;
45
+ };
46
+ /** @internal */
47
+ export declare const ListEndpointsZdrRequest$outboundSchema: z.ZodType<ListEndpointsZdrRequest$Outbound, ListEndpointsZdrRequest>;
48
+ export declare function listEndpointsZdrRequestToJSON(listEndpointsZdrRequest: ListEndpointsZdrRequest): string;
49
+ /** @internal */
12
50
  export declare const ListEndpointsZdrResponse$inboundSchema: z.ZodType<ListEndpointsZdrResponse, unknown>;
13
51
  export declare function listEndpointsZdrResponseFromJSON(jsonString: string): SafeParseResult<ListEndpointsZdrResponse, SDKValidationError>;
14
52
  //# sourceMappingURL=listendpointszdr.d.ts.map
@@ -3,9 +3,23 @@
3
3
  * @generated-id: d52e6aeefb5e
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import { safeParse } from "../../lib/schemas.js";
7
8
  import * as models from "../index.js";
8
9
  /** @internal */
10
+ export const ListEndpointsZdrRequest$outboundSchema = z.object({
11
+ httpReferer: z.string().optional(),
12
+ xTitle: z.string().optional(),
13
+ }).transform((v) => {
14
+ return remap$(v, {
15
+ httpReferer: "HTTP-Referer",
16
+ xTitle: "X-Title",
17
+ });
18
+ });
19
+ export function listEndpointsZdrRequestToJSON(listEndpointsZdrRequest) {
20
+ return JSON.stringify(ListEndpointsZdrRequest$outboundSchema.parse(listEndpointsZdrRequest));
21
+ }
22
+ /** @internal */
9
23
  export const ListEndpointsZdrResponse$inboundSchema = z.object({
10
24
  data: z.array(models.PublicEndpoint$inboundSchema),
11
25
  });
@@ -1,7 +1,35 @@
1
1
  import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ export type ListGuardrailKeyAssignmentsGlobals = {
5
+ /**
6
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
7
+ *
8
+ * @remarks
9
+ * This is used to track API usage per application.
10
+ */
11
+ httpReferer?: string | undefined;
12
+ /**
13
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
14
+ *
15
+ * @remarks
16
+ */
17
+ xTitle?: string | undefined;
18
+ };
4
19
  export type ListGuardrailKeyAssignmentsRequest = {
20
+ /**
21
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
22
+ *
23
+ * @remarks
24
+ * This is used to track API usage per application.
25
+ */
26
+ httpReferer?: string | undefined;
27
+ /**
28
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
29
+ *
30
+ * @remarks
31
+ */
32
+ xTitle?: string | undefined;
5
33
  /**
6
34
  * The unique identifier of the guardrail
7
35
  */
@@ -60,6 +88,8 @@ export type ListGuardrailKeyAssignmentsResponse = {
60
88
  };
61
89
  /** @internal */
62
90
  export type ListGuardrailKeyAssignmentsRequest$Outbound = {
91
+ "HTTP-Referer"?: string | undefined;
92
+ "X-Title"?: string | undefined;
63
93
  id: string;
64
94
  offset?: string | undefined;
65
95
  limit?: string | undefined;
@@ -7,9 +7,16 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  /** @internal */
9
9
  export const ListGuardrailKeyAssignmentsRequest$outboundSchema = z.object({
10
+ httpReferer: z.string().optional(),
11
+ xTitle: z.string().optional(),
10
12
  id: z.string(),
11
13
  offset: z.string().optional(),
12
14
  limit: z.string().optional(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ httpReferer: "HTTP-Referer",
18
+ xTitle: "X-Title",
19
+ });
13
20
  });
14
21
  export function listGuardrailKeyAssignmentsRequestToJSON(listGuardrailKeyAssignmentsRequest) {
15
22
  return JSON.stringify(ListGuardrailKeyAssignmentsRequest$outboundSchema.parse(listGuardrailKeyAssignmentsRequest));
@@ -1,7 +1,35 @@
1
1
  import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ export type ListGuardrailMemberAssignmentsGlobals = {
5
+ /**
6
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
7
+ *
8
+ * @remarks
9
+ * This is used to track API usage per application.
10
+ */
11
+ httpReferer?: string | undefined;
12
+ /**
13
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
14
+ *
15
+ * @remarks
16
+ */
17
+ xTitle?: string | undefined;
18
+ };
4
19
  export type ListGuardrailMemberAssignmentsRequest = {
20
+ /**
21
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
22
+ *
23
+ * @remarks
24
+ * This is used to track API usage per application.
25
+ */
26
+ httpReferer?: string | undefined;
27
+ /**
28
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
29
+ *
30
+ * @remarks
31
+ */
32
+ xTitle?: string | undefined;
5
33
  /**
6
34
  * The unique identifier of the guardrail
7
35
  */
@@ -56,6 +84,8 @@ export type ListGuardrailMemberAssignmentsResponse = {
56
84
  };
57
85
  /** @internal */
58
86
  export type ListGuardrailMemberAssignmentsRequest$Outbound = {
87
+ "HTTP-Referer"?: string | undefined;
88
+ "X-Title"?: string | undefined;
59
89
  id: string;
60
90
  offset?: string | undefined;
61
91
  limit?: string | undefined;
@@ -7,9 +7,16 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  /** @internal */
9
9
  export const ListGuardrailMemberAssignmentsRequest$outboundSchema = z.object({
10
+ httpReferer: z.string().optional(),
11
+ xTitle: z.string().optional(),
10
12
  id: z.string(),
11
13
  offset: z.string().optional(),
12
14
  limit: z.string().optional(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ httpReferer: "HTTP-Referer",
18
+ xTitle: "X-Title",
19
+ });
13
20
  });
14
21
  export function listGuardrailMemberAssignmentsRequestToJSON(listGuardrailMemberAssignmentsRequest) {
15
22
  return JSON.stringify(ListGuardrailMemberAssignmentsRequest$outboundSchema.parse(listGuardrailMemberAssignmentsRequest));
@@ -2,7 +2,35 @@ import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../../types/fp.js";
4
4
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
+ export type ListGuardrailsGlobals = {
6
+ /**
7
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
8
+ *
9
+ * @remarks
10
+ * This is used to track API usage per application.
11
+ */
12
+ httpReferer?: string | undefined;
13
+ /**
14
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
15
+ *
16
+ * @remarks
17
+ */
18
+ xTitle?: string | undefined;
19
+ };
5
20
  export type ListGuardrailsRequest = {
21
+ /**
22
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
23
+ *
24
+ * @remarks
25
+ * This is used to track API usage per application.
26
+ */
27
+ httpReferer?: string | undefined;
28
+ /**
29
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
30
+ *
31
+ * @remarks
32
+ */
33
+ xTitle?: string | undefined;
6
34
  /**
7
35
  * Number of records to skip for pagination
8
36
  */
@@ -81,6 +109,8 @@ export type ListGuardrailsResponse = {
81
109
  };
82
110
  /** @internal */
83
111
  export type ListGuardrailsRequest$Outbound = {
112
+ "HTTP-Referer"?: string | undefined;
113
+ "X-Title"?: string | undefined;
84
114
  offset?: string | undefined;
85
115
  limit?: string | undefined;
86
116
  };
@@ -16,8 +16,15 @@ export const ListGuardrailsResetInterval = {
16
16
  };
17
17
  /** @internal */
18
18
  export const ListGuardrailsRequest$outboundSchema = z.object({
19
+ httpReferer: z.string().optional(),
20
+ xTitle: z.string().optional(),
19
21
  offset: z.string().optional(),
20
22
  limit: z.string().optional(),
23
+ }).transform((v) => {
24
+ return remap$(v, {
25
+ httpReferer: "HTTP-Referer",
26
+ xTitle: "X-Title",
27
+ });
21
28
  });
22
29
  export function listGuardrailsRequestToJSON(listGuardrailsRequest) {
23
30
  return JSON.stringify(ListGuardrailsRequest$outboundSchema.parse(listGuardrailsRequest));
@@ -1,7 +1,35 @@
1
1
  import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ export type ListKeyAssignmentsGlobals = {
5
+ /**
6
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
7
+ *
8
+ * @remarks
9
+ * This is used to track API usage per application.
10
+ */
11
+ httpReferer?: string | undefined;
12
+ /**
13
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
14
+ *
15
+ * @remarks
16
+ */
17
+ xTitle?: string | undefined;
18
+ };
4
19
  export type ListKeyAssignmentsRequest = {
20
+ /**
21
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
22
+ *
23
+ * @remarks
24
+ * This is used to track API usage per application.
25
+ */
26
+ httpReferer?: string | undefined;
27
+ /**
28
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
29
+ *
30
+ * @remarks
31
+ */
32
+ xTitle?: string | undefined;
5
33
  /**
6
34
  * Number of records to skip for pagination
7
35
  */
@@ -56,6 +84,8 @@ export type ListKeyAssignmentsResponse = {
56
84
  };
57
85
  /** @internal */
58
86
  export type ListKeyAssignmentsRequest$Outbound = {
87
+ "HTTP-Referer"?: string | undefined;
88
+ "X-Title"?: string | undefined;
59
89
  offset?: string | undefined;
60
90
  limit?: string | undefined;
61
91
  };
@@ -7,8 +7,15 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  /** @internal */
9
9
  export const ListKeyAssignmentsRequest$outboundSchema = z.object({
10
+ httpReferer: z.string().optional(),
11
+ xTitle: z.string().optional(),
10
12
  offset: z.string().optional(),
11
13
  limit: z.string().optional(),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ httpReferer: "HTTP-Referer",
17
+ xTitle: "X-Title",
18
+ });
12
19
  });
13
20
  export function listKeyAssignmentsRequestToJSON(listKeyAssignmentsRequest) {
14
21
  return JSON.stringify(ListKeyAssignmentsRequest$outboundSchema.parse(listKeyAssignmentsRequest));
@@ -1,7 +1,35 @@
1
1
  import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ export type ListMemberAssignmentsGlobals = {
5
+ /**
6
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
7
+ *
8
+ * @remarks
9
+ * This is used to track API usage per application.
10
+ */
11
+ httpReferer?: string | undefined;
12
+ /**
13
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
14
+ *
15
+ * @remarks
16
+ */
17
+ xTitle?: string | undefined;
18
+ };
4
19
  export type ListMemberAssignmentsRequest = {
20
+ /**
21
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
22
+ *
23
+ * @remarks
24
+ * This is used to track API usage per application.
25
+ */
26
+ httpReferer?: string | undefined;
27
+ /**
28
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
29
+ *
30
+ * @remarks
31
+ */
32
+ xTitle?: string | undefined;
5
33
  /**
6
34
  * Number of records to skip for pagination
7
35
  */
@@ -52,6 +80,8 @@ export type ListMemberAssignmentsResponse = {
52
80
  };
53
81
  /** @internal */
54
82
  export type ListMemberAssignmentsRequest$Outbound = {
83
+ "HTTP-Referer"?: string | undefined;
84
+ "X-Title"?: string | undefined;
55
85
  offset?: string | undefined;
56
86
  limit?: string | undefined;
57
87
  };
@@ -7,8 +7,15 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  /** @internal */
9
9
  export const ListMemberAssignmentsRequest$outboundSchema = z.object({
10
+ httpReferer: z.string().optional(),
11
+ xTitle: z.string().optional(),
10
12
  offset: z.string().optional(),
11
13
  limit: z.string().optional(),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ httpReferer: "HTTP-Referer",
17
+ xTitle: "X-Title",
18
+ });
12
19
  });
13
20
  export function listMemberAssignmentsRequestToJSON(listMemberAssignmentsRequest) {
14
21
  return JSON.stringify(ListMemberAssignmentsRequest$outboundSchema.parse(listMemberAssignmentsRequest));
@@ -0,0 +1,40 @@
1
+ import * as z from "zod/v4";
2
+ export type ListModelsCountGlobals = {
3
+ /**
4
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
+ *
6
+ * @remarks
7
+ * This is used to track API usage per application.
8
+ */
9
+ httpReferer?: string | undefined;
10
+ /**
11
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
+ *
13
+ * @remarks
14
+ */
15
+ xTitle?: string | undefined;
16
+ };
17
+ export type ListModelsCountRequest = {
18
+ /**
19
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
20
+ *
21
+ * @remarks
22
+ * This is used to track API usage per application.
23
+ */
24
+ httpReferer?: string | undefined;
25
+ /**
26
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
27
+ *
28
+ * @remarks
29
+ */
30
+ xTitle?: string | undefined;
31
+ };
32
+ /** @internal */
33
+ export type ListModelsCountRequest$Outbound = {
34
+ "HTTP-Referer"?: string | undefined;
35
+ "X-Title"?: string | undefined;
36
+ };
37
+ /** @internal */
38
+ export declare const ListModelsCountRequest$outboundSchema: z.ZodType<ListModelsCountRequest$Outbound, ListModelsCountRequest>;
39
+ export declare function listModelsCountRequestToJSON(listModelsCountRequest: ListModelsCountRequest): string;
40
+ //# sourceMappingURL=listmodelscount.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 8def1e8eb7b5
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ /** @internal */
8
+ export const ListModelsCountRequest$outboundSchema = z.object({
9
+ httpReferer: z.string().optional(),
10
+ xTitle: z.string().optional(),
11
+ }).transform((v) => {
12
+ return remap$(v, {
13
+ httpReferer: "HTTP-Referer",
14
+ xTitle: "X-Title",
15
+ });
16
+ });
17
+ export function listModelsCountRequestToJSON(listModelsCountRequest) {
18
+ return JSON.stringify(ListModelsCountRequest$outboundSchema.parse(listModelsCountRequest));
19
+ }
20
+ //# sourceMappingURL=listmodelscount.js.map
@@ -1,7 +1,37 @@
1
1
  import * as z from "zod/v4";
2
+ export type ListModelsUserGlobals = {
3
+ /**
4
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
+ *
6
+ * @remarks
7
+ * This is used to track API usage per application.
8
+ */
9
+ httpReferer?: string | undefined;
10
+ /**
11
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
+ *
13
+ * @remarks
14
+ */
15
+ xTitle?: string | undefined;
16
+ };
2
17
  export type ListModelsUserSecurity = {
3
18
  bearer: string;
4
19
  };
20
+ export type ListModelsUserRequest = {
21
+ /**
22
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
23
+ *
24
+ * @remarks
25
+ * This is used to track API usage per application.
26
+ */
27
+ httpReferer?: string | undefined;
28
+ /**
29
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
30
+ *
31
+ * @remarks
32
+ */
33
+ xTitle?: string | undefined;
34
+ };
5
35
  /** @internal */
6
36
  export type ListModelsUserSecurity$Outbound = {
7
37
  bearer: string;
@@ -9,4 +39,12 @@ export type ListModelsUserSecurity$Outbound = {
9
39
  /** @internal */
10
40
  export declare const ListModelsUserSecurity$outboundSchema: z.ZodType<ListModelsUserSecurity$Outbound, ListModelsUserSecurity>;
11
41
  export declare function listModelsUserSecurityToJSON(listModelsUserSecurity: ListModelsUserSecurity): string;
42
+ /** @internal */
43
+ export type ListModelsUserRequest$Outbound = {
44
+ "HTTP-Referer"?: string | undefined;
45
+ "X-Title"?: string | undefined;
46
+ };
47
+ /** @internal */
48
+ export declare const ListModelsUserRequest$outboundSchema: z.ZodType<ListModelsUserRequest$Outbound, ListModelsUserRequest>;
49
+ export declare function listModelsUserRequestToJSON(listModelsUserRequest: ListModelsUserRequest): string;
12
50
  //# sourceMappingURL=listmodelsuser.d.ts.map
@@ -3,6 +3,7 @@
3
3
  * @generated-id: 0846aac6be02
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  /** @internal */
7
8
  export const ListModelsUserSecurity$outboundSchema = z.object({
8
9
  bearer: z.string(),
@@ -10,4 +11,17 @@ export const ListModelsUserSecurity$outboundSchema = z.object({
10
11
  export function listModelsUserSecurityToJSON(listModelsUserSecurity) {
11
12
  return JSON.stringify(ListModelsUserSecurity$outboundSchema.parse(listModelsUserSecurity));
12
13
  }
14
+ /** @internal */
15
+ export const ListModelsUserRequest$outboundSchema = z.object({
16
+ httpReferer: z.string().optional(),
17
+ xTitle: z.string().optional(),
18
+ }).transform((v) => {
19
+ return remap$(v, {
20
+ httpReferer: "HTTP-Referer",
21
+ xTitle: "X-Title",
22
+ });
23
+ });
24
+ export function listModelsUserRequestToJSON(listModelsUserRequest) {
25
+ return JSON.stringify(ListModelsUserRequest$outboundSchema.parse(listModelsUserRequest));
26
+ }
13
27
  //# sourceMappingURL=listmodelsuser.js.map