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).
Customize Parameters
Modify request parameters, headers, and body to match your testing needs.
Execute Request
Click the “Send” button to execute the API call and view the response.
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
1
Generate Access Token
Navigate to the Generate Access Token endpoint.
2
Configure Basic Auth
Set up Basic Authentication with your client credentials.
3
Execute Request
Click “Send” to generate an access token.
4
Use Token
Copy the access token and use it for other external API requests.
Testing Console APIs
1
Login First
Navigate to the Login endpoint.
2
Get Access Token
Login to receive your access token and refresh token.
3
Test Other Endpoints
Use the access token with
x-source: console header for other console endpoints.Testing Admin APIs
1
Admin Authentication
Navigate to the Admin Login endpoint.
2
Get Admin Token
Authenticate to receive admin access token.
3
Test Admin Endpoints
Use the admin token for administrative operations.
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
Next Steps
Explore Endpoints
Browse the API reference to find endpoints relevant to your use case.
Test Authentication
Start with authentication endpoints to get your access tokens.
Try Core Features
Test team, organization, and platform management endpoints.
Integrate Into Code
Once tested, use the code examples to integrate into your application.