A comprehensive web application that demonstrates the Sivi AI API capabilities for AI-driven design generation. This interactive tool allows developers to explore different API functionalities, view real-time responses, monitor logs, and experiment with various input parameters.
- Interactive API Testing: Test Sivi AI API endpoints with a user-friendly interface
- Real-time Monitoring: View API responses, request logs, and performance metrics
- Design Generation: Generate designs from text prompts using Sivi's Large Design Model (LDM)
- Design Variants: Explore multiple variations of generated designs
- Status Polling: Monitor asynchronous design generation progress
- Request History: Track and replay previous API requests
- Preset Templates: Quick-start with predefined design prompts
- Response Visualization: View generated designs and detailed API responses
sivi-api-explorer/
├── client/ # React frontend application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── presets/ # Design prompt presets
│ │ ├── utils/ # Utility functions
│ │ └── hooks/ # Custom React hooks
│ └── public/ # Static assets
└── server/ # Express.js backend server
└── server.js # API proxy server
- Node.js (v16 or higher)
- Yarn package manager
- Sivi AI API key
git clone https://github.com/sivi/sivi-api-explorer.git
cd sivi-api-explorercd server
yarn install
# Create environment file
cp .env.example .envEdit .env file with your Sivi API credentials:
SIVI_API_URL=https://connect.sivi.ai/api/prod/v2
SIVI_API_KEY=your_api_key_hereStart the server:
yarn devServer will run on http://localhost:4000
cd ../client
yarn install
# Create environment file
cp .env.example .envStart the client:
yarn devClient will run on http://localhost:5173
The application provides comprehensive logging:
- Request Timing: Measures API response times
- Status Updates: Real-time status of design generation
- Error Handling: Detailed error messages
- Request History: Persistent storage of API interactions
Server logs include:
designs-from-prompt: 1.234s
get-request-status response: { status: 'processing', progress: 45 }
get-design-variants: 0.567s
Common error scenarios:
- Invalid API key:
401 Unauthorized - Rate limiting:
429 Too Many Requests - Invalid parameters:
400 Bad Request - Server errors:
500 Internal Server Error
The application includes predefined presets for quick testing:
- Social Media Posts: Instagram, Facebook, Twitter formats
- Marketing Materials: Banners, flyers, advertisements
- E-commerce: Product showcases, promotional graphics
- YouTube Thumbnails: Video preview images
- Business Cards: Professional networking materials
SIVI_API_URL=https://connect.sivi.ai/api/prod/v2
SIVI_API_KEY=your_api_key_hereMY_SERVER_ENDPOINT=http://localhost:4000# Build client
cd client
yarn build
# The built files will be in client/dist/# Dockerfile example
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN yarn install
COPY . .
EXPOSE 4000
CMD ["yarn", "dev"]- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Commit changes:
git commit -am 'Add new feature' - Push to branch:
git push origin feature/new-feature - Submit a pull request
For complete API documentation, visit:
- Sivi API Docs: https://developer.sivi.ai/docs/sivi-api/overview
- SDK Documentation: https://developer.sivi.ai/docs/sivi-ui-sdk/overview
API Key Issues:
Error: 401 Unauthorized
Solution: Verify your SIVI_API_KEY in the .env fileCORS Errors:
Error: CORS policy blocked
Solution: Ensure server is running on port 4000Design Generation Timeout:
Error: Request timeout
Solution: Complex designs may take longer; increase polling intervalThis project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ by the Sivi AI team