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 setHardwareConcurrencymethod in the Local API Clients. Below you can find the examples for Javascript and Python:

Examples

  • const createProfileRequest = BuilderForCreateProfile
      .forBaseProfile(chromeBaseProfileList[0].id)
      .setRecommendedDefaults()
      .setHardwareConcurrency('manual', 8) # Valid values: 1, 2, 4, 8, 12, 16.
      .build();
    const profile = await client.createProfile({ body: createProfileRequest });
  • create_profile_request = BuilderForCreateProfile \
      .for_base_profile(base_profiles[0].id) \
      .set_recommended_defaults() \
      .set_hardware_concurrency('manual', 8) \ # Valid values: 1, 2, 4, 8, 12, 16.
      .build()
    profile = client.create_profile(body=create_profile_request)

For your convenience, this functionality is provided by the Python Builder and JavaScript Builder for Profile Creation in the Local API Clients.

Was this article helpful?

0 out of 0 found this helpful