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:
- Bruno installed
-
client_id
andclient_secret
credentials - Download following files:
๐งฉ Setupโ
1๏ธโฃ Import the Collectionโ
- Open Bruno
- Select "Collections"
- Click "Import" (from the "3 dots menu", and select "Bruno Collection")
- Import the file:
CIN-PROD_Bruno.json
- 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โ
- Send the
HealthCheck
request (GET)
โ Expected response:200 OK
with:
"Healthy"
5๏ธโฃ Set Your Credentialsโ
- Open the
Authorize
request (POST) - Go to the Body tab
- Set the following keys and values:
client_id
: your client IDclient_secret
: your client secret
6๏ธโฃ Authenticate & check available actionsโ
- Run the
Authorize
request again (POST)
โ Response:200 OK
๐ง The token is automatically stored as environment variable โ no need to copy it manually - 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
- Use the
PresignedUrl
request (GET) - 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 stepobjectKey
โ ๐ Copy this value; you'll need it for "Execute the Action" step 9
8๏ธโฃ Upload the Fileโ
- Download
FileUpload.ps1
script (it`s a PowerShell script) - Press Windows + S and type PowerShell.
- Right-click Windows PowerShell and choose "Run as Administrator" (optional, but safer for permissions).
- Type the following to go to your Downloads folder:
cd "C:\Path\To\Your\File"
- or other location if file was downloaded somewhere else. - 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) - 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โ
- Use the
Content processing
request (POST) - 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
๐ง TheprocessingId
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โ
- Get
presignedUrl
andobjectKey
- Upload the file using the
FileUpload.ps1
script - Trigger content processing with the
Content processing
request - Retrieve results using the
Retrieve result by ID
request withprocessingId