For the complete documentation index, see llms.txt. This page is also available as Markdown.

Instantiating the SDK client

Whenever you call the Textual Python SDK, you first instantiate the SDK client.

To redact individual files, or to work with Textual datasets, you instantiate TonicTextual.

Instantiating when the API key is already configured

If the API key is configured as the value of the environment variable TONIC_TEXTUAL_API_KEY, then you do not need to provide the API key when you instantiate the SDK client.

For Textual datasets, or to use the redact method:

from tonic_textual.redact_api import TextualNer
# The default URL is https://textual.tonic.ai (Textual Cloud)
# If you host Textual, provide your Textual URL
textual = TextualNer()

Instantiating when the API key is not configured

If the API key is not configured as the value of the environment variable TONIC_TEXTUAL_API_KEY, then you must include the API key in the request.

For Textual datasets, or to use the redact method:

from tonic_textual.redact_api import TonicTextual
api_key = "your-tonic-textual-api-key"
# The default URL is https://textual.tonic.ai (Textual Cloud)
# If you host Textual, provide your Textual URL
textual = TonicTextual(api_key=api_key)

Last updated

Was this helpful?