To create your personal API token on the CircleCI server, go to "User Settings" and then to "Personal API Tokens".
Now, you just have to click on "Create New Token" and give it a name. Copy the API token displayed on the screen.
CircleCI Server 4.x
CircleCI Server 3.x