pub struct CreateKeyRequest {
pub name: String,
pub endpoints: Option<Vec<String>>,
pub spend_cap_usd: Option<f64>,
pub rate_limit: Option<i32>,
}Expand description
Request body for creating an API key.
Fields§
§name: StringHuman-readable name for the key.
endpoints: Option<Vec<String>>Restrict to specific endpoints (e.g. [“chat”, “images”]).
spend_cap_usd: Option<f64>Maximum spend in USD before the key is disabled.
rate_limit: Option<i32>Rate limit in requests per minute.
Trait Implementations§
Source§impl Clone for CreateKeyRequest
impl Clone for CreateKeyRequest
Source§fn clone(&self) -> CreateKeyRequest
fn clone(&self) -> CreateKeyRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateKeyRequest
impl Debug for CreateKeyRequest
Source§impl Default for CreateKeyRequest
impl Default for CreateKeyRequest
Source§fn default() -> CreateKeyRequest
fn default() -> CreateKeyRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreateKeyRequest
impl RefUnwindSafe for CreateKeyRequest
impl Send for CreateKeyRequest
impl Sync for CreateKeyRequest
impl Unpin for CreateKeyRequest
impl UnsafeUnpin for CreateKeyRequest
impl UnwindSafe for CreateKeyRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more