SerperOpenAI

SEO Content Agent

Build an AI agent that researches keywords with Serper and generates optimized content with OpenAI — powered by a single Tokium wallet. Research and writing in one autonomous flow.

The Problem

SEO requires two distinct capabilities — keyword research and content creation — each with its own API subscription and integration.

Manually orchestrating SERP analysis and content generation is slow and doesn't scale across hundreds of topics.

Your agent needs access to both a search API and an LLM, but can't manage two separate billing accounts.

The Solution

Your agent uses Serper to pull real-time SERP data — top-ranking pages, related queries, people-also-ask — then feeds that context to OpenAI to generate optimized content. Both APIs are accessed through Tokium with one wallet. No subscriptions to manage.

Why through Tokium?

AI agents need data — but the way they get it matters. Here's why routing through Tokium beats the alternatives.

Web Scraping
Direct APIs
Tokium
Data quality
Unreliable
High
High
Setup time
Hours
Per provider
Minutes
Agent-compatible
Fragile
Needs human
Native
Billing
Proxy costs
Per subscription
One wallet
Key management
N/A
Per service
Zero
Scales across APIs
No
No
Yes
DATA_FMT

Structured data, not HTML soup

Web scraping gives agents raw HTML to parse — brittle and unreliable. APIs through Tokium return clean, structured JSON your agent can act on immediately.

BILLING

Pay per request, not per month

Most API providers charge monthly subscriptions — expensive when experimenting, wasteful when usage varies. Tokium charges per request. Use what you need.

AUTH

No keys to manage

Direct API use means signing up with each provider, generating keys, storing secrets, rotating them. With Tokium, your agent authenticates once — we handle the rest.

AGENT_NATIVE

Built for agents, not humans

Agents can't fill out signup forms or enter credit cards. Tokium is agent-native — create a wallet, fund it, and your agent calls APIs autonomously with spending limits you control.

How It Works

AGENT_01
ACTIVE
1

Create Agent

Set up an agent with a Tokium wallet that can access Serper and OpenAI.

$500
Funded
2

Fund Wallet

One balance covers both search queries and content generation.

-$0.02
-$0.15
-$0.08
3

Agent Researches & Writes

Your agent queries Serper for SERP insights, then generates SEO content with OpenAI.

Code Example

import Tokium from '@tokium-labs/sdk';

const tokium = new Tokium({ apiKey: process.env.Tokium_API_KEY });

// Step 1: Research SERPs with Serper
const serp = await tokium.proxy.post('serper', '/search', {
  body: {
    q: 'best AI agent frameworks 2025',
    num: 10
  }
});

const topResults = serp.data.organic.map(
  (r: { title: string; snippet: string }) =>
    `${r.title}: ${r.snippet}`
).join('\n');

// Step 2: Generate SEO content with OpenAI
const article = await tokium.proxy.post(
  'openai',
  '/v1/chat/completions',
  {
    body: {
      model: 'gpt-4o',
      messages: [
        { role: 'system', content: 'Write an SEO-optimized blog post.' },
        { role: 'user', content: `Target keyword: "AI agent frameworks"
Top SERP results for context:\n${topResults}
Write a 1500-word article that outranks these.` }
      ]
    }
  }
);

console.log(article.data.choices[0].message.content);

Start building your SEO content agent

Create your free account and start building in minutes.