curl -X POST https://win.oneshotagent.com/v1/tools/browser \
-H "Content-Type: application/json" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-d '{
"task": "Go to producthunt.com, find the top 5 AI products launched today, and extract their names, descriptions, and upvote counts",
"output_schema": {
"products": [{
"name": "string",
"description": "string",
"upvotes": "number"
}]
}
}'
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
const result = await agent.browser({
task: "Go to producthunt.com, find the top 5 AI products launched today, and extract their names, descriptions, and upvote counts",
output_schema: {
products: [{
name: "string",
description: "string",
upvotes: "number"
}]
}
});
console.log("Products:", result.output.products);
console.log("Steps taken:", result.steps.length);
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
// Import cookies/localStorage exported from your own signed-in browser.
const profile = await agent.createBrowserProfile("my-github-bot", { storage_state: state });
// Reuse the imported profile
const result = await agent.browser({
task: "Go to github.com/notifications and list my unread notifications",
profile_id: profile.id,
allowed_domains: ["github.com"],
});
from oneshot import OneShotClient
client = OneShotClient(private_key="0x...")
# Create a persistent profile
profile = client.create_browser_profile("my-github-bot", storage_state=state)
# Use the profile with credentials
result = client.browser(
task="Go to github.com/notifications and list my unread notifications",
profile_id=profile["id"],
allowed_domains=["github.com"],
)
{
"error": "payment_required",
"message": "Payment required for browser automation.",
"payment_request": {
"chain_id": 8453,
"token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "0.150000",
"recipient": "0x..."
},
"context": {
"tool": "browser",
"quote_id": "quote_abc123",
"task_summary": "Navigate to ProductHunt, find top AI products, extract structured data",
"estimated_steps": 8,
"max_steps": 25,
"estimated_cost": "0.150000",
"complexity_score": 0.6,
"expires_at": "2026-01-15T12:30:00Z"
}
}
{
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing",
"tool": "browser",
"message": "Browser task initiated. Results available at /v1/requests/{id}.",
"idempotency_key": "quote:quote_01HXAMPLE",
"browser": {
"estimated_steps": 8,
"max_steps": 25,
"estimated_cost": "0.150000"
}
}
{
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"result": {
"output": {
"products": [
{ "name": "AgentKit", "description": "Build autonomous AI agents in minutes", "upvotes": 342 },
{ "name": "VoiceFlow", "description": "AI voice agents for customer support", "upvotes": 289 }
]
},
"steps": [
{ "number": 1, "goal": "Navigate to producthunt.com", "url": "https://www.producthunt.com" },
{ "number": 2, "goal": "Find AI products section", "url": "https://www.producthunt.com/topics/artificial-intelligence" }
],
"cost": 0.12
}
}
Web & Browser
Browser
Execute browser automation tasks: navigate pages, extract data, fill forms, interact with websites
POST
/
v1
/
tools
/
browser
curl -X POST https://win.oneshotagent.com/v1/tools/browser \
-H "Content-Type: application/json" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-d '{
"task": "Go to producthunt.com, find the top 5 AI products launched today, and extract their names, descriptions, and upvote counts",
"output_schema": {
"products": [{
"name": "string",
"description": "string",
"upvotes": "number"
}]
}
}'
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
const result = await agent.browser({
task: "Go to producthunt.com, find the top 5 AI products launched today, and extract their names, descriptions, and upvote counts",
output_schema: {
products: [{
name: "string",
description: "string",
upvotes: "number"
}]
}
});
console.log("Products:", result.output.products);
console.log("Steps taken:", result.steps.length);
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
// Import cookies/localStorage exported from your own signed-in browser.
const profile = await agent.createBrowserProfile("my-github-bot", { storage_state: state });
// Reuse the imported profile
const result = await agent.browser({
task: "Go to github.com/notifications and list my unread notifications",
profile_id: profile.id,
allowed_domains: ["github.com"],
});
from oneshot import OneShotClient
client = OneShotClient(private_key="0x...")
# Create a persistent profile
profile = client.create_browser_profile("my-github-bot", storage_state=state)
# Use the profile with credentials
result = client.browser(
task="Go to github.com/notifications and list my unread notifications",
profile_id=profile["id"],
allowed_domains=["github.com"],
)
{
"error": "payment_required",
"message": "Payment required for browser automation.",
"payment_request": {
"chain_id": 8453,
"token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "0.150000",
"recipient": "0x..."
},
"context": {
"tool": "browser",
"quote_id": "quote_abc123",
"task_summary": "Navigate to ProductHunt, find top AI products, extract structured data",
"estimated_steps": 8,
"max_steps": 25,
"estimated_cost": "0.150000",
"complexity_score": 0.6,
"expires_at": "2026-01-15T12:30:00Z"
}
}
{
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing",
"tool": "browser",
"message": "Browser task initiated. Results available at /v1/requests/{id}.",
"idempotency_key": "quote:quote_01HXAMPLE",
"browser": {
"estimated_steps": 8,
"max_steps": 25,
"estimated_cost": "0.150000"
}
}
{
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"result": {
"output": {
"products": [
{ "name": "AgentKit", "description": "Build autonomous AI agents in minutes", "upvotes": 342 },
{ "name": "VoiceFlow", "description": "AI voice agents for customer support", "upvotes": 289 }
]
},
"steps": [
{ "number": 1, "goal": "Navigate to producthunt.com", "url": "https://www.producthunt.com" },
{ "number": 2, "goal": "Find AI products section", "url": "https://www.producthunt.com/topics/artificial-intelligence" }
],
"cost": 0.12
}
}
Describe a browser task in plain English; OneShot runs it and returns the result. Pass output_schema to get structured JSON back. The first call returns a quote (402); the second, with payment, runs the task and returns a request_id to poll.
Request body
The task, 10 to 50,000 characters. For example: “Go to example.com/pricing and extract all plan names, prices, and features into a table”.
JSON schema for the output.
{
"products": [{
"name": "string",
"price": "number",
"features": ["string"]
}]
}
Domains to stay within, subdomains included. Checked after each recorded navigation, not a network block; one outside them ends the task with
browser_domain_not_allowed.Persistent browser profile: cookies, local storage and session state reused across tasks.
25 to 100, default 50. Not an exact action limit. Under 25 is rejected before payment. The SDK’s
maxCost limits quote and payment approval separately.Quote response (402)
context.quote_id, context.task_summary, context.estimated_steps, context.max_steps, context.estimated_cost (USDC), context.complexity_score (0-1) and context.expires_at (30 minutes).
Execution response (202)
request_id (poll /v1/requests/{id}), status (processing), idempotency_key, browser.estimated_steps and browser.estimated_cost from the quote.
Retrying safely
Replay, never re-attempt: resend a lost response with the sameX-Quote-ID; the original 202 returns with Idempotent-Replay: true, nothing settles or reruns. Keys answer only the wallet that proved them (signed payment, x-agent-proof or access token).
409 quote_claim_unresolved: unclaimed quote after settlement, payment credited back, request a new quote. Idempotency-Key and retry errors: as for Purchase.
Completed job result
[{ number, goal, url }]. Goals are safe action categories. URLs omit credentials, query strings and fragments; an empty string means unavailable. step_count counts actions taken and can differ from the list length; steps_incomplete flags missing activity.Usage cost before OneShot fees, also returned as
total_cost_usd. Zero is valid; null means unavailable. A reused session reports the incremental cost.What you were charged, after any amount credited back. Null means the final charge is not ready; poll again.
gs:// or private downloads.result. TypeScript throws JobError with code and partialResult; Python exposes code and partial_result. Codes distinguish timeout, stall, cost limit, navigation block, detached frame and unknown failure. Keep error_ref for support. Failed tasks are not replayed.
curl -X POST https://win.oneshotagent.com/v1/tools/browser \
-H "Content-Type: application/json" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-d '{
"task": "Go to producthunt.com, find the top 5 AI products launched today, and extract their names, descriptions, and upvote counts",
"output_schema": {
"products": [{
"name": "string",
"description": "string",
"upvotes": "number"
}]
}
}'
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
const result = await agent.browser({
task: "Go to producthunt.com, find the top 5 AI products launched today, and extract their names, descriptions, and upvote counts",
output_schema: {
products: [{
name: "string",
description: "string",
upvotes: "number"
}]
}
});
console.log("Products:", result.output.products);
console.log("Steps taken:", result.steps.length);
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
// Import cookies/localStorage exported from your own signed-in browser.
const profile = await agent.createBrowserProfile("my-github-bot", { storage_state: state });
// Reuse the imported profile
const result = await agent.browser({
task: "Go to github.com/notifications and list my unread notifications",
profile_id: profile.id,
allowed_domains: ["github.com"],
});
from oneshot import OneShotClient
client = OneShotClient(private_key="0x...")
# Create a persistent profile
profile = client.create_browser_profile("my-github-bot", storage_state=state)
# Use the profile with credentials
result = client.browser(
task="Go to github.com/notifications and list my unread notifications",
profile_id=profile["id"],
allowed_domains=["github.com"],
)
{
"error": "payment_required",
"message": "Payment required for browser automation.",
"payment_request": {
"chain_id": 8453,
"token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "0.150000",
"recipient": "0x..."
},
"context": {
"tool": "browser",
"quote_id": "quote_abc123",
"task_summary": "Navigate to ProductHunt, find top AI products, extract structured data",
"estimated_steps": 8,
"max_steps": 25,
"estimated_cost": "0.150000",
"complexity_score": 0.6,
"expires_at": "2026-01-15T12:30:00Z"
}
}
{
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing",
"tool": "browser",
"message": "Browser task initiated. Results available at /v1/requests/{id}.",
"idempotency_key": "quote:quote_01HXAMPLE",
"browser": {
"estimated_steps": 8,
"max_steps": 25,
"estimated_cost": "0.150000"
}
}
{
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"result": {
"output": {
"products": [
{ "name": "AgentKit", "description": "Build autonomous AI agents in minutes", "upvotes": 342 },
{ "name": "VoiceFlow", "description": "AI voice agents for customer support", "upvotes": 289 }
]
},
"steps": [
{ "number": 1, "goal": "Navigate to producthunt.com", "url": "https://www.producthunt.com" },
{ "number": 2, "goal": "Find AI products section", "url": "https://www.producthunt.com/topics/artificial-intelligence" }
],
"cost": 0.12
}
}
Charged per step, with a per-session minimum. See Pricing.