Creating Your First Campaign
Campaigns are the main way to collect data on Effect Network. A campaign is a collection of tasks that need to be completed by workers. Each task is a small piece of work that needs to be done. For example, a task could be to label an image, transcribe a piece of audio, or answer a question. They are created by the data requester (you) and contain information like the reward for the workers, the template for the tasks, the instructions for the workers etc.
Creating a campaign
import { createCampaign } from "@effectai/sdk";
const campaign = await createCampaign({
client,
campaign: {
// Name of your campaign
title: "My First Campaign!",
// Description of the campaign
description: "Description of the task here.",
// Campaign version
version: 1.0,
// Maximum time to complete a task in seconds
maxTaskTime: 100,
// EFX reward per task
reward: 3.5,
// Custom instructions for completing tasks in this campaign (Markdown supported)
instructions: "Some instructions here",
// Template of the campaign see https://docs.effect.ai/docs/templates/introduction
template: "<h1>Template here</h1>",
// Input schema to validate the task data.
input_schema: null,
// TODO::
output_schema: null,
// Image URL for the campaign
image: "",
// Category of the campaign
category: "",
// TODO::
example_task: "",
// TODO:: Estimated time to complete a task in this campaign
estimated_time: 10,
},
});
Wooooho! You have created your first campaign. You can now view the campaign on the Effect Network before you start collecting data, you need to add tasks to the campaign. You can do this by following the Adding Tasks guide.