# Extract Your Private Key

Peeringhub.io allows you to generat as many Private Key as you want.  You can generate different Stir/Shaken certificate and each certificate is generated with different Private Key.

## Create a new user

<mark style="color:green;">`GET`</mark> [/api/service\_provider/sti\_priv\_key/file/{priv\_key\_uuid}](https://api.peeringhub.io/api-doc/#/Service%20Provider/ServiceProviderController_getStiKeyFile)

This API will let you download your Private Key file.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

| Name            | Type   | Description      |
| --------------- | ------ | ---------------- |
| priv\_key\_uuid | string | Private Key UUID |

**Example**

{% code overflow="wrap" %}

```
curl -X 'GET' \
  'https://api.peeringhub.io/api/service_provider/sti_priv_key/file/c021xxxx-dc4-4dff-8016-756xxxx9' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXJ2aWNlX3Byb3ZpZGVyX3V1aWQiOiIzZTIwMTk4ZC'
```

{% endcode %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
 access-control-allow-origin: * 
 connection: keep-alive 
 content-disposition: inline;filename="818H_1747257159636_private_key.pem" 
 content-type: application/octet-stream 
 date: Wed,14 May 2025 21:42:26 GMT 
 server: nginx/1.14.1 
 transfer-encoding: chunked 
 x-powered-by: Express 
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.peeringhub.io/guides/peeringhub-sti-api/extract-your-private-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
