# ASCII Key (AsciiPkGenerator)

The [ASCII Key](/app/generation/generators/generator-reference/ascii-key.md) generator can be applied to primary key columns. It generates unique alphanumeric strings based on any printable ASCII characters.

## Link object structure <a href="#generator-api-ascii-key-link-object" id="generator-api-ascii-key-link-object"></a>

The ASCII Key generator can be configured to be self-consistent, but not consistent with another column. You cannot configure differential privacy.

The `metadata` object is populated from the [`BaseMetadata`](https://app.tonic.ai/apidocs/index.html#/models/BaseMetadata) object.

There is no generator-specific configuration.

<pre class="language-json"><code class="lang-json">{
  "schema": "string",
  "table": "string",
  "column": "string",
  "path": "string",  //JSON fields only
  "dataType": "string",  //MongoDB, Amazon DynamoDB, and JSON fields only
  "metadata": {
    "presetId": "string",
    "generatorId": "AsciiPkGenerator",
    "excludeLowercaseAlphabet": boolean,
<strong>    "isConsistent": boolean,
</strong>    "encryptionProcessor": "x-on", //To use configured Structural data encryption
    "customValueProcessor": "string"   //If custom value processor applied
  }
}
</code></pre>

## Example replacement <a href="#generator-api-ascii-key-replacement" id="generator-api-ascii-key-replacement"></a>

In the following example replacement for the ASCII Key generator, consistency is disabled. The output values do not include lowercase letters.

```json
{
  "name": "userid",
  "schema": "test",
  "table": "users",
  "links": [
    {
      "schema": "test",
      "table": "users",
      "column": "userid",
      "metadata": {
        "presetId": "AsciiPkGenerator",
        "generatorId": "AsciiPkGenerator",
        "excludeLowercaseAlphabet": true,
        "isConsistent": false
      }
    }
  ]
}
```


---

# 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.tonic.ai/app/api/quick-start-guide/tonic-api-generator-assignment/generator-api-reference/generator-api-ref-ascii-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.
