create_batch
imerit_ango.sdk.SDK.
create_batch(project_id, batch_name)
Create a new batch within the specified project.
Parameters
project_id: str
The unique identifier for the project. You can find the project ID in the user interface or retrieve it using the
list_projectsfunction.
batch_name: str
Name of the batch to be created.
Example:
'My Batch 1'
Returns:
output: dict
A dictionary containing the result of the operation.
Example
Create a batch:
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')
ango_sdk = SDK(api_key)
ango_sdk.create_batch(project_id, "My Batch Name")curl -X POST "https://imeritapi.ango.ai/v2/batches/$PROJECT_ID" \
-H "Content-Type: application/json" \
-H "apikey: $ANGO_API_KEY" \
-d '{
"batches": [
{
"name": "My Batch Name"
}
]
}'Prevent creating duplicate batches:
Last updated