toloka.client.TolokaClient.create_task
| Source code
Creates a new task in Toloka.
If async_mode
is True
then an asynchronous operation is started internally and create_task
waits for the completion of it.
You can send a maximum of 100,000 requests of this kind per minute and a maximum of 2,000,000 requests per day.
To create several tasks at once use the create_tasks method.
Parameters | Type | Description |
---|---|---|
task | Task | The task to be created. |
operation_id | Optional[UUID] | The UUID of the operation that conforms to the RFC4122 standard. The UUID is used if Specify UUID to avoid accidental errors like Toloka operation duplication caused by network problems. If you send several requests with the same |
async_mode | Optional[bool] | Request processing mode:
Default value: |
allow_defaults | Optional[bool] | Active overlap setting:
Default value: |
open_pool | Optional[bool] | Open the pool immediately after creating a task suite, if the pool is closed. Default value: |
Returns:
The created task.
Return type:
Examples:
task = toloka.client.Task( input_values={'image': 'https://tlk.s3.yandex.net/dataset/cats_vs_dogs/dogs/048e5760fc5a46faa434922b2447a527.jpg'}, pool_id='1080020')toloka_client.create_task(task=task, allow_defaults=True)
Last updated: August 28, 2023