> For the complete documentation index, see [llms.txt](https://docs.gooey.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gooey.ai/tools/evaluations/how-to-use-bulk-run-via-api.md).

# How to use Bulk Run via API

### Step 1

* Run the TTS models you want to test on the UI.
* Copy the links of the test runs

<figure><img src="https://662560811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5BFP5RUm6rTLXk8wUSTf%2Fuploads%2FqrVehDiZLOyxs7RnjQUA%2FBULK-RUN-API.jpg?alt=media&amp;token=2fb8d3b8-6bd4-4809-a1eb-c813ad6174b0" alt=""><figcaption></figcaption></figure>

### Step 2

* Open Gooey.AI bulk
* Head to the API tab
* Click on the “curl” tab

<figure><img src="https://662560811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5BFP5RUm6rTLXk8wUSTf%2Fuploads%2FFKEcnd9iZfqKHG72QDqN%2FBULK-RUN-API%20(1).jpg?alt=media&amp;token=96c0c223-705d-437e-9d48-916fdc628c90" alt=""><figcaption></figcaption></figure>

EXAMPLE:

{% embed url="<https://gooey.ai/bulk/compare-swahili-speech-recognition-ehrfs6a0yukt/api/>" %}

### Step 3

* Add your CSV/google sheet in the documents section (see a screenshot of the CSV example below)
* Add your run URLs in the run\_urls section.
* Point to the correct column for the input in input\_columns

```sh
curl 'https://api.gooey.ai/v2/bulk-runner?example_id=ehrfs6a0yukt' \
  -H "Authorization: bearer $GOOEY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "documents": [
    "https://docs.google.com/spreadsheets/d/1EsQ_NKhyNikNNO3xLV9GOc6C5LTflu9dJ5CSpHqNUQs/edit?gid=0#gid=0"
  ],
  "run_urls": [
   "https://gooey.ai/compare-text-to-speech-engines/?run_id=todlwvm01l31&uid=fm165fOmucZlpa5YHupPBdcvDR02",
   "https://gooey.ai/compare-text-to-speech-engines/?run_id=j8v9fqrfl26o&uid=fm165fOmucZlpa5YHupPBdcvDR02",
    ],
  "input_columns": {
    "text_prompt": "Column Name"
  },
  "output_columns": {
    "price": "Price",
    "run_url": "Run URL",
    "run_time": "Run Time",
    "output_text": "Output Text",
    "raw_output_text": "Raw Output Text"
  }
}'
```

<figure><img src="https://662560811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5BFP5RUm6rTLXk8wUSTf%2Fuploads%2FwMBEiq2gUrRmMdlXcw1b%2FScreenshot%202025-01-28%20at%202.23.00%E2%80%AFPM.png?alt=media&amp;token=c92039cf-c77f-4c85-a136-1f9ab12b1c53" alt=""><figcaption></figcaption></figure>

### How can I calculate the credits?

<figure><img src="https://662560811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5BFP5RUm6rTLXk8wUSTf%2Fuploads%2FQg22FxvNHeaVhWTkjXDW%2FBULK-RUN-API%20(2).jpg?alt=media&amp;token=840ae618-6c0e-4c72-8b3f-3da7757c15ca" alt=""><figcaption></figcaption></figure>

* Please check the credit per run in the sample run you run for your bulk run.
* This should be the average cost per run.
* Since you are running Bulk API, you can also check the credits for every run by adding `"price": "Price"` in the `"output_columns"` section
