
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@getabrain/sdk
Advanced tools
Official Node/TypeScript SDK for GetABrain.ai — real human judgment as an API.
npm install @getabrain/sdk
import { GetABrain } from '@getabrain/sdk'
const gab = new GetABrain({ apiKey: 'gab_k_…', apiSecret: 'gab_s_…' })
// Submit a question (returns immediately)
const query = await gab.queries.create({
type: 'ab_test',
title: 'Which headline converts better?',
content_data: {
question: 'Which is more compelling?',
variant_a: { description: 'Save 20% today' },
variant_b: { description: 'Your future self will thank you' },
},
required_responses: 5,
bid_amount_cents: 25,
})
// Wait for humans to answer (polls for you)
const responses = await gab.queries.waitForResponses(query.id, { minResponses: 5 })
console.log(responses.map((r) => r.response_data))
import { InsufficientBalanceError, RateLimitError } from '@getabrain/sdk'
try {
await gab.queries.create(/* … */)
} catch (e) {
if (e instanceof InsufficientBalanceError) {
// top up your balance at https://getabrain.ai
}
}
gab.queries.create(input) / .get(id) / .list({ status?, limit?, offset? }) / .cancel(id)gab.queries.waitForResponses(id, { minResponses, timeoutMs?, pollIntervalMs? })gab.responses.rate(queryId, responseId, { score, feedback_text? }) / .getRating(queryId, responseId)gab.account.stats() / .balance()Full reference: https://getabrain.ai/docs/api
The SDK types the 13 first-class query types. Two legacy types (
custom,headline_test) exist server-side but are deprecated and intentionally not typed by the SDK — use a first-class type instead.
FAQs
Official Node/TypeScript SDK for the GetABrain.ai human-intelligence API
The npm package @getabrain/sdk receives a total of 62 weekly downloads. As such, @getabrain/sdk popularity was classified as not popular.
We found that @getabrain/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.