Skip to Content
GuidesGetting Started

Quickstart

Use the human path when you want a reusable API key. Use the agent path when a model or tool runtime should discover the catalog, call MCP tools, or pay per request with x402.

Humans: get a key

Create a free-tier key, store it, then make the first call. Replace YOUR_EMAIL with your email address:

curl -X POST "https://api.creativeforesight.io/v1/signup" \ -H "Content-Type: application/json" \ -d '{"email":"YOUR_EMAIL"}'

The response returns the raw cf_live_ key exactly once, in data.key. Store it as FORESIGHT_API_KEY, then call the observations endpoint:

curl "https://api.creativeforesight.io/v1/observations?indicator=UNRATE&limit=2" \ -H "Authorization: Bearer $FORESIGHT_API_KEY"

The response uses a stable { data, meta } envelope. Each row is one period; the series, region, unit and source are in meta:

{ "data": [ { "period_start": "2026-10-01", "period_end": "2026-10-31", "period_type": "monthly", "value": 4.1 }, { "period_start": "2026-09-01", "period_end": "2026-09-30", "period_type": "monthly", "value": 4.2 } ], "meta": { "indicator": "UNRATE", "region": "US", "unit": "percent", "total": 945, "limit": 2, "offset": 0, "source_attribution": "Contains FRED® data © Federal Reserve Bank of St. Louis" } }

JavaScript

const response = await fetch( 'https://api.creativeforesight.io/v1/observations?indicator=UNRATE&limit=2', { headers: { Authorization: `Bearer ${process.env.FORESIGHT_API_KEY}`, }, }, ) if (!response.ok) { throw new Error(await response.text()) } const body = await response.json() for (const row of body.data) { console.log(row.period_start, row.value, body.meta.unit) }

Python

import os import requests response = requests.get( "https://api.creativeforesight.io/v1/observations", params={"indicator": "UNRATE", "limit": 2}, headers={"Authorization": f"Bearer {os.environ['FORESIGHT_API_KEY']}"}, timeout=30, ) response.raise_for_status() body = response.json() for row in body["data"]: print(row["period_start"], row["value"], body["meta"]["unit"])

Agents: MCP

The streamable HTTP MCP server is at https://api.creativeforesight.io/api/mcp. It exposes catalog tools, observation tools, and a question-answering tool:

ToolPurpose
search_indicatorsFind indicators by text, source, category, or frequency.
list_sourcesList data providers and source metadata.
list_regionsDiscover regions and filter by type or parent region.
get_observationsFetch observation rows for an indicator.
get_latestFetch the latest observation for an indicator.
get_insightsCompute deterministic facts plus active signals for an indicator.
get_active_signalsList currently open Creative Foresight signal intervals.
askAnswer a plain-language question with a citation trace.

Catalog tools work without a key. For ready-made Claude Code, Claude Desktop, and Cursor configs, see Connect over MCP. A client that accepts a URL and headers takes:

{ "mcpServers": { "foresight": { "url": "https://api.creativeforesight.io/api/mcp", "headers": { "Authorization": "Bearer cf_live_..." } } } }

Manual discovery call:

curl -X POST "https://api.creativeforesight.io/api/mcp" \ -H "Authorization: Bearer $FORESIGHT_API_KEY" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

Agents: pay per request

Observation, insight, and signal endpoints also support anonymous per-request payment in USDC on Base, over x402 .

  1. Call /v1/observations, /v1/observations/latest, /v1/insights, /v1/signals, or /v1/signals/active without an API key.
  2. Read the HTTP 402 payment requirements in the response body (also base64-encoded in the PAYMENT-REQUIRED header).
  3. Sign a payment for the advertised amount.
  4. Retry the same request with the signed payload in the PAYMENT-SIGNATURE header.
curl -i "https://api.creativeforesight.io/v1/observations/latest?indicator=UNRATE" curl "https://api.creativeforesight.io/v1/observations/latest?indicator=UNRATE" \ -H "PAYMENT-SIGNATURE: BASE64_PAYMENT_PAYLOAD"

Paid retries that settle successfully include X-Payment-Settled: true.

See Pay per request for the runnable x402 client, the payable endpoints and prices, and discovery.

Last updated on