Skip to main content

ensure_api_key_for_large_file

Function ensure_api_key_for_large_file 

Source
pub fn ensure_api_key_for_large_file(
    file_size: u64,
    config: &CliConfig,
) -> Result<()>
Expand description

Check if a file exceeds the free tier limit and require API key if so

Returns Ok(()) if:

  • File is under 1GB (no API key required)
  • File is over 1GB AND API key is configured with valid paid plan

Returns error if file is over 1GB and no API key/paid plan