You are browsing the documentation for a deprecated version ('2014-08-15') of the Amazon Mechanical Turk Requester API. This version of the API will be deprecated and will be rendered unusable as of June 1st, 2019. If you request against a legacy API version (https://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI-legacy/Welcome.html) on or after June 1, 2019, you will receive the following response:
The latest version of our API ('2017-01-17') provides you with additional tool choices and enables you to select from nine AWS Software Development Kits This version also updates naming conventions used in the API and adopts the AWS standard of Signature Version 4 to authenticate requests securely. The API uses REST requests and no longer requires that developers be familiar with SOAP protocol. These changes make the MTurk API consistent with AWS APIs, simplifying the on-boarding process for both new and existing AWS developers. The legacy MTurk Command Line Tools and .NET, Java, Ruby, and Perl SDKs were marked as deprecated in January 2018. We will be deprecating the legacy APIs as of June 1, 2019. If you are on a legacy API, you must migrate to the latest
version of our API. You can find documentation for the latest API here and the AWS SDKs here For support, contact requestor-apilegacydeprecation-support@amazon.com |
CreateHIT
Description
The CreateHIT
operation creates a new Human Intelligence Task (HIT).
The new HIT is made available for Workers to find and accept on the Amazon Mechanical
Turk website.
There are two ways to specify HIT properties when calling the CreateHIT
operation: with the HIT type ID, or with the common property values. If the
HITTypeId
parameter is specified, the
CreateHIT
operation assumes the syntax with a HIT type ID is
what you intended. If you provide both a HIT type ID and values for the common
properties, the common property values are ignored.
CreateHIT also supports several ways to provide question data: by providing a value
for the Question
parameter that fully specifies the contents of the HIT, or by providing
a HitLayoutId and associated HitLayoutParameters. If you are providing a data structure,
it may be a
QuestionForm
structure, an ExternalQuestion
structure, or an HTMLQuestion
structure. For more information, see the Question
parameter.
Using Review Policies with CreateHIT
you can specify how you want
Mechanical Turk to take action on the HITs you create. Using Review Policies removes the
need for you to manually take action and determine Worker accuracy after the HIT has
been completed. For more information about Review Policies, see Review Policies.
You must specify review policies when you create a HIT. You cannot apply a Review Policy to an existing HIT. There are two types of Review Policies, Assignment-level and HIT-level:
-
An Assignment-level Review Policy is applied as soon as a Worker submits an assignment. For more information, see Assignment Review Policies.
-
A HIT-level Review Policy is applied when a HIT becomes reviewable. For more information, see HIT Review Policies.
You can specify one Assignment-level Review Policy and one HIT-level
Review Policy when you call CreateHIT
using the HIT Review Policy data structure.
The Assignment-level Review Policy ScoreMyKnownAnswer/2011-09-01 and the HIT-level
Review Policy SimplePlurality/2011-09-01 can be used in the same call to
CreateHIT
.
-
Use the ScoreMyKnownAnswers/2011-09-01 policy parameters to compare a known answer you provide with the answer a Worker provides. Mechanical Turk will automatically compare the answer and take action based on your requirements.
-
Use the SimplePlurality/2011-09-01 policy parameters to automatically compare answers received from multiple workers and detect if there is a majority or consensus answer.
For more information about how to get the results you need from Workers, see Review Policy Use Cases.
Note
If a HIT is created with 10 or more maximum assignments, there is an additional fee. For more information, see
Amazon Mechanical Turk Pricing
Request Parameters
The CreateHIT
operation accepts parameters common to all operations.
Some common parameters are required. See Common Parameters for more
information.
The following tables describe the additional parameters required to call the
CreateHIT
operation with an explicit HIT type ID and without a
HIT type ID.
Calling CreateHIT with a HIT Type ID
The following parameters are specific to calling the CreateHIT
operation with an explicit HIT type ID:
Name | Description | Required |
---|---|---|
|
The name of the operation. Type: String Valid Values: CreateHIT Default: None |
Yes |
|
The HIT type ID. Type: String Default: None |
Yes |
|
The data the person completing the HIT uses to produce the results. Type: String Default: None Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace. Either a |
No |
|
The Type: String Default: None Constraints: Must be a valid Either a |
No |
|
If the Type: HITLayoutParameter Default: None |
No |
|
The number of seconds after which the HIT is no longer available for users to accept. After the lifetime of the HIT has elapsed, the HIT no longer appears in HIT searches, even if not all of the HIT's assignments have been accepted. Type: positive integer Valid Values: any integer between 30 (30 seconds) and 31536000 (365 days). Default: None |
Yes |
|
The number of times the HIT can be accepted and completed before the HIT becomes unavailable. Type: positive integer Valid Values: any integer between 1 and 1000000000 (1 billion). Default: 1 |
No |
|
The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy. For more information, see Assignment Review Policies. Type: String Valid Values: Must be a HIT Review Policy data structure, see HIT Review Policy. Default: none |
No |
|
The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy. For more information, see HIT Review Policies. Type: String Valid Values: Must be a HIT Review Policy data structure, see HIT Review Policy. Default: none |
No |
|
An arbitrary data field. The The The Type: String Default: None Constraints: must not be longer than 255 characters in length. |
No |
|
A unique identifier for this request. Allows you to retry the call on error without
creating duplicate HITs. This is useful in cases such as network
timeouts where it is unclear whether or not the call succeeded
on the server. If the HIT already exists in the system from a
previous call using the same
Type: String Default: None Constraints: must not be longer than 64 characters in length. Note: It is your responsibility to ensure uniqueness of the
token. The unique token expires after 24 hours. Subsequent calls
using the same |
No |
Calling CreateHIT Without a HIT Type ID
The following parameters are specific to calling the CreateHIT
operation without a HIT type ID, letting Amazon Mechanical Turk determine the HIT
type from the property values:
Name | Description | Required |
---|---|---|
|
The name of the operation Type: String Valid Values: CreateHIT Default: None |
Yes |
|
The title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned. Type: String Default: None Constraints: must not be more than 128 characters |
Yes |
|
A general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it. Type: String Default: None Constraints: cannot be more than 2,000 characters in length |
Yes |
|
The data the person completing the HIT uses to produce the results. Type: String Default: None Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace. Either a |
No |
|
The Type: String Default: None Constraints: Must be a valid Either a |
No |
|
If the Type: HITLayoutParameter Default: None |
No |
|
The amount of money the Requester will pay a Worker for successfully completing the HIT. Type: Price data structure. Default: None |
Yes |
|
The amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept. Type: positive integer Valid Values: any integer between 30 (30 seconds) and 31536000 (365 days). Default: None |
Yes |
|
An amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted. Type: positive integer Valid Values: any integer between 30 (30 seconds) and 31536000 (365 days). Default: None |
Yes |
|
One or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs. Type: String Default: None Constraints: The complete string of keywords, including commas and spaces, cannot be more than 1,000 characters. |
No |
|
The number of times the HIT can be accepted and completed before the HIT becomes unavailable. Type: positive integer Valid Values: any integer between 1 and 1000000000 (1 billion). Default: 1 |
No |
|
The number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it. Type: non-negative integer Valid Values: any integer between 0 (auto-approve results as soon as they are submitted) and 2592000 (30 days). Default: 2592000 (30 days) |
No |
|
A condition that a Worker's Qualifications must meet before the Worker is allowed to accept and complete the HIT. Type: a QualificationRequirement data structure. Default: None Constraints: there can be no more than 10 |
No |
|
The Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy. For more information, see Assignment Review Policies. Type: String Valid Values: Must be a HIT Review Policy data structure, see HIT Review Policy. Default: none |
No |
|
The HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy. For more information, see HIT Review Policies. Type: String Valid Values: Must be a HIT Review Policy data structure, see HIT Review Policy. Default: none |
No |
|
An arbitrary data field. The Type: String Default: None Constraints: must not be longer than 255 characters in length. |
No |
|
A unique identifier for this request. Allows you to retry the call on error without
creating duplicate HITs. This is useful in cases such as network
timeouts where it is unclear whether or not the call succeeded
on the server. If the HIT already exists in the system from a
previous call using the same
Type: String Default: None Constraints: must not be longer than 64 characters in length. Note: It is your responsibility to ensure uniqueness of the
token. The unique token expires after 24 hours. Subsequent calls
using the same |
No |
Response Elements
A successful request for the CreateHIT
operation includes the
elements described in the following table.
Name | Description |
---|---|
|
Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see the HIT Data Structure. |
Examples
The following examples show how to use the CreateHIT
operation.
Sample Request
The following are examples of REST requests.
Example Request (Query) Using CreateHIT with a HIT Type ID
The following example creates a simple HIT, using an explicit HIT type ID.
The Question
parameter takes a block of XML data as its
value. See the
QuestionForm data structure and the ExternalQuestion data
structure for more information.
https://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester &AWSAccessKeyId=
[the Requester's Access Key ID]
&Version=2017-01-17 &Operation=CreateHIT &Signature=[signature for this request]
&Timestamp=[your system's local time]
&HITTypeId=T100CN9P324W00EXAMPLE &Question=[URL-encoded question data]
&LifetimeInSeconds=604800
Example Request (Query) Using CreateHIT With a HIT Type ID Using SimplePlurality/2011-09-01 Review Policy
The following example creates a simple HIT with a SimplePlurality/2011-09-01 Review Policy.
<CreateHITRequest> <HITTypeId>T100CN9P324W00EXAMPLE</HITTypeId> <Question>[CDATA block or XML Entity encoded]</Question> <LifetimeInSeconds>604800</LifetimeInSeconds> <AssignmentReviewPolicy> <PolicyName>ScoreMyKnownAnswers/2011-09-01</PolicyName> <Parameter> <Key>AnswerKey</Key> <MapEntry> <Key>QuestionId3</Key> <!—correct answer is “B” --> <Value>B</Value> </MapEntry <MapEntry> <Key>QuestionId7</Key> <!—correct answer is “A” --> <Value>A</Value> </MapEntry> <MapEntry> <Key>QuestionId15</Key> <!—correct answer is “F” --> <Value>F</Value> </MapEntry> <MapEntry> <Key>QuestionId17</Key> <!—correct answer is “C” --> <Value>C</Value> </MapEntry> <MapEntry> <Key>QuestionId18</Key> <!—correct answer is “A” --> <Value>A</Value> </MapEntry> </Parameter> <Parameter> <Key>ExtendIfKnownAnswerScoreIsLessThan</Key> <Value>80</Value> </Parameter> <Parameter> <Key>ExtendMaximumAssignments</Key> <Value>3</Value> </Parameter> </AssignmentReviewPolicy> </CreateHITRequest>
Example Request (Query) Using CreateHIT Without a HIT Type ID
The following example creates a simple HIT with some properties, letting
Amazon Mechanical Turk determine the HIT type ID from the property values. The
Question
parameter takes a block of XML data as its
value. See the
QuestionForm data structure and the ExternalQuestion data
structure for more information.
https://mechanicalturk.amazonaws.com/?Service=AWSMechanicalTurkRequester &AWSAccessKeyId=
[the Requester's Access Key ID]
&Version=2017-01-17 &Operation=CreateHIT &Signature=[signature for this request]
&Timestamp=[your system's local time]
&Title=Location%20and%20Photograph%20Identification &Description=Select%20the%20image%20that%20best%20represents... &Reward.1.Amount=5 &Reward.1.CurrencyCode=USD &Question=[URL-encoded question data]
&AssignmentDurationInSeconds=30 &LifetimeInSeconds=604800 &Keywords=location,%20photograph,%20image,%20identification,%20opinion
Sample Response
Amazon Mechanical Turk might return the following response for the preceding requests.
<CreateHITResponse> <OperationRequest> <RequestId>ece2785b-6292-4b12-a60e-4c34847a7916</RequestId> </OperationRequest> <HIT> <Request> <IsValid>True</IsValid> </Request> <HITId>GBHZVQX3EHXZ2AYDY2T0</HITId> <HITTypeId>NYVZTQ1QVKJZXCYZCZVZ</HITTypeId> </HIT> </CreateHITResponse>