SDKs
FirstHandAPI provides official client libraries for TypeScript and Python. Both SDKs cover the full API surface — jobs, files, submissions, billing, webhooks, and API key management.
Available SDKs
| SDK | Package | Install | Registry |
|---|---|---|---|
| TypeScript | @firsthandapi/sdk | npm install @firsthandapi/sdk | npm |
| Python | firsthandapi | pip install firsthandapi | PyPI |
Quick Start
TypeScript
import { FirstHandClient } from '@firsthandapi/sdk';
const client = new FirstHandClient({ apiKey: 'fh_live_...' });
const job = await client.createJob({
type: 'data_collection',
description: 'Photos of street signs in NYC',
files_needed: 10,
accepted_formats: ['image/jpeg'],
price_per_file_cents: 50,
});
console.log(`Job created: ${job.id}`);Python
from firsthandapi import FirstHandClient
client = FirstHandClient(api_key="fh_live_...")
job = client.create_job(
type="data_collection",
description="Photos of street signs in NYC",
files_needed=10,
accepted_formats=["image/jpeg"],
price_per_file_cents=50,
)
print(f"Job created: {job.id}")MCP Server
For AI agent integration (Claude Code, Cursor), use the official MCP server instead of the SDK:
npx @firsthandapi/mcp-serverSee AI Agent Integration for setup details.