> For the complete documentation index, see [llms.txt](https://docs.takionapi.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.takionapi.tech/pxhc/examples.md).

# Example Implementations

{% tabs %}
{% tab title="Simple Generation" %}

```python
import requests

API_KEY = "TAKION_API_XXXX"  # YOUR API KEY

url = "https://px-mobile.takionapi.tech/generate"

querystring = {"api_key": API_KEY}

payload = {
    "package_name": "com.enflick.android.TextNow",
    "manufacturer": "samsung",
    "continent": "america"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.request(
    "POST", url, json=payload, headers=headers, params=querystring)

print(response.text)
```

{% endtab %}

{% tab title="My B\&B" %}

```python
import requests

API_KEY = "TAKION_API_XXXX"

url = "https://api.bbw.com/payments/v2/giftcard"

payload = {
    "lbCustomerID": "abyQtuW2FurvCkyKA3h2cLxUMh",
    "email": "xxx@gmail.com",
    "brand": "BBW",
}


def send_request_without_headers():
    headers = {
        "accept-language": "it-IT,it;q=0.9",
        "accept-charset": "UTF-8",
        "accept": "*/*",
        "content-type": "application/json",
    }
    response = requests.post(
        url,
        json=payload,
        headers=headers
    )
    print(
        f"Response without headers: {response.status_code} / {response.text}")


def send_request_with_headers():
    px_headers = requests.post(
        "https://px-mobile.takionapi.tech/generate",
        json={"package_name": "com.bathandbody.bbw", "manufacturer": "samsung"},
        params={"api_key": API_KEY}
    ).json()
    headers = {
        "accept-language": "it-IT,it;q=0.9",
        "accept-charset": "UTF-8",
        "accept": "*/*",
        "content-type": "application/json",
    } | px_headers
    print(px_headers)
    exit(0)
    response = requests.post(
        url,
        json=payload,
        headers=headers
    )
    print(f"Response with headers: {response.status_code} / {response.text}")


if __name__ == "__main__":
    send_request_without_headers()
    print(" -------------------- ")
    send_request_with_headers()
```

{% endtab %}
{% endtabs %}
