Skip to main content

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:
Authentication Method: Basic Authentication or Bearer Token
  1. For token generation: Use Basic Auth with your client credentials
  2. For other endpoints: Use Bearer token from the generated access token
Authorization: Basic base64(clientId:secretKey)
// or
Authorization: Bearer YOUR_ACCESS_TOKEN
Authentication Method: Bearer Token + x-source header
  1. Login to get access token
  2. Add Bearer token to Authorization header
  3. Add x-source: console header
Authorization: Bearer YOUR_ACCESS_TOKEN
x-source: console
Authentication Method: Admin Bearer Token
  1. Authenticate as admin to get admin access token
  2. Add Bearer token to Authorization header
Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN

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

  • Always use test data in the playground
  • Don’t use production credentials
  • Create test accounts and resources for playground testing
  • Be aware of API rate limits while testing
  • Avoid rapid successive calls that might trigger rate limiting
  • Monitor rate limit headers in responses
  • Never share your API credentials publicly
  • Use environment-specific credentials (dev/staging)
  • Rotate credentials if accidentally exposed
  • 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:

Troubleshooting

Problem: Getting unauthorized errors in playgroundSolutions:
  • Verify your authentication credentials are correct
  • Check token hasn’t expired
  • Ensure proper header format (Bearer token, x-source, etc.)
  • Generate new token if needed
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
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.
Pro Tip: The playground is perfect for quick testing and exploration. Use the “Generate Code” feature to get working code snippets for your preferred programming language.