# 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 %}


---

# 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://docs.takionapi.tech/px-mobile/examples.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.
