AI Placeholder
Overview of AI Placeholder
What is AI Placeholder?
AI Placeholder is a free AI-powered API designed to generate fake (dummy) data for testing and prototyping purposes. It leverages the power of OpenAI's GPT-3.5-Turbo model to create realistic and customizable datasets.
How does AI Placeholder work?
AI Placeholder utilizes the OpenAI API to generate dummy content based on user-defined parameters. Users can specify the type of data they need, the number of records, and the specific fields each record should contain. The API then returns a JSON response containing the generated data.
Key Features:
- AI-Powered Content Generation: Uses OpenAI's GPT-3.5-Turbo to create realistic and varied dummy data.
- Customizable Data Types: Generate data for various content types, such as tweets, posts, e-commerce products, CRM deals, and more.
- Field Specification: Specify the fields that each record object should include (e.g., userId, caption, imageUrl for Instagram posts).
- Flexible Querying: Supports imaginary query strings and paths for complex data requests.
- Self-Hosting Option: Users can choose to use the hosted version or self-host the API for greater control and customization.
How to use AI Placeholder?
Using the Hosted API:
AI Placeholder offers a hosted API that can be directly accessed without any setup. To use the hosted API, simply make HTTP requests to the appropriate endpoints.
Examples:
A basic list of forum users:
Request: /forum/users Response: JSON data of forum usersList of CRM sales deals with a deal size of more than 10K:
Request: /crm/deals?amount_greater_than=10000 Response: JSON data of CRM sales dealsList of products from a marketplace sorted by price:
Request: /marketplace/products?sort_by=price Response: JSON data of marketplace products
Generating Data with Rules:
To generate data with specific rules, use the following route:
/fake/:content_type/:number_of_records?/:fields_separated_by_commas?
Parameters:
:content_type: The type of content you want to generate (e.g., tweet, post, instagram-posts, linkedin-posts).:number_of_records(optional): The number of records you want to retrieve.:fields_separated_by_commas(optional): The fields that each record object should have, separated by commas.
Examples:
Requesting 6 Instagram posts with userId, caption, and imageUrl fields:
Request: /fake/instagram_post/6/userId,caption,imageUrl Response: JSON array of 6 Instagram post objects
Self-Hosting AI Placeholder:
To self-host AI Placeholder, follow these steps:
Clone the repository:
git clone https://github.com/terryds/ai-placeholderCreate the .env file:
cp .env.example .envOpen the .env file and enter your OpenAI API credentials.
Start the server:
deno task dev
Why choose AI Placeholder?
AI Placeholder simplifies the process of generating dummy data for testing and prototyping. By leveraging AI, it provides realistic and customizable data, saving developers time and effort. Whether you need to mock API responses, populate databases, or create sample content, AI Placeholder offers a flexible and efficient solution.
Who is AI Placeholder for?
AI Placeholder is ideal for:
- Developers: Who need to test their applications with realistic data.
- QA Engineers: Who require dummy data for testing purposes.
- Prototypers: Who need to quickly generate sample data for prototypes.
- Anyone: Who needs to mock data for various applications and scenarios.
Deployment
AI Placeholder can be deployed using Deno Deploy. However, due to current limitations, a GitHub Actions workflow is recommended for deployment.
Contributing
Contributions are welcome! Please open an issue to discuss major changes before submitting a pull request.
Support
This project is maintained by a single developer. Support the project by donating at https://www.buymeacoffee.com/terrydjony.
Tags Related to AI Placeholder