API Playground
Test Weir AI API endpoints directly in your browser with our interactive API playground. No external tools or setup required.Interactive Testing: The API playground allows you to make real API calls directly from this documentation, making it easy to test endpoints and see responses in real-time.
Getting Started with the Playground
Choose an Endpoint
Navigate to any API endpoint in the reference section. Each endpoint page includes an interactive playground.
Set Up Authentication
Configure your authentication credentials (API key, access token, or client credentials).
How to Use the Playground
Authentication Setup
Different API categories require different authentication methods:External APIs
External APIs
Authentication Method: Basic Authentication or Bearer Token
- For token generation: Use Basic Auth with your client credentials
- For other endpoints: Use Bearer token from the generated access token
Console APIs
Console APIs
Authentication Method: Bearer Token + x-source header
- Login to get access token
- Add Bearer token to Authorization header
- Add
x-source: consoleheader
Admin APIs
Admin APIs
Authentication Method: Admin Bearer Token
- Authenticate as admin to get admin access token
- Add Bearer token to Authorization header
Playground Features
Real-Time Testing
Execute actual API calls against the live API and see real responses immediately.
Parameter Editing
Modify all request parameters, headers, and body content before sending requests.
Response Inspection
View formatted response bodies, status codes, and headers for each request.
Code Generation
Generate code snippets in multiple languages based on your playground configuration.
Error Handling
See detailed error messages and responses to help debug integration issues.
History Tracking
Keep track of your recent API calls for easy reference and comparison.
Quick Start Examples
Testing External APIs
Generate Access Token
Navigate to the Generate Access Token endpoint.
Testing Console APIs
Login First
Navigate to the Login endpoint.
Testing Admin APIs
Admin Authentication
Navigate to the Admin Login endpoint.
Best Practices
Use Test Data
Use Test Data
- Always use test data in the playground
- Don’t use production credentials
- Create test accounts and resources for playground testing
Understand Rate Limits
Understand Rate Limits
- Be aware of API rate limits while testing
- Avoid rapid successive calls that might trigger rate limiting
- Monitor rate limit headers in responses
Secure Your Credentials
Secure Your Credentials
- Never share your API credentials publicly
- Use environment-specific credentials (dev/staging)
- Rotate credentials if accidentally exposed
Save Your Configuration
Save Your Configuration
- Export your playground configuration for reuse
- Save successful request configurations
- Document working examples for your team
Supported Endpoints
The playground is available for all API endpoints:External APIs
2 endpoints available for testing
Console APIs
51 endpoints available for testing
Admin APIs
26 endpoints available for testing
Troubleshooting
401 Unauthorized Errors
401 Unauthorized Errors
CORS Issues
CORS Issues
Problem: CORS errors when testing from browserSolutions:
- The playground should handle CORS automatically
- If issues persist, try using a different browser
- Check that you’re on the official documentation domain
Invalid Request Format
Invalid Request Format
Problem: Getting 400 Bad Request errorsSolutions:
- Verify request body is valid JSON
- Check all required parameters are provided
- Ensure parameter types match expectations
- Review the endpoint documentation for requirements
Alternative Testing Tools
If you prefer external tools, you can also test the API using:cURL
Copy code examples directly from endpoint documentation
Postman
Import the Postman collection for comprehensive testing
Insomnia
Use Insomnia REST client with our API examples
Code Examples
Use ready-to-run code examples in your preferred language