API v1.0

Epoxy API Documentation

Integrate AI-powered flooring visualization into your applications with our comprehensive REST API. Create stunning floor transformations programmatically with just a few API calls.

API Documentation

Introduction

xxThe Epoxy API allows you to integrate AI-powered flooring visualization into your applications. We offer two types of API access: Third-party API for external integrations and User API for registered users.

Base URL: https://www.andymarkovits.com/api/v1
API Types
Third-party API

For external applications and integrations

  • API key authentication
  • Free credits for testing
  • Rate limiting by API key
  • Automatic polling on status requests
User API

For registered Epoxy users

  • Sanctum token authentication
  • Credit-based billing
  • Advanced polling endpoints
  • Full CRUD operations
Key Features
  • Generate AI-powered flooring visualizations
  • Support for multiple room types and flooring materials
  • High-quality image output with compression
  • Automatic polling for status updates
  • Webhook support for async processing
  • Comprehensive error handling

Authentication

Authentication methods vary by API type. Choose the appropriate method for your use case.

Third-party API (API Key)

For external integrations and third-party applications

curl https://www.andymarkovits.com/api/v1/generations \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json"

Get your API key from the dashboard → API Keys section

User API (Sanctum Token)

For registered Epoxy users and applications

curl https://www.andymarkovits.com/api/v1/generations \
  -H "Authorization: Bearer YOUR_SANCTUM_TOKEN" \
  -H "Content-Type: application/json"

Get your token from /api/auth/login or dashboard

Security: Never expose your API keys or tokens in client-side code. Always use server-side requests.

Quick Start

Get started with a simple generation request. Choose the API type that fits your needs.

1. Create Generation
curl -X POST https://www.andymarkovits.com/api/v1/generations \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_method": "url",
    "flooring_type": "hardwood",
    "texture_name": "TUXEDO",
    "image_url": "https://example.com/room.jpg",
    "custom_prompt": "Modern hardwood flooring"
  }'
2. Check Status (with automatic polling)
curl https://www.andymarkovits.com/api/v1/generations/GENERATION_UUID \
  -H "X-API-Key: YOUR_API_KEY"
Note: Third-party API automatically polls Magic Hour on status requests. No need for separate polling calls.
1. Get Authentication Token
curl -X POST https://www.andymarkovits.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"password"}'
2. Create Generation
curl -X POST https://www.andymarkovits.com/api/v1/generations \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "input_method": "upload",
    "flooring_type": "tile",
    "texture_name": "CALIFORNIA GRAY",
    "image_file": "@room.jpg"
  }'
3. Poll Status
curl https://www.andymarkovits.com/api/v1/generations/GENERATION_ID/poll \
  -H "Authorization: Bearer YOUR_TOKEN"

Rate Limits

API rate limits vary by authentication method to ensure fair usage and prevent abuse.

Third-Party API Limits
  • Generation Creation: 10 requests per minute
  • Status Polling: 60 requests per minute
  • Image Download: 100 requests per minute
  • List Generations: 30 requests per minute
User API Limits
  • All Endpoints: 100 requests per minute
  • Generation Creation: 20 requests per minute
  • Credit Balance: 60 requests per minute
Rate Limit Headers: When approaching limits, the API includes headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Rate Limit Exceeded Response
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please try again later.",
    "details": {
      "retry_after": 60,
      "limit": 10,
      "remaining": 0,
      "reset_time": "2025-10-30T15:35:00Z"
    }
  }
}
Note: Rate limits are enforced per API key for third-party access and per user for authenticated access.

API Endpoints

Authentication

POST https://www.andymarkovits.com/api/v1/api/v1/auth/register

Register new user

Headers
Header Value Required
Authorization Bearer YOUR_TOKEN Yes
Content-Type application/json Yes
Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
POST https://www.andymarkovits.com/api/v1/api/v1/auth/login

Login user

Headers
Header Value Required
Authorization Bearer YOUR_TOKEN Yes
Content-Type application/json Yes
Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
POST https://www.andymarkovits.com/api/v1/api/v1/auth/logout

Logout user

Headers
Header Value Required
Authorization Bearer YOUR_TOKEN Yes
Content-Type application/json Yes
Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
POST https://www.andymarkovits.com/api/v1/api/v1/auth/refresh

Refresh token

Headers
Header Value Required
Authorization Bearer YOUR_TOKEN Yes
Content-Type application/json Yes
Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
GET https://www.andymarkovits.com/api/v1/api/v1/auth/me

Get authenticated user

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}

Generations

POST https://www.andymarkovits.com/api/v1/api/v1/generations

Create new generation

Headers
Header Value Required
Authorization Bearer YOUR_TOKEN Yes
Content-Type application/json Yes
Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
GET https://www.andymarkovits.com/api/v1/api/v1/generations

List all generations

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
GET https://www.andymarkovits.com/api/v1/api/v1/generations/{id}

Get single generation

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
DELETE https://www.andymarkovits.com/api/v1/api/v1/generations/{id}

Delete generation

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
GET https://www.andymarkovits.com/api/v1/api/v1/generations/{id}/status

Check generation status

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
GET https://www.andymarkovits.com/api/v1/api/v1/generations/{id}/poll

Poll generation status

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}

Credits

GET https://www.andymarkovits.com/api/v1/api/v1/credits/balance

Get credit balance

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
GET https://www.andymarkovits.com/api/v1/api/v1/credits/transactions

Get credit transactions

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
GET https://www.andymarkovits.com/api/v1/api/v1/credits/pricing

Get credit pricing

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}

User

GET https://www.andymarkovits.com/api/v1/api/v1/user/profile

Get user profile

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
PUT https://www.andymarkovits.com/api/v1/api/v1/user/profile

Update user profile

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
PUT https://www.andymarkovits.com/api/v1/api/v1/user/password

Change password

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
DELETE https://www.andymarkovits.com/api/v1/api/v1/user/account

Delete account

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}
GET https://www.andymarkovits.com/api/v1/api/v1/user/stats

Get user statistics

Response
{
  "success": true,
  "data": "Response data varies by endpoint",
  "message": "Operation completed successfully"
}

Testing Guide

Step-by-step guide to test the Epoxy API endpoints.

1. Get API Key (Third-party API)

Visit your dashboard → API Keys section to create and manage your API keys.

2. Test Generation Creation
# Using URL input (easiest for testing)
curl -X POST https://www.andymarkovits.com/api/v1/generations \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_method": "url",
    "flooring_type": "hardwood",
    "texture_name": "TUXEDO",
    "image_url": "https://example.com/room-image.jpg"
  }'
3. Check Generation Status
# Replace UUID with the one from step 2
curl https://www.andymarkovits.com/api/v1/generations/YOUR_GENERATION_UUID \
  -H "X-API-Key: YOUR_API_KEY"

Keep calling this endpoint every 5-10 seconds until status becomes "completed".

4. Download Results

Once completed, the response will include:

  • generated_image - Full HD result
  • original_image - Your uploaded image
Tip: Use a tool like HTTPie or Insomnia for easier API testing with better JSON formatting.
5. Available Textures

Use these texture names in your requests:

Flake Textures:
  • TUXEDO - Light Tuxedo Flake
  • HAZZELNUT - Gold Hazelnut Flake
  • CALIFORNIA GRAY - California Gray Flake
Standard Types:
  • hardwood - Natural hardwood
  • tile - Ceramic/porcelain tile
  • carpet - Plush carpet
  • marble - Luxury marble

Error Handling

The API uses standard HTTP status codes and returns detailed error messages in JSON format.

Status Codes
Code Description Common Causes
200 Success Request completed successfully
201 Created Generation created successfully
400 Bad Request Missing required parameters, invalid input
401 Unauthorized Invalid API key or token
402 Payment Required Insufficient credits
404 Not Found Generation or resource not found
422 Unprocessable Entity Validation failed
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server-side error
Error Response Format
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "You do not have enough credits to perform this action",
    "details": {
      "required": 50,
      "available": 25,
      "needed": 25
    }
  }
}
Common Error Codes
Error Code Description HTTP Status
INSUFFICIENT_CREDITS Not enough credits for the operation 402
GENERATION_NOT_FOUND The requested generation doesn't exist 404
VALIDATION_FAILED Input validation failed 422
INVALID_API_KEY API key is invalid or inactive 401
RATE_LIMIT_EXCEEDED Too many requests in time period 429
SERVER_ERROR Unexpected server error 500

Webhooks

Receive real-time notifications when generations complete or fail.

Webhook URL: Configure your webhook URL in the API Keys section of your dashboard.
Supported Events
Event Description Trigger
generation.completed Generation finished successfully When AI processing completes
generation.failed Generation failed When processing encounters an error
Webhook Payload
{
  "event": "generation.completed",
  "timestamp": "2025-10-30T15:32:15Z",
  "data": {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "status": "completed",
    "created_at": "2025-10-30T15:30:00Z",
    "processed_at": "2025-10-30T15:32:15Z",
    "original_image": "https://www.andymarkovits.com/assets/generations/originals/550e8400-e29b-41d4-a716-446655440000.jpg",
    "generated_image": "https://www.andymarkovits.com/assets/generations/hd/550e8400-e29b-41d4-a716-446655440000.jpg",
    "flooring_type": "hardwood",
    "texture_name": "TUXEDO"
  }
}
Security
  • Webhooks include an X-Webhook-Signature header for verification
  • Use your API key secret to verify the signature
  • Always validate the payload before processing
Important: Webhook endpoints must respond with HTTP 200 within 10 seconds to avoid retries.

SDKs & Libraries

Official SDKs and libraries to accelerate your integration.

PHP SDK

Composer package for Laravel & PHP

composer require epoxy/php-sdk Documentation
JavaScript SDK

NPM package for Node.js

npm install @epoxy/js-sdk Documentation
Python SDK

PyPI package for Python

pip install epoxy-python Documentation
Ruby SDK

RubyGems package for Ruby

gem install epoxy Documentation

Support

Need help? We're here for you.

Live Chat

24/7 support for Pro & Enterprise

Email Support

[email protected]

GitHub

Report issues & contribute