- Notifications
You must be signed in to change notification settings - Fork0
ColoringPagesDesign Javascript API Wrapper
License
NotificationsYou must be signed in to change notification settings
coloringpagesdesign/cpd-js-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
You can create printable coloring pages for kids and adults.
- VisitColoringPagesDesign.com
- Sign up for a new account
- Access the Developer Portal either:
- From the account dropdown menu → "Developers"
- Or directly at
/developers
- Generate your API key from the developer dashboard
npm install coloring-pages-api
or
yarn add coloring-pages-api
importColoringPagesAPIfrom'coloringpages-api';// Initialize the clientconstapi=newColoringPagesAPI('YOUR_API_KEY');// Request coloring page creationconstcoloringPage=awaitapi.createColoringPage('SUBJECT HERE','STYLE HERE','COMPLEXITY HERE','VISIBILITY HERE');console.log('Result coloring page: ',coloringPage.imageUrl);console.log('Is image safe: ',coloringPage.isImageSafe)
- Access to basic API endpoints
- Rate limited/throttled requests
- Perfect for testing and small projects
- Watermark
- Unlimited API requests
- No rate limiting
- No watermark
Tier | Requests/minute | Daily Limit |
---|---|---|
Free | 10 | 100 |
Paid | Unlimited | Unlimited |
try{constapi=newColoringPagesAPI('YOUR_API_KEY');constsubject='butterfly';// Whatever subject you wantconststyle='pixel-art'// 'figurine', 'pixel-art', 'anime'constcomplexity='easy';// 'easy', 'hard'constvisibility='public';// 'public', 'private'constcoloringPage=awaitapi.createColoringPage(subject,style,complexity,visibility);console.log('Result coloring page: ',coloringPage.imageUrl);console.log('Is image safe: ',coloringPage.isImageSafe)}catch(error){if(error.status===429){console.log('Rate limit exceeded');}else{console.error('API Error:',error.message);}}
Method | Description |
---|---|
createColoringPage(subject, style, complexity, visibility) | Create a new coloring page |
For support, contact our support team atsupport-api@coloringpagesdesign.com.
This project is licensed under the MIT License - see theLICENSE file for details.
We contribute part of our income to climateClimate Carbon Removal