# How-To: Create User Access Token

* **Workload-Specific**: Tokens created are specific to one user and one workload. Unassigned tokens can be linked to a workload later.
* **Expiration**: Tokens are valid for 30 days and must be renewed upon expiration.
* **Token Management**: After creation, tokens can be updated, or reassigned, or their status (active/cancelled) can be changed as needed.

{% tabs %}
{% tab title="🌐 Console - For a Specific Model" %}
Follow these steps to create a token for a specific model through the LatticaAI web console:

<figure><img src="/files/5EtHvRswNCVcA1V4AELM" alt=""><figcaption><p>Create Token Flow</p></figcaption></figure>

{% stepper %}
{% step %}

### Navigate to Workload's Token Management

Go to the **Token Management** section of the specific Workload on the dashboard.
{% endstep %}

{% step %}

### Create a New Token

* Click **Create Token**.
* Enter a **name** for the token for easy identification.
* Specify the **Workload** to which the token will be linked.

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><em>Optional</em>: Leave the workload field empty if you want to create an unassigned token.</p></div>

{% endstep %}

{% step %}

### Generate

Click **Generate** to generate the token.\
The new token will appear in the list, where you can manage its attributes, status, or assignment.
{% endstep %}

{% step %}

### Copy the Token Value

After the token is generated, the system displays the token value. Copy this token value for future use.&#x20;

{% hint style="warning" %}
The token is not stored in the system and cannot be retrieved later.
{% endhint %}
{% endstep %}

{% step %}

### Review and Confirm

* Verify all token details.
* Click **Done** to save the token.
  {% endstep %}

{% step %}

### Delete if Incorrect

If the token details were entered incorrectly, click **Delete** to remove the token and start the process again.
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="🌐 Console - From the Tokens List Page" %}
You can create tokens directly from the **Tokens List** page. This process is useful for creating unassigned tokens or managing tokens centrally.

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

1. **Navigate to the Tokens Page**\
   Log in to the web console and go to the **Tokens** section.
2. **Click "Add Token"**
   * Click the **Add Token** button to open the token creation window.
   * Fill in the token details
     * &#x20;Note: The end user cannot use unassigned tokens until they are linked to a model.
3. **Generate the Token**\
   Click **Generate Token** to create the token.
4. **Copy the Token Value**
   * After the token is generated, the system displays the token value.
   * **Important**: Copy this token value for future use. The token is not stored in the system and cannot be retrieved later.
5. **Review and Confirm**
   * Verify all token details.
   * Click **Done** to save the token.
6. **Delete if Incorrect**
   * If the token details were entered incorrectly, click **Delete** to remove the token and start the process again.
     {% endtab %}

{% tab title="🧊 Python SDK" %}
{% hint style="info" %}
Keep the generated token in a secure place!
{% endhint %}

```python
# Generate Token

import LatticaManagement

# Authenticate
lattica = LatticaManagement("your_license_from_lattica_console")

# Register a new model...
model_id = lattica.create_model("model_name")

# Generate a token
token_id, token = lattica.generate_query_token(model_id, "token_name")

```

{% 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://platformdocs.lattica.ai/how-to-guides/access-control/how-to-create-user-access-token.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.
