How to use multiple Pika accounts

For your convenience, you can save your Pika account(s) configuration, eliminating the need to provide them with every API call. Simply POST your account(s) configuration using the pika/account/channel endpoint.

You may configure as many Discord/Pika accounts as desired. If more than one account is configured under pika/account, the API will retrieve a list of available accounts, determine which have the capacity to execute the job, and randomly select an available account, thereby effectively acting as a load balancer.

To take advantage of saved configurations and account load balancing, please follow these simple steps:

  • Gather your Pika account(s) information as outlined at Setup Pika.
  • Post your configuration(s) using the pika/account/channel endpoint.
  • You can then start making API calls without specifying the discord and channel values for every call.

To see all your currently configured Pika accounts, please use the pika/account endpoint.

Wait there’s more…

What if you want to use multiple Pika accounts but prefer to implement your own tracking and load balancing logic? Good news – that’s still possible! Just continue to provide the discord, channel, and maxJobs values with each call, and our API will take care of the rest, ensuring proper operation. This is possible our API tracks job executions under the same channel. The downside of this approach is that it now becomes your responsibility to determine which account (channel) should be used for the next call. However, we suppose this might be precisely what you want in certain situations, so we’ve kept this option available.

Feel free to reach out to us if you have any questions or concerns.