Getting Started

Installation

To install the AI News SDK, please follow these steps:

  1. Create a Node Application: Initiate a new application in your Node.js environment.

  2. Open Terminal or Command Prompt:

    • For Linux-based operating systems, use the terminal.

    • For Windows, use the command prompt.

  3. Run Installation Commands: Execute the provided commands in your terminal or command prompt to install the SDK.

npm install --save @chaingpt/ainews
# or
yarn add ainews

Configuration

Credits System

  • Initial Setup: Start by acquiring credits in the web application https://app.chaingpt.org/. These credits are necessary to create an API key and access the SDK functionalities.

  • Usage and Deduction: Credits will be deducted with each request using the SDK.

Setup API Key

  • Generating API Key: Utilize the ChainGPT API SDK for authentication. In the web application, navigate to the API Dashboard and use the 'Create Secret Key' feature to generate and copy your API key.

Securing API Key:

  • It is crucial to secure your API keys to control access effectively.

  • Avoid exposing the API keys in your code or public repositories.

  • Store them in a secure location, and use environment variables or a secret management service for exposure to your application.

  • This method ensures you do not need to hard-code them in your codebase, enhancing security.

Pricing

The AI News SDK operates on a credit-based pricing model. Each request made through the SDK deducts one credit from the user's account. This model facilitates a pay-per-use structure, ensuring that users only pay for what they need, allowing for both flexibility and scalability.

Users can monitor and manage their credit usage via the Webapp, aligning with ChainGPT's user-centric approach to accessibility and transparency in service provision.

For additional details or to manage your credits, users should visit the ChainGPT Webapp.

Support

For additional assistance, refer to Discord - https://discord.gg/chaingpt

Disclaimer

Last updated

Logo

ChainGPT.org