---
name: watsonx-code-assistant-wcaz-tokens
title: Understanding IBM Cloud subscriptions and resource units for watsonx Code Assistant for Z
description: The watsonx Code Assistant cloud service works on a subscription basis. Learn about the relationship among your subscription, resource units, and tokens.
last-updated: 2025-01-08
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/watsonx-code-assistant?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Understanding IBM Cloud subscriptions and resource units for watsonx Code Assistant for Z
{: #wcaz-tokenz}

[watsonx Code Assistant for Z]{: tag-dark-teal}

The watsonx Code Assistant cloud service works on a subscription basis. Learn about the relationship among your subscription, resource units, and tokens.
{: shortdesc}

In generative AI, tokens are discrete pieces of data that, for language or code, can be a word, a character, or even a phrase (or sequence of words or characters). The models that underlie generative AI solutions predict content based on an understanding of context (which are previous tokens). When you query a model, it uses a number of tokens to accurately generate a response to your query.

When you use the [IBM watsonx Code Assistant for Z catalog page](https://cloud.ibm.com/catalog/services/ibm-watsonx-code-assistant){: external}, what you're purchasing is entitlement to a number of resource units in your IBM Cloud subscription. Each resource unit is equal to 150,000 tokens. For watsonx Code Assistant for Z, COBOL applications require approximately 20-30 tokens per line of code. That value might vary depending on the application. Your tokens yield approximately 5000-7000 lines of code. That number can vary because the number of tokens that are required to generate a good response varies. When you run out of tokens, you can renew your contract to refill your credits.

Your IBM Cloud subscription credits don't expire and you can use them on any service instead of, or in addition to, watsonx Code Assistant for Z. Resource units are tied to usage, not time. When you run out, you can resubscribe by renewing your contract.
{: important}