# How to integrate RouterLink in a self-hosted environment

**Step1:** Go to the model details page and find the Integration Guide field.

**Step2: Click the "Copy" button** on the right under Integration Guide to copy the Endpoint and Python code (This operation uses GPT-5.2 as an example).

<figure><img src="/files/YlunIph37HcjXqii2IgV" alt=""><figcaption></figcaption></figure>

**Step3:** Open a program on your computer that can run Python code (e.g., Cursor, VS Code, PyCharm). This example uses PyCharm.

**Step4:** Paste the **copied Endpoint** and **Python code** into PyCharm.

**Step5:** Replace the content of the field api\_key="\<ROUTER\_LINK\_API\_KEY>" with the previously generated API Key, as shown in the image below.

<figure><img src="https://docs.world3.ai/world3/~gitbook/image?url=https%3A%2F%2F1299308320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fz14Y82ikqf3KozqsiU9D%252Fuploads%252FTiZRYvRIeDLnRZmuEoBQ%252Fimage.png%3Falt%3Dmedia%26token%3D2062fd0b-359a-4272-a94a-2f4592d2e36b&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=7fb8954d&#x26;sv=2" alt=""><figcaption></figcaption></figure>

**Step6:** Right-click the screen and select the "Run filename" button to run the Python code.

<figure><img src="https://docs.world3.ai/world3/~gitbook/image?url=https%3A%2F%2F1299308320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fz14Y82ikqf3KozqsiU9D%252Fuploads%252FX5HXMzDwIvvKsrE0xJEo%252Fimage.png%3Falt%3Dmedia%26token%3D6d8ad5d3-4ed3-4675-ad41-2dfb07fb7d21&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=3156f885&#x26;sv=2" alt=""><figcaption></figcaption></figure>

**Step7:** View the output on the console.

<figure><img src="https://docs.world3.ai/world3/~gitbook/image?url=https%3A%2F%2F1299308320-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Fz14Y82ikqf3KozqsiU9D%252Fuploads%252FdoOx8yCWhyslXUWWQecK%252Fimage.png%3Falt%3Dmedia%26token%3D639ddb19-5f72-4320-ac0b-f99989800ff8&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=4e4b2857&#x26;sv=2" alt=""><figcaption></figcaption></figure>

**Note:** This operation is relatively simple and suitable for users with Python development experience. It is mainly used to quickly verify whether the RouterLink API is configured successfully, or to integrate it into existing backend services, scripts, or automated tasks.


---

# 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.world3.ai/world3/how-to-guides/routerlink/tutorials/how-to-integrate-routerlink-in-a-self-hosted-environment.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.
