def METHOD_NAME(
    *,
    session: Session,
    description: str,
    frontend_type: str,
    trusted: bool | None = False,
    admin_email: str | None = None,
    api_key: str | None = None,
    force_id: Optional[UUID] = None,
) -> ApiClient:
    if api_key is None:
        api_key = token_hex(32)
    logger.info(f"Creating new api client with {api_key=}")
    api_client = ApiClient(
        api_key=api_key,
        description=description,
        frontend_type=frontend_type,
        trusted=trusted,
        admin_email=admin_email,
    )
    if force_id:
        api_client.id = force_id
    session.add(api_client)
    session.commit()
    session.refresh(api_client)
    return api_client