title: IAM permission issue with Batch Translation: PermissionDenied: 403 Cloud IAM permission 'cloudtranslate.generalModels.batchPredict' denied
body: <p>This is my first time running google batch translation, I usually run the API translation, but this time my file size is too large to be translated that way.</p>
  <p>I tried to run the following script but I get the permission error below and I am not sure how to move forward. Any help is much appreciated..</p>
  <pre><code>from google.cloud import translate
  
  os.environ[&quot;GOOGLE_APPLICATION_CREDENTIALS&quot;]= r&quot;C:\Users\..my_path..\cred.json&quot;
  # translate_client = translate.Client()
  
  def batch_translate_text(
      input_uri=&quot;gs://....&quot;,
      output_uri=&quot;gs://....&quot;,
      project_id=&quot;....&quot;,
      timeout=180):
      &quot;&quot;&quot;Translates a batch of texts on GCS and stores the result in a GCS location.&quot;&quot;&quot;
  
      client = translate.TranslationServiceClient()
  
      location = &quot;us-central1&quot;
      # Supported file types: https://cloud.google.com/translate/docs/supported-formats
      gcs_source = {&quot;input_uri&quot;: input_uri}
  
      input_configs_element = {
          &quot;gcs_source&quot;: gcs_source,
          &quot;mime_type&quot;: &quot;text/plain&quot;,  # Can be &quot;text/plain&quot; or &quot;text/html&quot;.
      }
      gcs_destination = {&quot;output_uri_prefix&quot;: output_uri}
      output_config = {&quot;gcs_destination&quot;: gcs_destination}
      parent = f&quot;projects/{project_id}/locations/{location}&quot;
  
      # Supported language codes: https://cloud.google.com/translate/docs/language
      operation = client.batch_translate_text(
          request={
              &quot;parent&quot;: parent,
              &quot;source_language_code&quot;: &quot;zh-CN&quot;,
              &quot;target_language_codes&quot;: [&quot;en&quot;],  # Up to 10 language codes here.
              &quot;input_configs&quot;: [input_configs_element],
              &quot;output_config&quot;: output_config,
          }
      )
  
      print(&quot;Waiting for operation to complete...&quot;)
      response = operation.result(timeout)
  
      print(&quot;Total Characters: {}&quot;.format(response.total_characters))
      print(&quot;Translated Characters: {}&quot;.format(response.translated_characters))
  
  batch_translate_text()
  </code></pre>
  <p>PermissionDenied: 403 Cloud IAM permission 'cloudtranslate.generalModels.batchPredict' denied.</p>