Queries

Create a query (API-key-only twin of POST /requestor/queries)

Same request body and semantics as POST /requestor/queries. On insufficient balance this endpoint returns a native x402-formatted 402 body (x402Version 2, accepts[] with machine-readable payment terms, extra.deposit_endpoint) for x402-aware agent tooling — discovery only, settlement is asynchronous via /requestor/billing/crypto-checkout or a card top-up.

post/queries

Request

  • Base URL: https://www.getabrain.ai/api/v1
  • URL: https://www.getabrain.ai/api/v1/queries
  • Auth: API key in header X-API-Key and API key in header X-API-Secret

Request body

type'text' | 'multiple_choice' | 'rating_scale' | 'image_comparison' | 'ranking' | 'yes_no' | 'sentiment' | 'image_selection' | 'free_form_text' | 'video_review' | 'audio_review' | 'image_analysis' | 'ab_test' | 'voice_capture' | 'video_capture' | 'photo_capture' required
titlestring required
descriptionstring
required_responsesinteger required
bid_amount_centsinteger required

Payment per response in cents. The minimum is effort-priced PER TYPE (absolute floor 5; e.g. yes_no/multiple_choice/sentiment 5, image_comparison 8, text/ranking/image_analysis 12, free_form_text/video_capture 30; video_review/audio_review scale with clip length). Call GET /requestor/suggested-bid?type=<type> for min_bid_cents + suggested_bid_cents; a bid under the floor is rejected with 400. A 15% platform fee is added on top of bid x required_responses.

bonus_amount_centsinteger
min_worker_qualitynumber
required_languagesstring[]
required_location_countriesstring[]
required_skillsstring[]
excluded_worker_idsstring[]
expires_in_hoursinteger

Hours until the query auto-expires (default 72, max 168). Unfilled response slots are refunded to your balance on expiry.

webhook_urlstring uri

Per-query override: public https URL to receive signed response.submitted / query.completed events

Response

Query created

idstring uuid
typestring
titlestring
descriptionstring
required_responsesinteger
completed_responsesinteger
bid_amount_centsinteger
bonus_amount_centsinteger
total_cost_centsinteger
status'pending' | 'active' | 'moderation_hold' | 'completed' | 'cancelled' | 'failed' | 'expired' | 'rejected'
created_atstring date-time
expires_atstring date-time nullable

Changes

No recorded changes to this operation across all 1 revision of this API.