{"_id":"@artistify/artistify-sdk-express","name":"@artistify/artistify-sdk-express","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@artistify/artistify-sdk-express","version":"1.0.0","description":"Express application showcasing the Artistify AI SDK","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js","prepublishOnly":"npm test","test":"echo \"No tests yet\""},"keywords":["artistify","sdk","express","api","ai","image-generation","song-generation"],"author":{"name":"Artistify AI"},"repository":{"type":"git","url":"git+https://github.com/yourusername/artistify-sdk-express.git"},"dependencies":{"artistify-ai-sdk":"latest","express":"^4.18.2","dotenv":"^16.0.3","cors":"^2.8.5","morgan":"^1.10.0"},"devDependencies":{"nodemon":"^2.0.22"},"engines":{"node":">=14.0.0"},"license":"MIT","_id":"@artistify/artistify-sdk-express@1.0.0","bugs":{"url":"https://github.com/yourusername/artistify-sdk-express/issues"},"homepage":"https://github.com/yourusername/artistify-sdk-express#readme","_nodeVersion":"23.10.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-A/I1OJm8Xvrxqb+ax8LdTD0O7Zn7SSsz1pCjfFJM+6IZoEPbHPufQKf13dyVdNQnf3iDVG1MVSoxOhlpDHB5Cg==","shasum":"a19351bc435c9c349a5a8cb8daf68d41f205f09b","tarball":"https://registry.npmjs.org/@artistify/artistify-sdk-express/-/artistify-sdk-express-1.0.0.tgz","fileCount":12,"unpackedSize":15317,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDh1SZqnYZ1voVStpDJSFl3Y8BTONXa1i2sVM580pSwOQIhAPmhvKGFaKy2vM3szvmpUuWN8WZdK13sGGFlKptqujiK"}]},"_npmUser":{"name":"artistify","email":"info@artistify.xyz"},"directories":{},"maintainers":[{"name":"artistify","email":"info@artistify.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/artistify-sdk-express_1.0.0_1746391732891_0.46799859883442685"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-04T20:48:52.812Z","1.0.0":"2025-05-04T20:48:53.068Z","modified":"2025-05-04T20:48:53.316Z"},"maintainers":[{"name":"artistify","email":"info@artistify.xyz"}],"description":"Express application showcasing the Artistify AI SDK","homepage":"https://github.com/yourusername/artistify-sdk-express#readme","keywords":["artistify","sdk","express","api","ai","image-generation","song-generation"],"repository":{"type":"git","url":"git+https://github.com/yourusername/artistify-sdk-express.git"},"author":{"name":"Artistify AI"},"bugs":{"url":"https://github.com/yourusername/artistify-sdk-express/issues"},"license":"MIT","readme":"# Artistify AI SDK Express Server\r\n\r\nThis Express server provides a RESTful API interface to the Artistify AI SDK, allowing you to easily integrate the Artistify AI platform into your applications.\r\n\r\n## Features\r\n\r\n- Authentication with Solana wallet-based credentials\r\n- Image generation API\r\n- Song generation API\r\n- User management\r\n- Agents listing\r\n- Analytics data\r\n- Webhook support for event notifications\r\n\r\n## Installation\r\n\r\n1. Clone this repository\r\n2. Install dependencies:\r\n\r\n```bash\r\nnpm install\r\n```\r\n\r\n3. Create a `.env` file in the root directory with the following variables:\r\n\r\n```\r\nPORT=3000\r\nARTISTIFY_API_URL=https://your-artistify-instance.com/api\r\n```\r\n\r\n## Running the Server\r\n\r\n### Development mode\r\n\r\n```bash\r\nnpm run dev\r\n```\r\n\r\n### Production mode\r\n\r\n```bash\r\nnpm start\r\n```\r\n\r\n## API Endpoints\r\n\r\n### Authentication\r\n\r\n- `GET /api/auth/message` - Get a message to sign\r\n- `POST /api/auth/authenticate` - Authenticate with signed message\r\n- `POST /api/auth/logout` - Logout\r\n\r\n### Images\r\n\r\n- `GET /api/images` - List images\r\n- `GET /api/images/:id` - Get a specific image\r\n- `GET /api/images/:id/status` - Check image generation status\r\n- `POST /api/images` - Create a new image\r\n\r\n### Songs\r\n\r\n- `GET /api/songs` - List songs\r\n- `GET /api/songs/:id` - Get a specific song\r\n- `GET /api/songs/:id/status` - Check song generation status\r\n- `POST /api/songs` - Create a new song\r\n- `POST /api/songs/generate` - Generate a song directly\r\n\r\n### User\r\n\r\n- `GET /api/user/info` - Get current user information\r\n- `GET /api/user/credits` - Get user credits\r\n\r\n### Agents\r\n\r\n- `GET /api/agents` - List available agents\r\n- `GET /api/agents/:id` - Get a specific agent\r\n\r\n### Analytics\r\n\r\n- `GET /api/analytics` - Get analytics data\r\n\r\n### Webhooks\r\n\r\n- `POST /api/webhooks/register` - Register a webhook for notifications\r\n- `POST /api/webhooks/callback` - Webhook callback endpoint (for Artistify AI to send events)\r\n\r\n## Authentication\r\n\r\nThis server uses Solana wallet-based authentication. To authenticate:\r\n\r\n1. Call `GET /api/auth/message` to get a message string\r\n2. Sign the message with a Solana wallet\r\n3. Send the signed message, original message, and public key to `POST /api/auth/authenticate`\r\n4. The server will return a success response if authentication is successful\r\n\r\n## Webhooks\r\n\r\nYou can set up webhook listeners to be notified when specific events occur on the Artistify AI platform.\r\n\r\nTo register a webhook:\r\n\r\n```javascript\r\n// Register a webhook for song and image completion events\r\nconst webhook = await fetch(\"/api/webhooks/register\", {\r\n  method: \"POST\",\r\n  headers: {\r\n    \"Content-Type\": \"application/json\",\r\n  },\r\n  body: JSON.stringify({\r\n    url: \"https://your-server.com/webhook-endpoint\",\r\n    events: [\"song.completed\", \"image.completed\"],\r\n  }),\r\n});\r\n```\r\n\r\nThe `POST /api/webhooks/callback` endpoint is used internally by the Artistify AI platform to deliver webhook events to this server.\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md","_rev":"1-7ac9ac1e79e73f592b24af283aaa1b02"}