Base URL
https://api.wity.ai
Authentication
All API requests require OAuth2 authentication via the Wity platform. Users must connect their Wity account through the OAuth flow before making API calls.
Authentication Flow
- User authorizes via OAuth2 at
https://auth.wity.ai/oauth-provider/authorize - Access tokens are managed automatically
- Requests are authenticated via nginx reverse proxy
- Session information is passed via headers
API Endpoints
| Endpoint | Method | Description | Credits |
|---|---|---|---|
/zapier/v1/generate-product-listing |
POST | Generate product listing images | 25 |
/list-posts |
GET | List compiled posts with filtering | 0 |
/health |
GET | Health check endpoint | 0 |
| More API endpoints coming soon. | |||
Generate Product Listing
Generate AI-powered product listing images for e-commerce.
Endpoint: POST /zapier/v1/generate-product-listing
Credits Required: 25 credits per request
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
product_name |
string | Yes | Name of the product |
product_image_url |
string | Yes | URL of the product image |
product_description |
string | No | Description of the product |
vendor |
string | No | Vendor/brand name |
Example Request
curl -X POST https://api.wity.ai/zapier/v1/generate-product-listing \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"product_name": "Wireless Gaming Mouse",
"product_image_url": "https://example.com/images/mouse.jpg",
"product_description": "High DPI gaming mouse with RGB lighting",
"vendor": "TechCo"
}'
Success Response
Status Code: 200 OK
{
"success": true,
"data": {
"composition": {
"uid": "comp_abc123",
"status": "completed",
"outputs": [
{
"type": "image",
"url": "https://ugc.wity.ai/outputs/generated-listing.jpg",
"format": "jpg"
}
]
}
},
"meta": {
"timestamp": "2025-01-14T10:30:00.000Z",
"action": "generate-product-listing",
"ttl": 120000,
"creditsUsed": 25,
"availableCredit": 975,
"txnReceipt": "txn_xyz789"
}
}
Error Response
Status Code: 400 Bad Request
{
"success": false,
"error": {
"message": "Invalid action: unknown-action",
"code": "INVALID_ACTION",
"statusCode": 400
},
"meta": {
"timestamp": "2025-01-14T10:30:00.000Z"
}
}
Status Code: 403 Forbidden
{
"success": false,
"error": {
"message": "You have insufficient credits to perform this action",
"code": "INSUFFICIENT_CREDITS",
"statusCode": 403
},
"meta": {
"timestamp": "2025-01-14T10:30:00.000Z"
}
}
Content API
List Posts
Retrieve compiled posts with advanced filtering options.
Endpoint: GET /list-posts
Credits Required: 0
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
startDate |
string | No | Filter posts from this date (ISO 8601) |
endDate |
string | No | Filter posts until this date (ISO 8601) |
contentType |
string | No | Filter by content type |
postFormat |
string | No | Filter by post format |
searchText |
string | No | Search in post content |
customTags |
array | No | Filter by custom tags |
contentLabel |
string | No | Filter by content label |
pageNo |
number | No | Page number (default: 1) |
itemsPerPage |
number | No | Items per page (default: 50) |
Example Request
curl -X GET "https://api.wity.ai/list-posts?contentType=blog&pageNo=1&itemsPerPage=20" \
-H "Authorization: Bearer YOUR_API_KEY"
Success Response
Status Code: 200 OK
{
"success": true,
"data": {
"catalogName": "Compiled Posts",
"itemList": [
{
"urn": "post_abc123",
"cardPoster": "https://ugc.wity.ai/posters/post1.jpg",
"deliverable": { ... },
"platform": "blog",
"postFormat": "article",
"contentType": "blog",
"customTags": ["tech", "tutorial"],
"contentLabel": "featured",
"createdAt": "2025-01-10T08:00:00.000Z",
"updatedAt": "2025-01-10T09:00:00.000Z"
}
],
"totalPages": 5,
"currentPage": 1,
"meta": {}
}
}
Health Check
Health Status
Check API service health.
Endpoint: GET /health
Credits Required: 0
Example Request
curl https://api.wity.ai/health
Success Response
Status Code: 200 OK
OK
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
MISSING_ACTION |
400 | Action parameter is missing |
INVALID_ACTION |
404 | Requested action does not exist |
INVALID_REQUEST |
400 | Malformed request body or parameters |
UNAUTHORIZED |
401 | Missing or invalid authentication |
AUTH_FAILED |
401 | Authentication failed |
MISSING_AUTH_HEADER |
401 | Authorization header not provided |
UNSUPPORTED_AUTH_SCHEME |
401 | Only Bearer and Basic auth supported |
INSUFFICIENT_CREDITS |
403 | Account has insufficient credits |
INTERNAL_ERROR |
500 | Internal server error |
SERVICE_UNAVAILABLE |
503 | Backend service unavailable |
GATEWAY_TIMEOUT |
504 | Request to backend service timed out |
Rate Limits
Rate limits are enforced per API key:
| Limit Type | Default Value |
|---|---|
| Requests per minute | 60 |
| Requests per day | 1,000 |
Rate Limit Headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1610000000
Credits System
Many API actions consume credits from your Wity account.
Credit Costs
| Action | Credits |
|---|---|
| Generate Product Listing | 25 |
| List Posts | 0 |
Response Metadata
When credits are consumed, the response includes:
{
"meta": {
"creditsUsed": 25,
"availableCredit": 975,
"txnReceipt": "txn_xyz789"
}
}
Insufficient Credits
If your account lacks sufficient credits:
Status Code: 403 Forbidden
{
"success": false,
"error": {
"message": "You have insufficient credits to perform this action",
"code": "INSUFFICIENT_CREDITS"
}
}
Webhooks (Coming Soon)
Webhook support for asynchronous action completion notifications will be available in a future release.
Support
For API support and questions:
- Resource Hub: https://www.wity.ai/academy
- Support: support@wity.ai
- Status: https://api.wity.ai/health