> [!WARNING]
>
> **Preview**
>
>
> This product is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
> [Service Specific
> Terms](https://docs.cloud.google.com/terms/service-terms#1).
>
> Pre-GA products are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).

To use App Optimize API, you must enable it in the Google Cloud project
where you intend to create and manage your usage and cost report resources.
You can enable the API using the Google Cloud console or the Google Cloud CLI.

## Before you begin

## Enable the API

To enable App Optimize API, follow one of these sets of instructions:

### Console

1. In the Google Cloud console, go to the **API Library**.

   [Go to the API Library](https://console.cloud.google.com/apis/library/appoptimize.googleapis.com)
2. If prompted, select your Google Cloud project.

3. On the App Optimize API page, click **Enable**.

### gcloud

1. Install and initialize the [Google Cloud CLI](https://docs.cloud.google.com/sdk/docs/install-sdk).
2. To enable the App Optimize API, run the following command:

       gcloud services enable appoptimize.googleapis.com --project=PROJECT_ID

   Replace `PROJECT_ID` with your Google Cloud project ID.

## Verify that the API is enabled

To check that App Optimize API is enabled, follow one of these sets
of instructions:

### Console

1. In the Google Cloud console, go to the **Enabled APIs \& services** page.

   [Go to Enabled APIs \& services](https://console.cloud.google.com/apis/enabled)
2. In the list, find and confirm that **App Optimize API** is listed.

### gcloud

1. Run the following command:

       gcloud services list --enabled --project=PROJECT_ID --filter="NAME:appoptimize.googleapis.com"

2. If the API is enabled, the output includes:

       NAME                        TITLE
       appoptimize.googleapis.com  App Optimize API

## What's next

- [Quickstart: Create and read a report](https://docs.cloud.google.com/app-optimize/create-read-report)
- [Authentication set up](https://docs.cloud.google.com/docs/authentication)
- [Access control with IAM](https://docs.cloud.google.com/app-optimize/access-control)
- [App Optimize API overview](https://docs.cloud.google.com/app-optimize/overview)