Set Hardware Concurrency from API

  • Created

Kameleo aims to emulate browser environments as accurately as possible. A significant part of this realism comes from matching the hardware concurrency of emulated profiles with those of typical user devices. For instance, if most users have CPUs with 4 to 8 logical cores, Kameleo profiles should reflect similar hardware concurrency values. This matching helps the profiles blend in naturally with regular user patterns, avoiding suspicion.

In this article we are going to show you how to set the Hardware Concurrency settings during the creation of your virtual browser profile through the Local API Clients.

Concept

During the CreateProfileRequest

POST /profiles/new

you can pass the CreateProfileRequest object that has a HardwareConcurrencySpoofingType property. This can be used to set up Hardware Concurrency. Possible values are:

  • Automatic: Use the Hardware Concurrency value from the fingerprint for consistency.
  • Manual: Set a custom Hardware Concurrency value to customize the profile further.
  • Off: Use your device's unmasked HardWare Concurrency value for a more authentic profile.

We suggest you to either the "Automatic" or "Off" setting seeing how they provide a more authentic experience. To set the Hardware Concurrency type, use the HardwareConcurrency method in the Local API Clients. Below you can find the examples for Javascript and Python:

Examples

  • @type {import('@kameleo/local-api-client').CreateProfileRequest} */
    const createProfileRequest = {
      fingerprintId: chromeBaseProfileList[0].id,
      hardwareConcurrency: {
        value: 'manual',  // Options: 'automatic', 'manual', 'off'
        extra: 8          // Valid values: 1, 2, 4, 8, 12, 16 (when 'manual' is selected)
      }
    };
    
    const profile = await client.profile.createProfile(createProfileRequest);
  • from kameleo.local_api_client.models import CreateProfileRequest
    from kameleo.local_api_client.models.hardware_concurrency_choice import HardwareConcurrencyChoice
    
    create_profile_request = CreateProfileRequest(
        fingerprint_id=fingerprints[0].id,
        hardware_concurrency=HardwareConcurrencyChoice(
            value='manual',
            extra=16 # Valid values: 1, 2, 4, 8, 12, 16 (when 'manual' is selected)
        )
    )
    
    profile = client.profile.create_profile(create_profile_request)

Was this article helpful?

0 out of 0 found this helpful