> ## Documentation Index
> Fetch the complete documentation index at: https://magicads.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GCP Storage Integration

> Offload your media inputs and results to Google Cloud Buckets

## Introduction

Davinci AI’s allows you to integrate cloud storages to store results of various media related features of the script. This allows you to make sure that you always have sufficent storage space for your customers.
Using cloud storage option also minimizes the latency for your user to access their media results as data could be avaiable via CDN framework of the cloud vendors.

## Connect GCP Account

To be able to use your GCP Bucket, follow these steps to setup integration.

<Steps>
  <Step title="Step 1">
    Go to the [Google Cloud Platform](https://cloud.google.com/) page, and get yourself registered in case if you don't have an account already.
  </Step>

  <Step title="Step 2">
    Once you are logged into your GCP account, click on the **New Project** button on the top left corner, and provide **project name** as you prefer.

    <img src="https://mintcdn.com/magicads/sOSxKmkB3A1LT8Q_/images/ai/google/gcp-1.png?fit=max&auto=format&n=sOSxKmkB3A1LT8Q_&q=85&s=0378672fbe4e470d1dd41b0e98e9d67a" width="602" height="484" data-path="images/ai/google/gcp-1.png" />
  </Step>

  <Step title="Step 3">
    Next, search for **storage** keyword and select **Cloud Storage** from the list.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-storage-1.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=8522ffb31335d5e8be4af2a0de6ebe5b" width="1019" height="602" data-path="images/storage/gcp/gcp-storage-1.png" />
  </Step>

  <Step title="Step 4">
    Within the **Storage** service click on **Create Bucket**

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-storage-2.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=382b940a227ee153345abbfd5b985604" width="637" height="257" data-path="images/storage/gcp/gcp-storage-2.png" />
  </Step>

  <Step title="Step 5">
    Specify bucket name as needed and click **Create Bucket**. Provide unique bucket name. (it must be globally unique, hence you might want to add random digits/letters if needed)

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-storage-3.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=2473853a5ab4fdf407f6da7e9bb42f38" width="836" height="676" data-path="images/storage/gcp/gcp-storage-3.png" />
  </Step>

  <Step title="Step 6">
    For the next step select Region

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-storage-4.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=435a0d518d525c66e7c2f7ee7c4221e1" width="830" height="591" data-path="images/storage/gcp/gcp-storage-4.png" />
  </Step>

  <Step title="Step 7">
    For the next step select Standard, or if you are familar with GCP storage types you can select alternate options as well as needed

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-storage-5.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=bb4e41e6857adeaca99c72bb6e855c11" width="863" height="649" data-path="images/storage/gcp/gcp-storage-5.png" />
  </Step>

  <Step title="Step 8">
    Set versioning and encryption as needed or leave it with default values.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-storage-6.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=b9db73eec8c43201c13a6952a7aa9144" width="987" height="799" data-path="images/storage/gcp/gcp-storage-6.png" />
  </Step>

  <Step title="Step 9">
    Select Fine Grained for access control.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-storage-7.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=babb6d76168eca9bdf26646607da4a4c" width="926" height="747" data-path="images/storage/gcp/gcp-storage-7.png" />
  </Step>

  <Step title="Step 10">
    Now when your bucket is successfully created you need to provide access to that. For that we need to create a Role. Go to IAM & Admin and select Roles

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/role-1.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=4b230662e4821eaa01c23e6f34e3ba15" width="484" height="871" data-path="images/storage/gcp/role-1.png" />
  </Step>

  <Step title="Step 11">
    Click on Create Role

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/role-2.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=2ee9922c67695d8878a8d9bdfa7344bc" width="956" height="305" data-path="images/storage/gcp/role-2.png" />
  </Step>

  <Step title="Step 12">
    Provide a Role Title to be able to identify it later.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/role-3.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=a320318f439c9019f4891bdb9ece8540" width="646" height="566" data-path="images/storage/gcp/role-3.png" />
  </Step>

  <Step title="Step 13">
    Click on Add Permissions.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/role-3.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=a320318f439c9019f4891bdb9ece8540" width="646" height="566" data-path="images/storage/gcp/role-3.png" />
  </Step>

  <Step title="Step 14">
    Search by keyword storage and select storage.bucket.list.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/role-4.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=e06554033ac0ddfee28b143b88d5ef15" width="590" height="672" data-path="images/storage/gcp/role-4.png" />
  </Step>

  <Step title="Step 15">
    Also select following object level permissions as well as shown in the image.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/role-5.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=36cbf3b5d955a4143755c3b06a71e1af" width="586" height="661" data-path="images/storage/gcp/role-5.png" />
  </Step>

  <Step title="Step 16">
    Final result should look like in the image and click Create.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/role-6.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=9bf5d91e8ce6a917325d7e2f0b51f782" width="589" height="670" data-path="images/storage/gcp/role-6.png" />
  </Step>

  <Step title="Step 17">
    Now you need to create Create Service Credentials. Go to API & Credentials and click on Create Credentials

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-7.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=e22270a58977ec90af141f839555d153" width="704" height="425" data-path="images/storage/gcp/gcp-7.png" />
  </Step>

  <Step title="Step 18">
    Click on + Create Credentials and select Service account from the list.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-5.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=32cbd1d9fa200f44648b9e9bbfb64b27" width="895" height="454" data-path="images/storage/gcp/gcp-5.png" />
  </Step>

  <Step title="Step 19">
    1 - Provide Service account name and Service account description (optional).

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-6.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=ce93623bd697824f87eb391cca6a762c" width="589" height="557" data-path="images/storage/gcp/gcp-6.png" />
  </Step>

  <Step title="Step 20">
    2 - Click on Select a Role and find your role that you created previously to access GCP Storage Bucket.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-8.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=4343e9bebfa6592310c6e52a7df928c2" width="855" height="521" data-path="images/storage/gcp/gcp-8.png" />
  </Step>

  <Step title="Step 21">
    3 - You can leave this step with defaults unless you want to add addtional user(s) and click Done.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/role-9.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=95f175072c32ea6b990c0956e211c609" width="875" height="604" data-path="images/storage/gcp/role-9.png" />
  </Step>

  <Step title="Step 22">
    Select your newly created Service Account, under Actions tab select Manage Keys.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/key-1.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=ac388b81287cc3e285979b7261e2ae36" width="1674" height="538" data-path="images/storage/gcp/key-1.png" />
  </Step>

  <Step title="Step 23">
    Under Keys tab, select Add Key -> Create new key.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-8.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=4343e9bebfa6592310c6e52a7df928c2" width="855" height="521" data-path="images/storage/gcp/gcp-8.png" />
  </Step>

  <Step title="Step 24">
    Select JSON as key type. Click Create, it will store in on your desktop.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/gcp-9.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=077898328df4719fdfe39caa289e30d3" width="595" height="375" data-path="images/storage/gcp/gcp-9.png" />
  </Step>

  <Step title="Step 25">
    Now, Login to Davinci AI using your admin credentials.
  </Step>

  <Step title="Step 26">
    In **Admin Panel**, navigate to **AI Settings** -> **AI API Keys** tab.
  </Step>

  <Step title="Step 27">
    Click on **Google** tab there.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/google.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=023ac3e1ef176a237fff74721c81b74a" width="519" height="100" data-path="images/storage/gcp/google.png" />
  </Step>

  <Step title="Step 28">
    Include the path for the json file and your GCP bucket name. JSON file must be stored outside of your Public folder. Show full path for the JSON file including JSON filename based on your hosting file structure. Here is an example for cPanel: '/home/username/public\_html/gcpjsonfilename.json'. Click save button afterwards.

    <img src="https://mintcdn.com/magicads/srGibq66qvweFJdz/images/storage/gcp/google-2.png?fit=max&auto=format&n=srGibq66qvweFJdz&q=85&s=ef66412cc733523f1b0dd2708eb2db88" width="681" height="279" data-path="images/storage/gcp/google-2.png" />
  </Step>
</Steps>

<Check>
  Congratulations! You have successfully comleted the Google Cloud Bucket setup process.
</Check>

## Davinci AI Tools which supports storing results in GCP Bucket

Following AI tools can be store results in Google Cloud Storage
<Note>Support for more AI tools will be added soon, we are actively working on that</Note>

1. **AI Voiceover**
2. **AI Images**
3. **AI Speech to Text**

<Info>Via AI Settings page in Admin Panel, you can set default cloud storage vendor for each of the supported AI tools individually</Info>
