GetABrain.ai

Getting Started

This guide walks you through setting up your account and making your first API call to GetABrain.ai. You will be collecting human feedback in under 5 minutes.

1. Create an Account

Sign up as a requestor at /requestor/signup. Provide your name, email, and a strong password. Your account gives you access to the requestor dashboard where you can manage queries and billing.

2. Get API Credentials

After signing up, you will receive your api_key and api_secret in the response. Store these securely -- the secret is only shown once. You can also use JWT-based authentication by logging in with your email and password.

Important: Save your API secret immediately. It cannot be retrieved later.

3. Fund Your Account

Before creating queries, you need to add funds to your account. Navigate to /requestor/billing and use Stripe checkout to add balance. Each query requires a bid amount that is held in escrow until workers complete the task.

4. Create Your First Query

Send a POST request to create a query. Here is an example asking a simple text question:

cURL

curl -X POST https://getabrain.ai/api/v1/queries \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret" \
  -d '{
    "type": "text",
    "title": "Product Feedback",
    "content_data": {
      "question": "What do you think of our new landing page design?"
    },
    "required_responses": 3,
    "bid_amount_cents": 50
  }'

Python

import requests

response = requests.post(
    "https://getabrain.ai/api/v1/queries",
    headers={
        "Content-Type": "application/json",
        "X-API-Key": "your_api_key",
        "X-API-Secret": "your_api_secret",
    },
    json={
        "type": "text",
        "title": "Product Feedback",
        "content_data": {
            "question": "What do you think of our new landing page design?"
        },
        "required_responses": 3,
        "bid_amount_cents": 50,
    },
)

print(response.json())

Node.js

const response = await fetch("https://getabrain.ai/api/v1/queries", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "your_api_key",
    "X-API-Secret": "your_api_secret",
  },
  body: JSON.stringify({
    type: "text",
    title: "Product Feedback",
    content_data: {
      question: "What do you think of our new landing page design?",
    },
    required_responses: 3,
    bid_amount_cents: 50,
  }),
});

const data = await response.json();
console.log(data);

The response includes the query ID and status:

{
  "query": {
    "id": "uuid-here",
    "type": "text",
    "title": "Product Feedback",
    "status": "open",
    "required_responses": 3,
    "received_responses": 0,
    "bid_amount_cents": 50,
    "created_at": "2025-01-15T10:30:00Z"
  }
}

5. Check Results

Poll the query endpoint to check for responses, or set up webhooks to be notified automatically.

curl https://getabrain.ai/api/v1/queries/YOUR_QUERY_ID \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret"
{
  "query": {
    "id": "uuid-here",
    "status": "completed",
    "required_responses": 3,
    "received_responses": 3
  },
  "responses": [
    {
      "id": "resp-uuid-1",
      "response_data": {
        "answer": "The design looks clean and modern. I love the color scheme."
      },
      "quality_score": 0.92,
      "submitted_at": "2025-01-15T10:35:00Z"
    },
    {
      "id": "resp-uuid-2",
      "response_data": {
        "answer": "Navigation is intuitive but the CTA button could be more prominent."
      },
      "quality_score": 0.88,
      "submitted_at": "2025-01-15T10:36:00Z"
    }
  ]
}

Next Steps