Skip to main content

Bruno collection guide

๐Ÿ“˜ Overviewโ€‹

This document provides a step-by-step guide for uploading a file, processing it, and retrieving the results using the API with Bruno.


โœ… Prerequisitesโ€‹

To use these collections, you will need:


๐Ÿงฉ Setupโ€‹

1๏ธโƒฃ Import the Collectionโ€‹

  1. Open Bruno
  2. Select "Collections"
  3. Click "Import" (from the "3 dots menu", and select "Bruno Collection")
  4. Import the file: CIN-PROD_Bruno.json
  5. CIN collection should be visible in Bruno

3๏ธโƒฃ Select the Environmentโ€‹

  • In the top-right corner, select the environment: CIN

๐Ÿ” Authentication , health check & available actionsโ€‹

4๏ธโƒฃ Check API Healthโ€‹

  1. Send the HealthCheck request (GET)
    โœ… Expected response: 200 OK with:
"Healthy"

5๏ธโƒฃ Set Your Credentialsโ€‹

  1. Open the Authorize request (POST)
  2. Go to the Body tab
  3. Set the following keys and values:
    • client_id: your client ID
    • client_secret: your client secret

6๏ธโƒฃ Authenticate & check available actionsโ€‹

  1. Run the Authorize request again (POST)
    โœ… Response: 200 OK
    ๐Ÿง  The token is automatically stored as environment variable โ€” no need to copy it manually
  2. Trigger "Retrieve available actions" request to get available actions (it will also check if authorization worked properly)
    โœ… Response: 200 OK eg:
[
"image-description",
"image-metadata-generation",
"text-classification",
"text-summarization",
"image-classification",
"image-embeddings",
"text-embeddings",
"named-entity-recognition-image",
"named-entity-recognition-text"
]

๐Ÿ“ค File Uploadโ€‹

7๏ธโƒฃ Generate a Presigned URLโ€‹

Currently we support only .jpg, .png files for images and .pdf for documents

  1. Use the PresignedUrl request (GET)
  2. In the Params, specify the file type using the contentType key
    Image Example: contentType = image%2Fjpg
    Document Example: contentType = application%2Fpdf

๐Ÿ”— You can find a list of supported file types at: Technical information

โœ… On success (200 OK), the response will contain:

  • presignedUrl โ€“ ๐Ÿ“‹ Copy this value; you'll need it in the next step
  • objectKey โ€“ ๐Ÿ“‹ Copy this value; you'll need it for "Execute the Action" step 9

8๏ธโƒฃ Upload the Fileโ€‹

  1. Download FileUpload.ps1 script (it`s a PowerShell script)
  2. Press Windows + S and type PowerShell.
  3. Right-click Windows PowerShell and choose "Run as Administrator" (optional, but safer for permissions).
  4. Type the following to go to your Downloads folder: cd "C:\Path\To\Your\File" - or other location if file was downloaded somewhere else.
  5. Run the Script - To run the script while bypassing any restrictions :
    type: powershell -ExecutionPolicy Bypass -File .\FileUpload.ps1
    5.1 Provide path to the file that you want to upload when asked about FilePath: (if path is copied to the Windows clipboard, just click "right mouse button" in the PowerShell window)
    5.2 Provide presignedUrl from the step 7 when asked for PresignedUrl: (if path is copied to the Windows clipboard, just click "right mouse button" in the PowerShell window)
  6. Hit enter

โœ… Response should be: 200 OK

Upload successful!
File: C:\Path\To\Your\File
Response Status: 200

Alternative option - run script with parameters

powershell -ExecutionPolicy Bypass -File .\FileUpload.ps1 -FilePath C:\Path\To\Your\File -PresignedUrl https://your-presigned-url

โš™๏ธ Execute the Actionโ€‹

9๏ธโƒฃ Trigger Content Processingโ€‹

  1. Use the Content processing request (POST)
  2. In the Body, insert the copied objectKey from step 7.
    Example:
    2.1 Valid object key eg. from step 7 and valid action from step 6
    {
    "objectKeys": ["your-object-key-from-step-7"],
    "actions": ["image-description"]
    }

๐Ÿ’ก Each action may behave differently depending on the use case. Please refer to the documentation for more information.

โœ… On success:

  • Response: 200 OK
  • Response body will include a processingId
    ๐Ÿง  The processingId is automatically stored as an environment variable

๐Ÿ“ฅ Retrieve Processing Resultsโ€‹

๐Ÿ”Ÿ Get Results by Result IDโ€‹

Use the Retrieve result by ID request (GET).

  • The processingId from Step 9 is automatically included in the request URL
  • You can also manually provide any valid processingId

โœ… Response:

  • Status: 200 OK
  • Body: Contains the final result from the processed file

โœ… Summaryโ€‹

  • ๐Ÿ” Authenticate using the Authorize request
  • ๐Ÿงช Check health using the HealthCheck request

๐Ÿ“‚ Upload Flowโ€‹

  1. Get presignedUrl and objectKey
  2. Upload the file using the FileUpload.ps1 script
  3. Trigger content processing with the Content processing request
  4. Retrieve results using the Retrieve result by ID request with processingId