mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88bc51d136 | ||
|
|
0c791b04d1 | ||
|
|
5f2c0ee2ea | ||
|
|
5832c0495b | ||
|
|
f5dfc30997 | ||
|
|
a56ffbf5f3 | ||
|
|
cc2b002c5c | ||
|
|
9774c726fd |
+276
-53
@@ -1,12 +1,12 @@
|
||||
lockVersion: 2.0.0
|
||||
id: cfd52247-6a25-4c6d-bbce-fe6fce0cd69d
|
||||
management:
|
||||
docChecksum: 331e8a1f7c97c6a4a6b57eaddc80fc39
|
||||
docChecksum: 342e7e8ea9cb2b7ff1c1860e18d58822
|
||||
docVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
generationVersion: 2.768.0
|
||||
releaseVersion: 0.0.18
|
||||
configChecksum: 1f58284fadb5b2b9029e9ef747f2a7e9
|
||||
releaseVersion: 0.2.0
|
||||
configChecksum: 65a367d36e219e834a1176c8ec421a0a
|
||||
repoURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
installationURL: https://github.com/OpenRouterTeam/python-sdk.git
|
||||
published: true
|
||||
@@ -53,6 +53,7 @@ generatedFiles:
|
||||
- docs/components/architecture.md
|
||||
- docs/components/assistantmessage.md
|
||||
- docs/components/assistantmessagecontent.md
|
||||
- docs/components/assistantmessageimageurl.md
|
||||
- docs/components/badgatewayresponseerrordata.md
|
||||
- docs/components/badrequestresponseerrordata.md
|
||||
- docs/components/chainid.md
|
||||
@@ -73,11 +74,6 @@ generatedFiles:
|
||||
- docs/components/chatgenerationparamspreferredminthroughput.md
|
||||
- docs/components/chatgenerationparamspreferredminthroughputunion.md
|
||||
- docs/components/chatgenerationparamsprovider.md
|
||||
- docs/components/chatgenerationparamsresponseformatjsonobject.md
|
||||
- docs/components/chatgenerationparamsresponseformatpython.md
|
||||
- docs/components/chatgenerationparamsresponseformattext.md
|
||||
- docs/components/chatgenerationparamsresponseformatunion.md
|
||||
- docs/components/chatgenerationparamsstop.md
|
||||
- docs/components/chatgenerationtokenusage.md
|
||||
- docs/components/chatmessagecontentitem.md
|
||||
- docs/components/chatmessagecontentitemaudio.md
|
||||
@@ -85,6 +81,7 @@ generatedFiles:
|
||||
- docs/components/chatmessagecontentitemcachecontrol.md
|
||||
- docs/components/chatmessagecontentitemimage.md
|
||||
- docs/components/chatmessagecontentitemimagedetail.md
|
||||
- docs/components/chatmessagecontentitemimageimageurl.md
|
||||
- docs/components/chatmessagecontentitemtext.md
|
||||
- docs/components/chatmessagecontentitemvideo.md
|
||||
- docs/components/chatmessagecontentitemvideoinputvideo.md
|
||||
@@ -107,18 +104,7 @@ generatedFiles:
|
||||
- docs/components/chatstreamoptions.md
|
||||
- docs/components/code.md
|
||||
- docs/components/codeenum.md
|
||||
- docs/components/completionchoice.md
|
||||
- docs/components/completioncreateparams.md
|
||||
- docs/components/completioncreateparamsresponseformatjsonobject.md
|
||||
- docs/components/completioncreateparamsresponseformatpython.md
|
||||
- docs/components/completioncreateparamsresponseformattext.md
|
||||
- docs/components/completioncreateparamsresponseformatunion.md
|
||||
- docs/components/completioncreateparamsstop.md
|
||||
- docs/components/completionfinishreason.md
|
||||
- docs/components/completionlogprobs.md
|
||||
- docs/components/completionresponse.md
|
||||
- docs/components/completiontokensdetails.md
|
||||
- docs/components/completionusage.md
|
||||
- docs/components/costdetails.md
|
||||
- docs/components/createchargerequest.md
|
||||
- docs/components/datacollection.md
|
||||
@@ -138,8 +124,8 @@ generatedFiles:
|
||||
- docs/components/idmoderation.md
|
||||
- docs/components/idresponsehealing.md
|
||||
- docs/components/idweb.md
|
||||
- docs/components/image.md
|
||||
- docs/components/imagegenerationstatus.md
|
||||
- docs/components/imageurl.md
|
||||
- docs/components/inputmodality.md
|
||||
- docs/components/inputtokensdetails.md
|
||||
- docs/components/instructtype.md
|
||||
@@ -343,7 +329,6 @@ generatedFiles:
|
||||
- docs/components/preferredmaxlatency.md
|
||||
- docs/components/preferredminthroughput.md
|
||||
- docs/components/pricing.md
|
||||
- docs/components/prompt.md
|
||||
- docs/components/prompttokensdetails.md
|
||||
- docs/components/providername.md
|
||||
- docs/components/provideroverloadedresponseerrordata.md
|
||||
@@ -374,7 +359,11 @@ generatedFiles:
|
||||
- docs/components/reasoningtextcontent.md
|
||||
- docs/components/reasoningtextcontenttype.md
|
||||
- docs/components/requesttimeoutresponseerrordata.md
|
||||
- docs/components/responseformat.md
|
||||
- docs/components/responseformatjsonobject.md
|
||||
- docs/components/responseformatjsonschema.md
|
||||
- docs/components/responseformatpython.md
|
||||
- docs/components/responseformattext.md
|
||||
- docs/components/responseformattextconfig.md
|
||||
- docs/components/responseformattextgrammar.md
|
||||
- docs/components/responseinputaudio.md
|
||||
@@ -437,16 +426,16 @@ generatedFiles:
|
||||
- docs/components/route.md
|
||||
- docs/components/schema0.md
|
||||
- docs/components/schema0enum.md
|
||||
- docs/components/schema3.md
|
||||
- docs/components/schema3reasoningencrypted.md
|
||||
- docs/components/schema3reasoningsummary.md
|
||||
- docs/components/schema3reasoningtext.md
|
||||
- docs/components/schema5.md
|
||||
- docs/components/schema2.md
|
||||
- docs/components/schema2reasoningencrypted.md
|
||||
- docs/components/schema2reasoningsummary.md
|
||||
- docs/components/schema2reasoningtext.md
|
||||
- docs/components/schema4.md
|
||||
- docs/components/security.md
|
||||
- docs/components/servicetier.md
|
||||
- docs/components/serviceunavailableresponseerrordata.md
|
||||
- docs/components/sortenum.md
|
||||
- docs/components/streamoptions.md
|
||||
- docs/components/stop.md
|
||||
- docs/components/systemmessage.md
|
||||
- docs/components/systemmessagecontent.md
|
||||
- docs/components/tokenizer.md
|
||||
@@ -508,7 +497,20 @@ generatedFiles:
|
||||
- docs/models/internal/globals.md
|
||||
- docs/models/utils/retryconfig.md
|
||||
- docs/operations/apitype.md
|
||||
- docs/operations/bulkassignkeystoguardrailrequest.md
|
||||
- docs/operations/bulkassignkeystoguardrailrequestbody.md
|
||||
- docs/operations/bulkassignkeystoguardrailresponse.md
|
||||
- docs/operations/bulkassignmemberstoguardrailrequest.md
|
||||
- docs/operations/bulkassignmemberstoguardrailrequestbody.md
|
||||
- docs/operations/bulkassignmemberstoguardrailresponse.md
|
||||
- docs/operations/bulkunassignkeysfromguardrailrequest.md
|
||||
- docs/operations/bulkunassignkeysfromguardrailrequestbody.md
|
||||
- docs/operations/bulkunassignkeysfromguardrailresponse.md
|
||||
- docs/operations/bulkunassignmembersfromguardrailrequest.md
|
||||
- docs/operations/bulkunassignmembersfromguardrailrequestbody.md
|
||||
- docs/operations/bulkunassignmembersfromguardrailresponse.md
|
||||
- docs/operations/calldata.md
|
||||
- docs/operations/category.md
|
||||
- docs/operations/content.md
|
||||
- docs/operations/contentimageurl.md
|
||||
- docs/operations/contenttext.md
|
||||
@@ -523,12 +525,19 @@ generatedFiles:
|
||||
- docs/operations/createembeddingsrequest.md
|
||||
- docs/operations/createembeddingsresponse.md
|
||||
- docs/operations/createembeddingsresponsebody.md
|
||||
- docs/operations/createguardraildata.md
|
||||
- docs/operations/createguardrailrequest.md
|
||||
- docs/operations/createguardrailresetintervalrequest.md
|
||||
- docs/operations/createguardrailresetintervalresponse.md
|
||||
- docs/operations/createguardrailresponse.md
|
||||
- docs/operations/createkeysdata.md
|
||||
- docs/operations/createkeyslimitreset.md
|
||||
- docs/operations/createkeysrequest.md
|
||||
- docs/operations/createkeysresponse.md
|
||||
- docs/operations/createresponsesresponse.md
|
||||
- docs/operations/createresponsesresponsebody.md
|
||||
- docs/operations/deleteguardrailrequest.md
|
||||
- docs/operations/deleteguardrailresponse.md
|
||||
- docs/operations/deletekeysrequest.md
|
||||
- docs/operations/deletekeysresponse.md
|
||||
- docs/operations/embedding.md
|
||||
@@ -543,14 +552,14 @@ generatedFiles:
|
||||
- docs/operations/getgenerationdata.md
|
||||
- docs/operations/getgenerationrequest.md
|
||||
- docs/operations/getgenerationresponse.md
|
||||
- docs/operations/getguardraildata.md
|
||||
- docs/operations/getguardrailrequest.md
|
||||
- docs/operations/getguardrailresetinterval.md
|
||||
- docs/operations/getguardrailresponse.md
|
||||
- docs/operations/getkeydata.md
|
||||
- docs/operations/getkeyrequest.md
|
||||
- docs/operations/getkeyresponse.md
|
||||
- docs/operations/getmodelsrequest.md
|
||||
- docs/operations/getparametersdata.md
|
||||
- docs/operations/getparametersrequest.md
|
||||
- docs/operations/getparametersresponse.md
|
||||
- docs/operations/getparameterssecurity.md
|
||||
- docs/operations/getuseractivityrequest.md
|
||||
- docs/operations/getuseractivityresponse.md
|
||||
- docs/operations/imageurl.md
|
||||
@@ -560,6 +569,22 @@ generatedFiles:
|
||||
- docs/operations/listendpointsrequest.md
|
||||
- docs/operations/listendpointsresponse.md
|
||||
- docs/operations/listendpointszdrresponse.md
|
||||
- docs/operations/listguardrailkeyassignmentsdata.md
|
||||
- docs/operations/listguardrailkeyassignmentsrequest.md
|
||||
- docs/operations/listguardrailkeyassignmentsresponse.md
|
||||
- docs/operations/listguardrailmemberassignmentsdata.md
|
||||
- docs/operations/listguardrailmemberassignmentsrequest.md
|
||||
- docs/operations/listguardrailmemberassignmentsresponse.md
|
||||
- docs/operations/listguardrailsdata.md
|
||||
- docs/operations/listguardrailsrequest.md
|
||||
- docs/operations/listguardrailsresetinterval.md
|
||||
- docs/operations/listguardrailsresponse.md
|
||||
- docs/operations/listkeyassignmentsdata.md
|
||||
- docs/operations/listkeyassignmentsrequest.md
|
||||
- docs/operations/listkeyassignmentsresponse.md
|
||||
- docs/operations/listmemberassignmentsdata.md
|
||||
- docs/operations/listmemberassignmentsrequest.md
|
||||
- docs/operations/listmemberassignmentsresponse.md
|
||||
- docs/operations/listmodelsusersecurity.md
|
||||
- docs/operations/listprovidersdata.md
|
||||
- docs/operations/listprovidersresponse.md
|
||||
@@ -570,10 +595,15 @@ generatedFiles:
|
||||
- docs/operations/objectembedding.md
|
||||
- docs/operations/ratelimit.md
|
||||
- docs/operations/sendchatcompletionrequestresponse.md
|
||||
- docs/operations/supportedparameter.md
|
||||
- docs/operations/transferintent.md
|
||||
- docs/operations/typeimageurl.md
|
||||
- docs/operations/typetext.md
|
||||
- docs/operations/updateguardraildata.md
|
||||
- docs/operations/updateguardrailrequest.md
|
||||
- docs/operations/updateguardrailrequestbody.md
|
||||
- docs/operations/updateguardrailresetintervalrequest.md
|
||||
- docs/operations/updateguardrailresetintervalresponse.md
|
||||
- docs/operations/updateguardrailresponse.md
|
||||
- docs/operations/updatekeysdata.md
|
||||
- docs/operations/updatekeyslimitreset.md
|
||||
- docs/operations/updatekeysrequest.md
|
||||
@@ -584,14 +614,13 @@ generatedFiles:
|
||||
- docs/sdks/analytics/README.md
|
||||
- docs/sdks/apikeys/README.md
|
||||
- docs/sdks/chat/README.md
|
||||
- docs/sdks/completions/README.md
|
||||
- docs/sdks/credits/README.md
|
||||
- docs/sdks/embeddings/README.md
|
||||
- docs/sdks/endpoints/README.md
|
||||
- docs/sdks/generations/README.md
|
||||
- docs/sdks/guardrails/README.md
|
||||
- docs/sdks/models/README.md
|
||||
- docs/sdks/oauth/README.md
|
||||
- docs/sdks/parameters/README.md
|
||||
- docs/sdks/providers/README.md
|
||||
- docs/sdks/responses/README.md
|
||||
- py.typed
|
||||
@@ -608,10 +637,9 @@ generatedFiles:
|
||||
- src/openrouter/basesdk.py
|
||||
- src/openrouter/beta.py
|
||||
- src/openrouter/chat.py
|
||||
- src/openrouter/completions.py
|
||||
- src/openrouter/components/__init__.py
|
||||
- src/openrouter/components/_schema0.py
|
||||
- src/openrouter/components/_schema3.py
|
||||
- src/openrouter/components/_schema2.py
|
||||
- src/openrouter/components/activityitem.py
|
||||
- src/openrouter/components/assistantmessage.py
|
||||
- src/openrouter/components/badgatewayresponseerrordata.py
|
||||
@@ -636,11 +664,6 @@ generatedFiles:
|
||||
- src/openrouter/components/chatstreamingmessagetoolcall.py
|
||||
- src/openrouter/components/chatstreamingresponsechunk.py
|
||||
- src/openrouter/components/chatstreamoptions.py
|
||||
- src/openrouter/components/completionchoice.py
|
||||
- src/openrouter/components/completioncreateparams.py
|
||||
- src/openrouter/components/completionlogprobs.py
|
||||
- src/openrouter/components/completionresponse.py
|
||||
- src/openrouter/components/completionusage.py
|
||||
- src/openrouter/components/createchargerequest.py
|
||||
- src/openrouter/components/datacollection.py
|
||||
- src/openrouter/components/defaultparameters.py
|
||||
@@ -793,6 +816,7 @@ generatedFiles:
|
||||
- src/openrouter/errors/unauthorizedresponse_error.py
|
||||
- src/openrouter/errors/unprocessableentityresponse_error.py
|
||||
- src/openrouter/generations.py
|
||||
- src/openrouter/guardrails.py
|
||||
- src/openrouter/httpclient.py
|
||||
- src/openrouter/models/__init__.py
|
||||
- src/openrouter/models/internal/__init__.py
|
||||
@@ -800,28 +824,39 @@ generatedFiles:
|
||||
- src/openrouter/models_.py
|
||||
- src/openrouter/oauth.py
|
||||
- src/openrouter/operations/__init__.py
|
||||
- src/openrouter/operations/bulkassignkeystoguardrail.py
|
||||
- src/openrouter/operations/bulkassignmemberstoguardrail.py
|
||||
- src/openrouter/operations/bulkunassignkeysfromguardrail.py
|
||||
- src/openrouter/operations/bulkunassignmembersfromguardrail.py
|
||||
- src/openrouter/operations/createauthkeyscode.py
|
||||
- src/openrouter/operations/createcoinbasecharge.py
|
||||
- src/openrouter/operations/createembeddings.py
|
||||
- src/openrouter/operations/createguardrail.py
|
||||
- src/openrouter/operations/createkeys.py
|
||||
- src/openrouter/operations/createresponses.py
|
||||
- src/openrouter/operations/deleteguardrail.py
|
||||
- src/openrouter/operations/deletekeys.py
|
||||
- src/openrouter/operations/exchangeauthcodeforapikey.py
|
||||
- src/openrouter/operations/getcredits.py
|
||||
- src/openrouter/operations/getcurrentkey.py
|
||||
- src/openrouter/operations/getgeneration.py
|
||||
- src/openrouter/operations/getguardrail.py
|
||||
- src/openrouter/operations/getkey.py
|
||||
- src/openrouter/operations/getmodels.py
|
||||
- src/openrouter/operations/getparameters.py
|
||||
- src/openrouter/operations/getuseractivity.py
|
||||
- src/openrouter/operations/list.py
|
||||
- src/openrouter/operations/listendpoints.py
|
||||
- src/openrouter/operations/listendpointszdr.py
|
||||
- src/openrouter/operations/listguardrailkeyassignments.py
|
||||
- src/openrouter/operations/listguardrailmemberassignments.py
|
||||
- src/openrouter/operations/listguardrails.py
|
||||
- src/openrouter/operations/listkeyassignments.py
|
||||
- src/openrouter/operations/listmemberassignments.py
|
||||
- src/openrouter/operations/listmodelsuser.py
|
||||
- src/openrouter/operations/listproviders.py
|
||||
- src/openrouter/operations/sendchatcompletionrequest.py
|
||||
- src/openrouter/operations/updateguardrail.py
|
||||
- src/openrouter/operations/updatekeys.py
|
||||
- src/openrouter/parameters.py
|
||||
- src/openrouter/providers.py
|
||||
- src/openrouter/py.typed
|
||||
- src/openrouter/responses.py
|
||||
@@ -1008,6 +1043,8 @@ examples:
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
listEndpoints:
|
||||
speakeasy-default-list-endpoints:
|
||||
parameters:
|
||||
@@ -1016,7 +1053,7 @@ examples:
|
||||
slug: "<value>"
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}}]}}
|
||||
application/json: {"data": {"id": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.", "architecture": {"tokenizer": "GPT", "instruct_type": "chatml", "modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "endpoints": [{"name": "OpenAI: GPT-4", "model_id": "openai/gpt-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 0.25, "p75": 0.35, "p90": 0.48, "p99": 0.85}, "throughput_last_30m": {"p50": 45.2, "p75": 38.5, "p90": 28.3, "p99": 15.1}}]}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
"500":
|
||||
@@ -1025,7 +1062,7 @@ examples:
|
||||
speakeasy-default-list-endpoints-zdr:
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": [{"name": "OpenAI: GPT-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}, "throughput_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}}]}
|
||||
application/json: {"data": [{"name": "OpenAI: GPT-4", "model_id": "openai/gpt-4", "model_name": "GPT-4", "context_length": 8192, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "provider_name": "OpenAI", "tag": "openai", "quantization": "fp16", "max_completion_tokens": 4096, "max_prompt_tokens": 8192, "supported_parameters": ["temperature", "top_p", "max_tokens"], "uptime_last_30m": 99.5, "supports_implicit_caching": true, "latency_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}, "throughput_last_30m": {"p50": 25.5, "p75": 35.2, "p90": 48.7, "p99": 85.3}}]}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
getParameters:
|
||||
@@ -1058,7 +1095,7 @@ examples:
|
||||
offset: "0"
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": [{"hash": "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", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}]}
|
||||
application/json: {"data": [{"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}]}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"429":
|
||||
@@ -1071,7 +1108,7 @@ examples:
|
||||
application/json: {"name": "My New API Key"}
|
||||
responses:
|
||||
"201":
|
||||
application/json: {"data": {"hash": "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", "name": "My New API Key", "label": "My New API Key", "disabled": false, "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "usage": 0, "usage_daily": 0, "usage_weekly": 0, "usage_monthly": 0, "byok_usage": 0, "byok_usage_daily": 0, "byok_usage_weekly": 0, "byok_usage_monthly": 0, "created_at": "2025-08-24T10:30:00Z", "updated_at": null}, "key": "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"}
|
||||
application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My New API Key", "label": "My New API Key", "disabled": false, "limit": 50, "limit_remaining": 50, "limit_reset": "monthly", "include_byok_in_limit": true, "usage": 0, "usage_daily": 0, "usage_weekly": 0, "usage_monthly": 0, "byok_usage": 0, "byok_usage_daily": 0, "byok_usage_weekly": 0, "byok_usage_monthly": 0, "created_at": "2025-08-24T10:30:00Z", "updated_at": null}, "key": "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"}
|
||||
"400":
|
||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||
"401":
|
||||
@@ -1084,12 +1121,12 @@ examples:
|
||||
speakeasy-default-update-keys:
|
||||
parameters:
|
||||
path:
|
||||
hash: "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"
|
||||
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
|
||||
requestBody:
|
||||
application/json: {}
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": {"hash": "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", "name": "Updated API Key Name", "label": "Updated API Key Name", "disabled": false, "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "include_byok_in_limit": true, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T16:00:00Z"}}
|
||||
application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "Updated API Key Name", "label": "Updated API Key Name", "disabled": false, "limit": 75, "limit_remaining": 49.5, "limit_reset": "daily", "include_byok_in_limit": true, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T16:00:00Z"}}
|
||||
"400":
|
||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||
"401":
|
||||
@@ -1104,7 +1141,7 @@ examples:
|
||||
speakeasy-default-delete-keys:
|
||||
parameters:
|
||||
path:
|
||||
hash: "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"
|
||||
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"deleted": true}
|
||||
@@ -1120,10 +1157,10 @@ examples:
|
||||
speakeasy-default-get-key:
|
||||
parameters:
|
||||
path:
|
||||
hash: "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"
|
||||
hash: "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943"
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": {"hash": "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", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}}
|
||||
application/json: {"data": {"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943", "name": "My Production Key", "label": "Production API Key", "disabled": false, "limit": 100, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "created_at": "2025-08-24T10:30:00Z", "updated_at": "2025-08-24T15:45:00Z"}}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"404":
|
||||
@@ -1136,7 +1173,7 @@ examples:
|
||||
speakeasy-default-get-current-key:
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": {"label": "sk-or-v1-au78b3456789012345678901234567890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
|
||||
application/json: {"data": {"label": "sk-or-v1-au7...890", "limit": 100, "usage": 25.5, "usage_daily": 25.5, "usage_weekly": 25.5, "usage_monthly": 25.5, "byok_usage": 17.38, "byok_usage_daily": 17.38, "byok_usage_weekly": 17.38, "byok_usage_monthly": 17.38, "is_free_tier": false, "is_provisioning_key": false, "limit_remaining": 74.5, "limit_reset": "monthly", "include_byok_in_limit": false, "rate_limit": {"requests": 1000, "interval": "1h", "note": "This field is deprecated and safe to ignore."}}}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"500":
|
||||
@@ -1189,4 +1226,190 @@ examples:
|
||||
application/json: {"error": {"code": "<value>", "message": "<value>"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": "<value>", "message": "<value>"}}
|
||||
listGuardrails:
|
||||
speakeasy-default-list-guardrails:
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 1}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
createGuardrail:
|
||||
speakeasy-default-create-guardrail:
|
||||
requestBody:
|
||||
application/json: {"name": "My New Guardrail"}
|
||||
responses:
|
||||
"201":
|
||||
application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "My New Guardrail", "created_at": "2025-08-24T10:30:00Z"}}
|
||||
"400":
|
||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
getGuardrail:
|
||||
speakeasy-default-get-guardrail:
|
||||
parameters:
|
||||
path:
|
||||
id: "550e8400-e29b-41d4-a716-446655440000"
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Guardrail", "created_at": "2025-08-24T10:30:00Z"}}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
updateGuardrail:
|
||||
speakeasy-default-update-guardrail:
|
||||
parameters:
|
||||
path:
|
||||
id: "550e8400-e29b-41d4-a716-446655440000"
|
||||
requestBody:
|
||||
application/json: {}
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "Updated Guardrail Name", "created_at": "2025-08-24T10:30:00Z"}}
|
||||
"400":
|
||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
deleteGuardrail:
|
||||
speakeasy-default-delete-guardrail:
|
||||
parameters:
|
||||
path:
|
||||
id: "550e8400-e29b-41d4-a716-446655440000"
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"deleted": true}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
listKeyAssignments:
|
||||
speakeasy-default-list-key-assignments:
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "key_hash": "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "key_name": "Production Key", "key_label": "prod-key", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 25}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
listMemberAssignments:
|
||||
speakeasy-default-list-member-assignments:
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
listGuardrailKeyAssignments:
|
||||
speakeasy-default-list-guardrail-key-assignments:
|
||||
parameters:
|
||||
path:
|
||||
id: "550e8400-e29b-41d4-a716-446655440000"
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": [], "total_count": 25}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
bulkAssignKeysToGuardrail:
|
||||
speakeasy-default-bulk-assign-keys-to-guardrail:
|
||||
parameters:
|
||||
path:
|
||||
id: "550e8400-e29b-41d4-a716-446655440000"
|
||||
requestBody:
|
||||
application/json: {"key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"]}
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"assigned_count": 3}
|
||||
"400":
|
||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
listGuardrailMemberAssignments:
|
||||
speakeasy-default-list-guardrail-member-assignments:
|
||||
parameters:
|
||||
path:
|
||||
id: "550e8400-e29b-41d4-a716-446655440000"
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"data": [{"id": "550e8400-e29b-41d4-a716-446655440000", "user_id": "user_abc123", "organization_id": "org_xyz789", "guardrail_id": "550e8400-e29b-41d4-a716-446655440001", "assigned_by": "user_abc123", "created_at": "2025-08-24T10:30:00Z"}], "total_count": 10}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
bulkAssignMembersToGuardrail:
|
||||
speakeasy-default-bulk-assign-members-to-guardrail:
|
||||
parameters:
|
||||
path:
|
||||
id: "550e8400-e29b-41d4-a716-446655440000"
|
||||
requestBody:
|
||||
application/json: {"member_user_ids": ["user_abc123", "user_def456"]}
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"assigned_count": 2}
|
||||
"400":
|
||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
bulkUnassignKeysFromGuardrail:
|
||||
speakeasy-default-bulk-unassign-keys-from-guardrail:
|
||||
parameters:
|
||||
path:
|
||||
id: "550e8400-e29b-41d4-a716-446655440000"
|
||||
requestBody:
|
||||
application/json: {"key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"]}
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"unassigned_count": 3}
|
||||
"400":
|
||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
bulkUnassignMembersFromGuardrail:
|
||||
speakeasy-default-bulk-unassign-members-from-guardrail:
|
||||
parameters:
|
||||
path:
|
||||
id: "550e8400-e29b-41d4-a716-446655440000"
|
||||
requestBody:
|
||||
application/json: {"member_user_ids": ["user_abc123", "user_def456"]}
|
||||
responses:
|
||||
"200":
|
||||
application/json: {"unassigned_count": 2}
|
||||
"400":
|
||||
application/json: {"error": {"code": 400, "message": "Invalid request parameters"}}
|
||||
"401":
|
||||
application/json: {"error": {"code": 401, "message": "Missing Authentication header"}}
|
||||
"404":
|
||||
application/json: {"error": {"code": 404, "message": "Resource not found"}}
|
||||
"500":
|
||||
application/json: {"error": {"code": 500, "message": "Internal Server Error"}}
|
||||
examplesVersion: 1.0.2
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ generation:
|
||||
skipResponseBodyAssertions: false
|
||||
preApplyUnionDiscriminators: true
|
||||
python:
|
||||
version: 0.0.18
|
||||
version: 0.2.0
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
|
||||
Regular → Executable
+4920
-473
File diff suppressed because it is too large
Load Diff
+4923
-475
File diff suppressed because it is too large
Load Diff
@@ -8,8 +8,8 @@ sources:
|
||||
- latest
|
||||
OpenRouter API:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:74aa60ddccc9442b797432138c9ea1577f922ae537a659f129b4102d3a8124d7
|
||||
sourceBlobDigest: sha256:c9ae686141914431fb09ce7f0ff685c5b20c19006a92ade6d8686358616f6925
|
||||
sourceRevisionDigest: sha256:5ba48c1ff7f13c2c5d9ab558e9ecd4638b65c12dd9c4e0cff7fb337674e94ceb
|
||||
sourceBlobDigest: sha256:082db9694677b85116bda99811c8b957f96d1c493a3c606643479a65dad79730
|
||||
tags:
|
||||
- latest
|
||||
- 1.0.0
|
||||
@@ -17,10 +17,10 @@ targets:
|
||||
open-router:
|
||||
source: OpenRouter API
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:74aa60ddccc9442b797432138c9ea1577f922ae537a659f129b4102d3a8124d7
|
||||
sourceBlobDigest: sha256:c9ae686141914431fb09ce7f0ff685c5b20c19006a92ade6d8686358616f6925
|
||||
sourceRevisionDigest: sha256:5ba48c1ff7f13c2c5d9ab558e9ecd4638b65c12dd9c4e0cff7fb337674e94ceb
|
||||
sourceBlobDigest: sha256:082db9694677b85116bda99811c8b957f96d1c493a3c606643479a65dad79730
|
||||
codeSamplesNamespace: open-router-python-code-samples
|
||||
codeSamplesRevisionDigest: sha256:95a78f7dc072063abfd68a880ad1054c27a9a9077449cbf667d07de13a15112a
|
||||
codeSamplesRevisionDigest: sha256:bfe86dbe763c7e6164cdcddd56ddda61a8981ca5b5dc0aa7cd97bbbb4a44142a
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.666.0
|
||||
|
||||
@@ -10,4 +10,6 @@
|
||||
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `tool_calls` | List[[components.ChatMessageToolCall](../components/chatmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
|
||||
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning_details` | List[[components.Schema2](../components/schema2.md)] | :heavy_minus_sign: | N/A |
|
||||
| `images` | List[[components.Image](../components/image.md)] | :heavy_minus_sign: | N/A |
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
# GetParametersSecurity
|
||||
# AssistantMessageImageURL
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `bearer` | *str* | :heavy_check_mark: | N/A |
|
||||
| `url` | *str* | :heavy_check_mark: | N/A |
|
||||
@@ -22,9 +22,9 @@
|
||||
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
|
||||
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning` | [Optional[components.Reasoning]](../components/reasoning.md) | :heavy_minus_sign: | N/A |
|
||||
| `response_format` | [Optional[components.ChatGenerationParamsResponseFormatUnion]](../components/chatgenerationparamsresponseformatunion.md) | :heavy_minus_sign: | N/A |
|
||||
| `response_format` | [Optional[components.ResponseFormat]](../components/responseformat.md) | :heavy_minus_sign: | N/A |
|
||||
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
||||
| `stop` | [OptionalNullable[components.ChatGenerationParamsStop]](../components/chatgenerationparamsstop.md) | :heavy_minus_sign: | N/A |
|
||||
| `stop` | [OptionalNullable[components.Stop]](../components/stop.md) | :heavy_minus_sign: | N/A |
|
||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||
| `stream_options` | [OptionalNullable[components.ChatStreamOptions]](../components/chatstreamoptions.md) | :heavy_minus_sign: | N/A |
|
||||
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# ChatGenerationParamsResponseFormatUnion
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.ChatGenerationParamsResponseFormatText`
|
||||
|
||||
```python
|
||||
value: components.ChatGenerationParamsResponseFormatText = /* values here */
|
||||
```
|
||||
|
||||
### `components.ChatGenerationParamsResponseFormatJSONObject`
|
||||
|
||||
```python
|
||||
value: components.ChatGenerationParamsResponseFormatJSONObject = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseFormatJSONSchema`
|
||||
|
||||
```python
|
||||
value: components.ResponseFormatJSONSchema = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseFormatTextGrammar`
|
||||
|
||||
```python
|
||||
value: components.ResponseFormatTextGrammar = /* values here */
|
||||
```
|
||||
|
||||
### `components.ChatGenerationParamsResponseFormatPython`
|
||||
|
||||
```python
|
||||
value: components.ChatGenerationParamsResponseFormatPython = /* values here */
|
||||
```
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| `type` | *Literal["image_url"]* | :heavy_check_mark: | N/A |
|
||||
| `image_url` | [components.ImageURL](../components/imageurl.md) | :heavy_check_mark: | N/A |
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `type` | *Literal["image_url"]* | :heavy_check_mark: | N/A |
|
||||
| `image_url` | [components.ChatMessageContentItemImageImageURL](../components/chatmessagecontentitemimageimageurl.md) | :heavy_check_mark: | N/A |
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# ImageURL
|
||||
# ChatMessageContentItemImageImageURL
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -8,5 +8,4 @@
|
||||
| `finish_reason` | [Nullable[components.ChatCompletionFinishReason]](../components/chatcompletionfinishreason.md) | :heavy_check_mark: | N/A |
|
||||
| `index` | *float* | :heavy_check_mark: | N/A |
|
||||
| `message` | [components.AssistantMessage](../components/assistantmessage.md) | :heavy_check_mark: | N/A |
|
||||
| `reasoning_details` | List[[components.Schema3](../components/schema3.md)] | :heavy_minus_sign: | N/A |
|
||||
| `logprobs` | [OptionalNullable[components.ChatMessageTokenLogprobs]](../components/chatmessagetokenlogprobs.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -10,4 +10,4 @@
|
||||
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `tool_calls` | List[[components.ChatStreamingMessageToolCall](../components/chatstreamingmessagetoolcall.md)] | :heavy_minus_sign: | N/A |
|
||||
| `reasoning_details` | List[[components.Schema3](../components/schema3.md)] | :heavy_minus_sign: | N/A |
|
||||
| `reasoning_details` | List[[components.Schema2](../components/schema2.md)] | :heavy_minus_sign: | N/A |
|
||||
@@ -1,13 +0,0 @@
|
||||
# CompletionChoice
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| `text` | *str* | :heavy_check_mark: | N/A |
|
||||
| `index` | *float* | :heavy_check_mark: | N/A |
|
||||
| `logprobs` | [Nullable[components.CompletionLogprobs]](../components/completionlogprobs.md) | :heavy_check_mark: | N/A |
|
||||
| `finish_reason` | [Nullable[components.CompletionFinishReason]](../components/completionfinishreason.md) | :heavy_check_mark: | N/A |
|
||||
| `native_finish_reason` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
@@ -1,28 +0,0 @@
|
||||
# CompletionCreateParams
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `models` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||
| `prompt` | [components.Prompt](../components/prompt.md) | :heavy_check_mark: | N/A |
|
||||
| `best_of` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
||||
| `echo` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
|
||||
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | N/A |
|
||||
| `logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
||||
| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
||||
| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
||||
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
|
||||
| `stop` | [OptionalNullable[components.CompletionCreateParamsStop]](../components/completioncreateparamsstop.md) | :heavy_minus_sign: | N/A |
|
||||
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
|
||||
| `stream_options` | [OptionalNullable[components.StreamOptions]](../components/streamoptions.md) | :heavy_minus_sign: | N/A |
|
||||
| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
|
||||
| `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | N/A |
|
||||
| `response_format` | [OptionalNullable[components.CompletionCreateParamsResponseFormatUnion]](../components/completioncreateparamsresponseformatunion.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -1,8 +0,0 @@
|
||||
# CompletionCreateParamsResponseFormatJSONObject
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
|
||||
| `type` | *Literal["json_object"]* | :heavy_check_mark: | N/A |
|
||||
@@ -1,8 +0,0 @@
|
||||
# CompletionCreateParamsResponseFormatPython
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------- | ------------------- | ------------------- | ------------------- |
|
||||
| `type` | *Literal["python"]* | :heavy_check_mark: | N/A |
|
||||
@@ -1,8 +0,0 @@
|
||||
# CompletionCreateParamsResponseFormatText
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `type` | *Literal["text"]* | :heavy_check_mark: | N/A |
|
||||
@@ -1,35 +0,0 @@
|
||||
# CompletionCreateParamsResponseFormatUnion
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.CompletionCreateParamsResponseFormatText`
|
||||
|
||||
```python
|
||||
value: components.CompletionCreateParamsResponseFormatText = /* values here */
|
||||
```
|
||||
|
||||
### `components.CompletionCreateParamsResponseFormatJSONObject`
|
||||
|
||||
```python
|
||||
value: components.CompletionCreateParamsResponseFormatJSONObject = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseFormatJSONSchema`
|
||||
|
||||
```python
|
||||
value: components.ResponseFormatJSONSchema = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseFormatTextGrammar`
|
||||
|
||||
```python
|
||||
value: components.ResponseFormatTextGrammar = /* values here */
|
||||
```
|
||||
|
||||
### `components.CompletionCreateParamsResponseFormatPython`
|
||||
|
||||
```python
|
||||
value: components.CompletionCreateParamsResponseFormatPython = /* values here */
|
||||
```
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# CompletionCreateParamsStop
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
### `List[str]`
|
||||
|
||||
```python
|
||||
value: List[str] = /* values here */
|
||||
```
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# CompletionFinishReason
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| ---------------- | ---------------- |
|
||||
| `STOP` | stop |
|
||||
| `LENGTH` | length |
|
||||
| `CONTENT_FILTER` | content_filter |
|
||||
@@ -1,11 +0,0 @@
|
||||
# CompletionLogprobs
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
|
||||
| `tokens` | List[*str*] | :heavy_check_mark: | N/A |
|
||||
| `token_logprobs` | List[*float*] | :heavy_check_mark: | N/A |
|
||||
| `top_logprobs` | List[Dict[str, *float*]] | :heavy_check_mark: | N/A |
|
||||
| `text_offset` | List[*float*] | :heavy_check_mark: | N/A |
|
||||
@@ -1,15 +0,0 @@
|
||||
# CompletionResponse
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
| `object` | *Literal["text_completion"]* | :heavy_check_mark: | N/A |
|
||||
| `created` | *float* | :heavy_check_mark: | N/A |
|
||||
| `model` | *str* | :heavy_check_mark: | N/A |
|
||||
| `provider` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `system_fingerprint` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `choices` | List[[components.CompletionChoice](../components/completionchoice.md)] | :heavy_check_mark: | N/A |
|
||||
| `usage` | [Optional[components.CompletionUsage]](../components/completionusage.md) | :heavy_minus_sign: | N/A |
|
||||
@@ -1,10 +0,0 @@
|
||||
# CompletionUsage
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------- | ------------------- | ------------------- | ------------------- |
|
||||
| `prompt_tokens` | *float* | :heavy_check_mark: | N/A |
|
||||
| `completion_tokens` | *float* | :heavy_check_mark: | N/A |
|
||||
| `total_tokens` | *float* | :heavy_check_mark: | N/A |
|
||||
@@ -0,0 +1,8 @@
|
||||
# Image
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| `image_url` | [components.AssistantMessageImageURL](../components/assistantmessageimageurl.md) | :heavy_check_mark: | N/A |
|
||||
@@ -19,4 +19,5 @@ Information about an AI model available on OpenRouter
|
||||
| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {<br/>"context_length": 8192,<br/>"max_completion_tokens": 4096,<br/>"is_moderated": true<br/>} |
|
||||
| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {<br/>"prompt_tokens": 1000,<br/>"completion_tokens": 1000<br/>} |
|
||||
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | |
|
||||
| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {<br/>"temperature": 0.7,<br/>"top_p": 0.9,<br/>"frequency_penalty": 0<br/>} |
|
||||
| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {<br/>"temperature": 0.7,<br/>"top_p": 0.9,<br/>"frequency_penalty": 0<br/>} |
|
||||
| `expiration_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 |
|
||||
@@ -7,4 +7,5 @@
|
||||
| ------------ | ------------ |
|
||||
| `TEXT` | text |
|
||||
| `IMAGE` | image |
|
||||
| `EMBEDDINGS` | embeddings |
|
||||
| `EMBEDDINGS` | embeddings |
|
||||
| `AUDIO` | audio |
|
||||
@@ -12,6 +12,7 @@
|
||||
| `image_token` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `image_output` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `audio` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `web_search` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# Prompt
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `str`
|
||||
|
||||
```python
|
||||
value: str = /* values here */
|
||||
```
|
||||
|
||||
### `List[str]`
|
||||
|
||||
```python
|
||||
value: List[str] = /* values here */
|
||||
```
|
||||
|
||||
### `List[float]`
|
||||
|
||||
```python
|
||||
value: List[float] = /* values here */
|
||||
```
|
||||
|
||||
### `List[List[float]]`
|
||||
|
||||
```python
|
||||
value: List[List[float]] = /* values here */
|
||||
```
|
||||
|
||||
@@ -8,6 +8,7 @@ Information about a specific model endpoint
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `model_id` | *str* | :heavy_check_mark: | The unique identifier for the model (permaslug) | openai/gpt-4 |
|
||||
| `model_name` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `context_length` | *float* | :heavy_check_mark: | N/A | |
|
||||
| `pricing` | [components.Pricing](../components/pricing.md) | :heavy_check_mark: | N/A | |
|
||||
|
||||
@@ -14,6 +14,7 @@ Pricing information for the model
|
||||
| `image_token` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `image_output` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `audio` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `web_search` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | A value in string format that is a large number | 1000 |
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# ResponseFormat
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.ResponseFormatText`
|
||||
|
||||
```python
|
||||
value: components.ResponseFormatText = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseFormatJSONObject`
|
||||
|
||||
```python
|
||||
value: components.ResponseFormatJSONObject = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseFormatJSONSchema`
|
||||
|
||||
```python
|
||||
value: components.ResponseFormatJSONSchema = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseFormatTextGrammar`
|
||||
|
||||
```python
|
||||
value: components.ResponseFormatTextGrammar = /* values here */
|
||||
```
|
||||
|
||||
### `components.ResponseFormatPython`
|
||||
|
||||
```python
|
||||
value: components.ResponseFormatPython = /* values here */
|
||||
```
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# ChatGenerationParamsResponseFormatJSONObject
|
||||
# ResponseFormatJSONObject
|
||||
|
||||
|
||||
## Fields
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# ChatGenerationParamsResponseFormatPython
|
||||
# ResponseFormatPython
|
||||
|
||||
|
||||
## Fields
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# ChatGenerationParamsResponseFormatText
|
||||
# ResponseFormatText
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -0,0 +1,23 @@
|
||||
# Schema2
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.Schema2ReasoningSummary`
|
||||
|
||||
```python
|
||||
value: components.Schema2ReasoningSummary = /* values here */
|
||||
```
|
||||
|
||||
### `components.Schema2ReasoningEncrypted`
|
||||
|
||||
```python
|
||||
value: components.Schema2ReasoningEncrypted = /* values here */
|
||||
```
|
||||
|
||||
### `components.Schema2ReasoningText`
|
||||
|
||||
```python
|
||||
value: components.Schema2ReasoningText = /* values here */
|
||||
```
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# Schema3ReasoningEncrypted
|
||||
# Schema2ReasoningEncrypted
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -8,5 +8,5 @@
|
||||
| `type` | *Literal["reasoning.encrypted"]* | :heavy_check_mark: | N/A |
|
||||
| `data` | *str* | :heavy_check_mark: | N/A |
|
||||
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema5]](../components/schema5.md) | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema4]](../components/schema4.md) | :heavy_minus_sign: | N/A |
|
||||
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# Schema3ReasoningSummary
|
||||
# Schema2ReasoningSummary
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -8,5 +8,5 @@
|
||||
| `type` | *Literal["reasoning.summary"]* | :heavy_check_mark: | N/A |
|
||||
| `summary` | *str* | :heavy_check_mark: | N/A |
|
||||
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema5]](../components/schema5.md) | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema4]](../components/schema4.md) | :heavy_minus_sign: | N/A |
|
||||
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
@@ -1,4 +1,4 @@
|
||||
# Schema3ReasoningText
|
||||
# Schema2ReasoningText
|
||||
|
||||
|
||||
## Fields
|
||||
@@ -9,5 +9,5 @@
|
||||
| `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema5]](../components/schema5.md) | :heavy_minus_sign: | N/A |
|
||||
| `format_` | [OptionalNullable[components.Schema4]](../components/schema4.md) | :heavy_minus_sign: | N/A |
|
||||
| `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
|
||||
@@ -1,23 +0,0 @@
|
||||
# Schema3
|
||||
|
||||
|
||||
## Supported Types
|
||||
|
||||
### `components.Schema3ReasoningSummary`
|
||||
|
||||
```python
|
||||
value: components.Schema3ReasoningSummary = /* values here */
|
||||
```
|
||||
|
||||
### `components.Schema3ReasoningEncrypted`
|
||||
|
||||
```python
|
||||
value: components.Schema3ReasoningEncrypted = /* values here */
|
||||
```
|
||||
|
||||
### `components.Schema3ReasoningText`
|
||||
|
||||
```python
|
||||
value: components.Schema3ReasoningText = /* values here */
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Schema5
|
||||
# Schema4
|
||||
|
||||
|
||||
## Values
|
||||
@@ -1,4 +1,4 @@
|
||||
# ChatGenerationParamsStop
|
||||
# Stop
|
||||
|
||||
|
||||
## Supported Types
|
||||
@@ -1,8 +0,0 @@
|
||||
# StreamOptions
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------------ | ------------------------ | ------------------------ | ------------------------ |
|
||||
| `include_usage` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
|
||||
@@ -0,0 +1,9 @@
|
||||
# BulkAssignKeysToGuardrailRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkAssignKeysToGuardrailRequestBody](../operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,8 @@
|
||||
# BulkAssignKeysToGuardrailRequestBody
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to assign to the guardrail | [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>] |
|
||||
@@ -0,0 +1,10 @@
|
||||
# BulkAssignKeysToGuardrailResponse
|
||||
|
||||
Assignment result
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
||||
| `assigned_count` | *float* | :heavy_check_mark: | Number of keys successfully assigned | 3 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# BulkAssignMembersToGuardrailRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkAssignMembersToGuardrailRequestBody](../operations/bulkassignmemberstoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,8 @@
|
||||
# BulkAssignMembersToGuardrailRequestBody
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
|
||||
| `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to assign to the guardrail | [<br/>"user_abc123",<br/>"user_def456"<br/>] |
|
||||
@@ -0,0 +1,10 @@
|
||||
# BulkAssignMembersToGuardrailResponse
|
||||
|
||||
Assignment result
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- |
|
||||
| `assigned_count` | *float* | :heavy_check_mark: | Number of members successfully assigned | 2 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# BulkUnassignKeysFromGuardrailRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkUnassignKeysFromGuardrailRequestBody](../operations/bulkunassignkeysfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,8 @@
|
||||
# BulkUnassignKeysFromGuardrailRequestBody
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to unassign from the guardrail | [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>] |
|
||||
@@ -0,0 +1,10 @@
|
||||
# BulkUnassignKeysFromGuardrailResponse
|
||||
|
||||
Unassignment result
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
||||
| `unassigned_count` | *float* | :heavy_check_mark: | Number of keys successfully unassigned | 3 |
|
||||
@@ -0,0 +1,9 @@
|
||||
# BulkUnassignMembersFromGuardrailRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.BulkUnassignMembersFromGuardrailRequestBody](../operations/bulkunassignmembersfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
|
||||
@@ -0,0 +1,8 @@
|
||||
# BulkUnassignMembersFromGuardrailRequestBody
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
|
||||
| `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to unassign from the guardrail | [<br/>"user_abc123",<br/>"user_def456"<br/>] |
|
||||
@@ -0,0 +1,10 @@
|
||||
# BulkUnassignMembersFromGuardrailResponse
|
||||
|
||||
Unassignment result
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||
| `unassigned_count` | *float* | :heavy_check_mark: | Number of members successfully unassigned | 2 |
|
||||
@@ -0,0 +1,21 @@
|
||||
# Category
|
||||
|
||||
Filter models by use case category
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------------- | --------------- |
|
||||
| `PROGRAMMING` | programming |
|
||||
| `ROLEPLAY` | roleplay |
|
||||
| `MARKETING` | marketing |
|
||||
| `MARKETING_SEO` | marketing/seo |
|
||||
| `TECHNOLOGY` | technology |
|
||||
| `SCIENCE` | science |
|
||||
| `TRANSLATION` | translation |
|
||||
| `LEGAL` | legal |
|
||||
| `FINANCE` | finance |
|
||||
| `HEALTH` | health |
|
||||
| `TRIVIA` | trivia |
|
||||
| `ACADEMIA` | academia |
|
||||
@@ -0,0 +1,19 @@
|
||||
# CreateGuardrailData
|
||||
|
||||
The created guardrail
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
|
||||
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
|
||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
|
||||
| `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalResponse]](../operations/createguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"google"<br/>] |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [<br/>"openai/gpt-5.2-20251211",<br/>"anthropic/claude-4.5-opus-20251124",<br/>"deepseek/deepseek-r1-0528:free"<br/>] |
|
||||
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
|
||||
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
|
||||
| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
|
||||
@@ -0,0 +1,14 @@
|
||||
# CreateGuardrailRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `name` | *str* | :heavy_check_mark: | Name for the new guardrail | My New Guardrail |
|
||||
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | A guardrail for limiting API usage |
|
||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 50 |
|
||||
| `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalRequest]](../operations/createguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>] |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [<br/>"openai/gpt-5.2",<br/>"anthropic/claude-4.5-opus-20251124",<br/>"deepseek/deepseek-r1-0528:free"<br/>] |
|
||||
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
|
||||
@@ -0,0 +1,12 @@
|
||||
# CreateGuardrailResetIntervalRequest
|
||||
|
||||
Interval at which the limit resets (daily, weekly, monthly)
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `DAILY` | daily |
|
||||
| `WEEKLY` | weekly |
|
||||
| `MONTHLY` | monthly |
|
||||
@@ -0,0 +1,12 @@
|
||||
# CreateGuardrailResetIntervalResponse
|
||||
|
||||
Interval at which the limit resets (daily, weekly, monthly)
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `DAILY` | daily |
|
||||
| `WEEKLY` | weekly |
|
||||
| `MONTHLY` | monthly |
|
||||
@@ -0,0 +1,10 @@
|
||||
# CreateGuardrailResponse
|
||||
|
||||
Guardrail created successfully
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.CreateGuardrailData](../operations/createguardraildata.md) | :heavy_check_mark: | The created guardrail | {<br/>"id": "550e8400-e29b-41d4-a716-446655440000",<br/>"name": "Production Guardrail",<br/>"description": "Guardrail for production environment",<br/>"limit_usd": 100,<br/>"reset_interval": "monthly",<br/>"allowed_providers": [<br/>"openai",<br/>"anthropic",<br/>"google"<br/>],<br/>"allowed_models": null,<br/>"enforce_zdr": false,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"updated_at": "2025-08-24T15:45:00Z"<br/>} |
|
||||
@@ -7,9 +7,9 @@ The created API key information
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | 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 |
|
||||
| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
|
||||
| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | Production API Key |
|
||||
| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
|
||||
| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
|
||||
| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
|
||||
| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
|
||||
|
||||
@@ -5,7 +5,7 @@ API key created successfully
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.CreateKeysData](../operations/createkeysdata.md) | :heavy_check_mark: | The created API key information | {<br/>"hash": "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",<br/>"name": "My Production Key",<br/>"label": "Production API Key",<br/>"disabled": false,<br/>"limit": 100,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": false,<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_weekly": 25.5,<br/>"usage_monthly": 25.5,<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"updated_at": "2025-08-24T15:45:00Z",<br/>"expires_at": "2027-12-31T23:59:59Z"<br/>} |
|
||||
| `key` | *str* | :heavy_check_mark: | The actual API key string (only shown once) | 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 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.CreateKeysData](../operations/createkeysdata.md) | :heavy_check_mark: | The created API key information | {<br/>"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",<br/>"name": "My Production Key",<br/>"label": "sk-or-v1-0e6...1c96",<br/>"disabled": false,<br/>"limit": 100,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": false,<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_weekly": 25.5,<br/>"usage_monthly": 25.5,<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"updated_at": "2025-08-24T15:45:00Z",<br/>"expires_at": "2027-12-31T23:59:59Z"<br/>} |
|
||||
| `key` | *str* | :heavy_check_mark: | The actual API key string (only shown once) | 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 |
|
||||
@@ -0,0 +1,8 @@
|
||||
# DeleteGuardrailRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to delete | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
@@ -0,0 +1,10 @@
|
||||
# DeleteGuardrailResponse
|
||||
|
||||
Guardrail deleted successfully
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
|
||||
| `deleted` | *Literal[True]* | :heavy_check_mark: | Confirmation that the guardrail was deleted | true |
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to delete | 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 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to delete | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
@@ -7,7 +7,7 @@ Current API key information
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | 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 |
|
||||
| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
|
||||
| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
|
||||
| `usage` | *float* | :heavy_check_mark: | Total OpenRouter credit usage (in USD) for the API key | 25.5 |
|
||||
| `usage_daily` | *float* | :heavy_check_mark: | OpenRouter credit usage (in USD) for the current UTC day | 25.5 |
|
||||
|
||||
@@ -5,6 +5,6 @@ API key details
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.md) | :heavy_check_mark: | Current API key information | {<br/>"label": "sk-or-v1-au78b3456789012345678901234567890",<br/>"limit": 100,<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_weekly": 25.5,<br/>"usage_monthly": 25.5,<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"is_free_tier": false,<br/>"is_provisioning_key": false,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": false,<br/>"expires_at": "2027-12-31T23:59:59Z",<br/>"rate_limit": {<br/>"requests": 1000,<br/>"interval": "1h",<br/>"note": "This field is deprecated and safe to ignore."<br/>}<br/>} |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.GetCurrentKeyData](../operations/getcurrentkeydata.md) | :heavy_check_mark: | Current API key information | {<br/>"label": "sk-or-v1-au7...890",<br/>"limit": 100,<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_weekly": 25.5,<br/>"usage_monthly": 25.5,<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"is_free_tier": false,<br/>"is_provisioning_key": false,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": false,<br/>"expires_at": "2027-12-31T23:59:59Z",<br/>"rate_limit": {<br/>"requests": 1000,<br/>"interval": "1h",<br/>"note": "This field is deprecated and safe to ignore."<br/>}<br/>} |
|
||||
@@ -0,0 +1,19 @@
|
||||
# GetGuardrailData
|
||||
|
||||
The guardrail
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
|
||||
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
|
||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
|
||||
| `reset_interval` | [OptionalNullable[operations.GetGuardrailResetInterval]](../operations/getguardrailresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"google"<br/>] |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [<br/>"openai/gpt-5.2-20251211",<br/>"anthropic/claude-4.5-opus-20251124",<br/>"deepseek/deepseek-r1-0528:free"<br/>] |
|
||||
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
|
||||
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
|
||||
| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
|
||||
@@ -0,0 +1,8 @@
|
||||
# GetGuardrailRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to retrieve | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
@@ -0,0 +1,12 @@
|
||||
# GetGuardrailResetInterval
|
||||
|
||||
Interval at which the limit resets (daily, weekly, monthly)
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `DAILY` | daily |
|
||||
| `WEEKLY` | weekly |
|
||||
| `MONTHLY` | monthly |
|
||||
@@ -0,0 +1,10 @@
|
||||
# GetGuardrailResponse
|
||||
|
||||
Guardrail details
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.GetGuardrailData](../operations/getguardraildata.md) | :heavy_check_mark: | The guardrail | {<br/>"id": "550e8400-e29b-41d4-a716-446655440000",<br/>"name": "Production Guardrail",<br/>"description": "Guardrail for production environment",<br/>"limit_usd": 100,<br/>"reset_interval": "monthly",<br/>"allowed_providers": [<br/>"openai",<br/>"anthropic",<br/>"google"<br/>],<br/>"allowed_models": null,<br/>"enforce_zdr": false,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"updated_at": "2025-08-24T15:45:00Z"<br/>} |
|
||||
@@ -7,9 +7,9 @@ The API key information
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | 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 |
|
||||
| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
|
||||
| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | Production API Key |
|
||||
| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
|
||||
| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
|
||||
| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
|
||||
| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to retrieve | 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 |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | The hash identifier of the API key to retrieve | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
@@ -5,6 +5,6 @@ API key details
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.GetKeyData](../operations/getkeydata.md) | :heavy_check_mark: | The API key information | {<br/>"hash": "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",<br/>"name": "My Production Key",<br/>"label": "Production API Key",<br/>"disabled": false,<br/>"limit": 100,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": false,<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_weekly": 25.5,<br/>"usage_monthly": 25.5,<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"updated_at": "2025-08-24T15:45:00Z",<br/>"expires_at": "2027-12-31T23:59:59Z"<br/>} |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.GetKeyData](../operations/getkeydata.md) | :heavy_check_mark: | The API key information | {<br/>"hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",<br/>"name": "My Production Key",<br/>"label": "sk-or-v1-0e6...1c96",<br/>"disabled": false,<br/>"limit": 100,<br/>"limit_remaining": 74.5,<br/>"limit_reset": "monthly",<br/>"include_byok_in_limit": false,<br/>"usage": 25.5,<br/>"usage_daily": 25.5,<br/>"usage_weekly": 25.5,<br/>"usage_monthly": 25.5,<br/>"byok_usage": 17.38,<br/>"byok_usage_daily": 17.38,<br/>"byok_usage_weekly": 17.38,<br/>"byok_usage_monthly": 17.38,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"updated_at": "2025-08-24T15:45:00Z",<br/>"expires_at": "2027-12-31T23:59:59Z"<br/>} |
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ---------------------- | ---------------------- | ---------------------- | ---------------------- |
|
||||
| `category` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
|
||||
| `category` | [Optional[operations.Category]](../operations/category.md) | :heavy_minus_sign: | Filter models by use case category | programming |
|
||||
| `supported_parameters` | *Optional[str]* | :heavy_minus_sign: | N/A | |
|
||||
@@ -1,10 +0,0 @@
|
||||
# GetParametersRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `author` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `slug` | *str* | :heavy_check_mark: | N/A | |
|
||||
| `provider` | [Optional[components.ProviderName]](../components/providername.md) | :heavy_minus_sign: | N/A | OpenAI |
|
||||
@@ -1,10 +0,0 @@
|
||||
# GetParametersResponse
|
||||
|
||||
Returns the parameters for the specified model
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `data` | [operations.GetParametersData](../operations/getparametersdata.md) | :heavy_check_mark: | Parameter analytics data | {<br/>"model": "openai/gpt-4",<br/>"supported_parameters": [<br/>"temperature",<br/>"top_p",<br/>"max_tokens"<br/>]<br/>} |
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
||||
| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | 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 |
|
||||
| `hash` | *str* | :heavy_check_mark: | Unique hash identifier for the API key | f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943 |
|
||||
| `name` | *str* | :heavy_check_mark: | Name of the API key | My Production Key |
|
||||
| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | Production API Key |
|
||||
| `label` | *str* | :heavy_check_mark: | Human-readable label for the API key | sk-or-v1-0e6...1c96 |
|
||||
| `disabled` | *bool* | :heavy_check_mark: | Whether the API key is disabled | false |
|
||||
| `limit` | *Nullable[float]* | :heavy_check_mark: | Spending limit for the API key in USD | 100 |
|
||||
| `limit_remaining` | *Nullable[float]* | :heavy_check_mark: | Remaining spending limit in USD | 74.5 |
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# ListGuardrailKeyAssignmentsData
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `key_hash` | *str* | :heavy_check_mark: | Hash of the assigned API key | c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 |
|
||||
| `guardrail_id` | *str* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 |
|
||||
| `key_name` | *str* | :heavy_check_mark: | Name of the API key | Production Key |
|
||||
| `key_label` | *str* | :heavy_check_mark: | Label of the API key | prod-key |
|
||||
| `assigned_by` | *Nullable[str]* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 |
|
||||
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z |
|
||||
@@ -0,0 +1,10 @@
|
||||
# ListGuardrailKeyAssignmentsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
@@ -0,0 +1,11 @@
|
||||
# ListGuardrailKeyAssignmentsResponse
|
||||
|
||||
List of key assignments
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
||||
| `data` | List[[operations.ListGuardrailKeyAssignmentsData](../operations/listguardrailkeyassignmentsdata.md)] | :heavy_check_mark: | List of key assignments | |
|
||||
| `total_count` | *float* | :heavy_check_mark: | Total number of key assignments for this guardrail | 25 |
|
||||
@@ -0,0 +1,13 @@
|
||||
# ListGuardrailMemberAssignmentsData
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `user_id` | *str* | :heavy_check_mark: | Clerk user ID of the assigned member | user_abc123 |
|
||||
| `organization_id` | *str* | :heavy_check_mark: | Organization ID | org_xyz789 |
|
||||
| `guardrail_id` | *str* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 |
|
||||
| `assigned_by` | *Nullable[str]* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 |
|
||||
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z |
|
||||
@@ -0,0 +1,10 @@
|
||||
# ListGuardrailMemberAssignmentsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
@@ -0,0 +1,11 @@
|
||||
# ListGuardrailMemberAssignmentsResponse
|
||||
|
||||
List of member assignments
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `data` | List[[operations.ListGuardrailMemberAssignmentsData](../operations/listguardrailmemberassignmentsdata.md)] | :heavy_check_mark: | List of member assignments | |
|
||||
| `total_count` | *float* | :heavy_check_mark: | Total number of member assignments | 10 |
|
||||
@@ -0,0 +1,17 @@
|
||||
# ListGuardrailsData
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
|
||||
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
|
||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
|
||||
| `reset_interval` | [OptionalNullable[operations.ListGuardrailsResetInterval]](../operations/listguardrailsresetinterval.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"google"<br/>] |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [<br/>"openai/gpt-5.2-20251211",<br/>"anthropic/claude-4.5-opus-20251124",<br/>"deepseek/deepseek-r1-0528:free"<br/>] |
|
||||
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
|
||||
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
|
||||
| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListGuardrailsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
@@ -0,0 +1,12 @@
|
||||
# ListGuardrailsResetInterval
|
||||
|
||||
Interval at which the limit resets (daily, weekly, monthly)
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `DAILY` | daily |
|
||||
| `WEEKLY` | weekly |
|
||||
| `MONTHLY` | monthly |
|
||||
@@ -1,11 +1,11 @@
|
||||
# GetParametersData
|
||||
# ListGuardrailsResponse
|
||||
|
||||
Parameter analytics data
|
||||
List of guardrails
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
||||
| `model` | *str* | :heavy_check_mark: | Model identifier | openai/gpt-4 |
|
||||
| `supported_parameters` | List[[operations.SupportedParameter](../operations/supportedparameter.md)] | :heavy_check_mark: | List of parameters supported by this model | [<br/>"temperature",<br/>"top_p",<br/>"max_tokens"<br/>] |
|
||||
| `data` | List[[operations.ListGuardrailsData](../operations/listguardrailsdata.md)] | :heavy_check_mark: | List of guardrails | |
|
||||
| `total_count` | *float* | :heavy_check_mark: | Total number of guardrails | 25 |
|
||||
@@ -0,0 +1,14 @@
|
||||
# ListKeyAssignmentsData
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `key_hash` | *str* | :heavy_check_mark: | Hash of the assigned API key | c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93 |
|
||||
| `guardrail_id` | *str* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 |
|
||||
| `key_name` | *str* | :heavy_check_mark: | Name of the API key | Production Key |
|
||||
| `key_label` | *str* | :heavy_check_mark: | Label of the API key | prod-key |
|
||||
| `assigned_by` | *Nullable[str]* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 |
|
||||
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListKeyAssignmentsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
@@ -0,0 +1,11 @@
|
||||
# ListKeyAssignmentsResponse
|
||||
|
||||
List of key assignments
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| `data` | List[[operations.ListKeyAssignmentsData](../operations/listkeyassignmentsdata.md)] | :heavy_check_mark: | List of key assignments | |
|
||||
| `total_count` | *float* | :heavy_check_mark: | Total number of key assignments for this guardrail | 25 |
|
||||
@@ -0,0 +1,13 @@
|
||||
# ListMemberAssignmentsData
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | Unique identifier for the assignment | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `user_id` | *str* | :heavy_check_mark: | Clerk user ID of the assigned member | user_abc123 |
|
||||
| `organization_id` | *str* | :heavy_check_mark: | Organization ID | org_xyz789 |
|
||||
| `guardrail_id` | *str* | :heavy_check_mark: | ID of the guardrail | 550e8400-e29b-41d4-a716-446655440001 |
|
||||
| `assigned_by` | *Nullable[str]* | :heavy_check_mark: | User ID of who made the assignment | user_abc123 |
|
||||
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the assignment was created | 2025-08-24T10:30:00Z |
|
||||
@@ -0,0 +1,9 @@
|
||||
# ListMemberAssignmentsRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
||||
| `offset` | *Optional[str]* | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
|
||||
| `limit` | *Optional[str]* | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
|
||||
@@ -0,0 +1,11 @@
|
||||
# ListMemberAssignmentsResponse
|
||||
|
||||
List of member assignments
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `data` | List[[operations.ListMemberAssignmentsData](../operations/listmemberassignmentsdata.md)] | :heavy_check_mark: | List of member assignments | |
|
||||
| `total_count` | *float* | :heavy_check_mark: | Total number of member assignments | 10 |
|
||||
@@ -1,31 +0,0 @@
|
||||
# SupportedParameter
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------------------- | --------------------- |
|
||||
| `TEMPERATURE` | temperature |
|
||||
| `TOP_P` | top_p |
|
||||
| `TOP_K` | top_k |
|
||||
| `MIN_P` | min_p |
|
||||
| `TOP_A` | top_a |
|
||||
| `FREQUENCY_PENALTY` | frequency_penalty |
|
||||
| `PRESENCE_PENALTY` | presence_penalty |
|
||||
| `REPETITION_PENALTY` | repetition_penalty |
|
||||
| `MAX_TOKENS` | max_tokens |
|
||||
| `LOGIT_BIAS` | logit_bias |
|
||||
| `LOGPROBS` | logprobs |
|
||||
| `TOP_LOGPROBS` | top_logprobs |
|
||||
| `SEED` | seed |
|
||||
| `RESPONSE_FORMAT` | response_format |
|
||||
| `STRUCTURED_OUTPUTS` | structured_outputs |
|
||||
| `STOP` | stop |
|
||||
| `TOOLS` | tools |
|
||||
| `TOOL_CHOICE` | tool_choice |
|
||||
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
|
||||
| `INCLUDE_REASONING` | include_reasoning |
|
||||
| `REASONING` | reasoning |
|
||||
| `REASONING_EFFORT` | reasoning_effort |
|
||||
| `WEB_SEARCH_OPTIONS` | web_search_options |
|
||||
| `VERBOSITY` | verbosity |
|
||||
@@ -0,0 +1,19 @@
|
||||
# UpdateGuardrailData
|
||||
|
||||
The updated guardrail
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
|
||||
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
|
||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
|
||||
| `reset_interval` | [OptionalNullable[operations.UpdateGuardrailResetIntervalResponse]](../operations/updateguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"google"<br/>] |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [<br/>"openai/gpt-5.2-20251211",<br/>"anthropic/claude-4.5-opus-20251124",<br/>"deepseek/deepseek-r1-0528:free"<br/>] |
|
||||
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
|
||||
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
|
||||
| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
|
||||
@@ -0,0 +1,9 @@
|
||||
# UpdateGuardrailRequest
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail to update | 550e8400-e29b-41d4-a716-446655440000 |
|
||||
| `request_body` | [operations.UpdateGuardrailRequestBody](../operations/updateguardrailrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"name": "Updated Guardrail Name",<br/>"description": "Updated description",<br/>"limit_usd": 75,<br/>"reset_interval": "weekly"<br/>} |
|
||||
@@ -0,0 +1,14 @@
|
||||
# UpdateGuardrailRequestBody
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description | Example |
|
||||
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `name` | *Optional[str]* | :heavy_minus_sign: | New name for the guardrail | Updated Guardrail Name |
|
||||
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description for the guardrail | Updated description |
|
||||
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | New spending limit in USD | 75 |
|
||||
| `reset_interval` | [OptionalNullable[operations.UpdateGuardrailResetIntervalRequest]](../operations/updateguardrailresetintervalrequest.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
|
||||
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | New list of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>] |
|
||||
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model identifiers (slug or canonical_slug accepted) | [<br/>"openai/gpt-5.2"<br/>] |
|
||||
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | true |
|
||||
@@ -0,0 +1,12 @@
|
||||
# UpdateGuardrailResetIntervalRequest
|
||||
|
||||
Interval at which the limit resets (daily, weekly, monthly)
|
||||
|
||||
|
||||
## Values
|
||||
|
||||
| Name | Value |
|
||||
| --------- | --------- |
|
||||
| `DAILY` | daily |
|
||||
| `WEEKLY` | weekly |
|
||||
| `MONTHLY` | monthly |
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user