QuickStart Guide

AI Crypto News QuickStart Guide

ChainGPT’s AI News Generator delivers curated crypto & blockchain‑AI news through a REST API, JavaScript/TypeScript SDK, and public RSS feeds. Integrate once, fetch fresh stories in seconds, and build features like personalized feeds, dashboards, or alerts.


Prerequisites

  • ChainGPT account with credits and an API key

  • Node ≥ 18 (for SDK examples)

  • curl or any HTTP client

  • Ability to set the environment variable CHGPT_API_KEY


Install the SDK

# npm
npm install --save @chaingpt/ainews

# yarn
yarn add @chaingpt/ainews

Authenticate

REST

SDK

The key is charged 1 credit per 10 records returned.


Generate your first article

REST (minimal)

Returns JSON with an array of articles sorted by createdAt.

SDK (equivalent)

Optional filters: categoryId, subCategoryId, tokenId, fetchAfter, searchQuery, sortBy (createdAt or publishedAt).


Consume via RSS

Need a zero‑code option? Subscribe to the public feeds:

  • General (All Crypto) feed https://app.chaingpt.org/rssfeeds.xml

  • Bitcoin feed https://app.chaingpt.org/rssfeeds-bitcoin.xml

  • BNB feed https://app.chaingpt.org/rssfeeds-bnb.xml

  • Ethereum feed https://app.chaingpt.org/rssfeeds-ethereum.xml

Note:

  • More categories via RSS feed may be available by request.

  • Via RSS feed you can views up to the last 30 days.


Error handling & rate limits

  • REST returns standard HTTP codes; non‑2xx responses include a JSON message.

  • SDK throws AINewsError; catch and inspect error.message.

  • Limit: 200 requests / minute per key; burst above rate is throttled.


Next steps

  • Pagination – use limit & offset to page through results.

  • Advanced filtering – full category, sub‑category, and token ID lists.

  • Production hardening – implement caching and exponential back‑off.


Resources

Happy building!

Last updated

Was this helpful?