API Documentation

Complete documentation for the Baccarat Prediction API endpoints

Introduction

The Baccarat Prediction API provides access to information about live casino providers, their online tables, and baccarat prediction functionality. All API responses are in JSON format.

Base URL: https://api.ai4baccarat.com

Authentication

Currently, the API does not require authentication. This may change in future versions.

Landing Page

GET /api/landing-page

Returns combined data for the landing page, including banners, recommended tables, and providers.

Response Example:
{
  "success": true,
  "data": {
    "banners": [
      {
        "id": 3,
        "title": "Special Bonus Banner",
        "description": "Limited time offer with special bonus",
        "image_url": "https://example.com/images/banner.jpg",
        "target_url": "https://example.com/special-bonus",
        "position": "home",
        "provider_id": "evolution",
        "priority": 100,
        "start_date": "2025-05-01T00:00:00",
        "end_date": null,
        "provider": {
          "id": "evolution",
          "name": "Evolution Gaming",
          "image": "https://example.com/images/evolution.jpg"
        }
      }
    ],
    "recommended_tables": [
      {
        "id": "evo_bac_vip",
        "name": "VIP Baccarat",
        "type": "baccarat",
        "min_bet": 100.0,
        "max_bet": 50000.0,
        "status": "online",
        "current_players": 41,
        "features": ["squeeze", "statistics", "roadmaps", "vip_service"],
        "provider": {
          "id": "evolution",
          "name": "Evolution Gaming",
          "image": "https://example.com/images/evolution.jpg"
        },
        "recommendation": {
          "reason": "Top VIP experience with premium features",
          "feature_highlight": "vip_service"
        }
      }
    ],
    "providers": [
      {
        "id": "evolution",
        "name": "Evolution Gaming",
        "description": "Leading provider of live casino solutions",
        "status": "active",
        "image": "https://example.com/images/evolution.jpg",
        "supported_games": ["baccarat", "blackjack", "roulette"]
      }
    ]
  }
}

Providers

GET /api/providers

Returns a list of all available live casino providers.

Response Example:
{
  "success": true,
  "providers": [
    {
      "id": "evolution",
      "name": "Evolution Gaming",
      "description": "Leading provider of live casino solutions",
      "status": "active",
      "supported_games": ["baccarat", "blackjack", "roulette"],
      "image": "https://ik.imagekit.io/njzzfw1h3/evolution-gaming-logo.png"
    },
    {
      "id": "playtech",
      "name": "Playtech",
      "description": "Global leader in gambling technology",
      "status": "active",
      "supported_games": ["baccarat", "blackjack", "roulette", "poker"]
    }
  ]
}

GET /api/providers/{provider_id}

Returns details for a specific provider.

Parameters:
  • provider_id - The ID of the provider (required)
Response Example:
{
  "success": true,
  "provider": {
    "id": "evolution",
    "name": "Evolution Gaming",
    "description": "Leading provider of live casino solutions",
    "status": "active",
    "supported_games": ["baccarat", "blackjack", "roulette"],
    "image": "https://ik.imagekit.io/njzzfw1h3/evolution-gaming-logo.png"
  }
}

Tables

GET /api/providers/{provider_id}/tables

Returns a list of online tables for a specific provider.

Parameters:
  • provider_id - The ID of the provider (required)
Response Example:
{
  "success": true,
  "provider": {
    "id": "evolution",
    "name": "Evolution Gaming",
    "description": "Leading provider of live casino solutions",
    "status": "active",
    "supported_games": ["baccarat", "blackjack", "roulette"],
    "image": "https://ik.imagekit.io/njzzfw1h3/evolution-gaming-logo.png"
  },
  "tables": [
    {
      "id": "evo_bac_1",
      "name": "Baccarat A",
      "type": "baccarat",
      "min_bet": 5,
      "max_bet": 10000,
      "status": "online",
      "current_players": 24, /* Random value, changes with each request */
      "features": ["squeeze", "statistics"]
    },
    {
      "id": "evo_bac_2",
      "name": "Baccarat B",
      "type": "baccarat",
      "min_bet": 10,
      "max_bet": 20000,
      "status": "online",
      "current_players": 15, /* Random value, changes with each request */
      "features": ["squeeze", "statistics", "roadmaps"]
    }
  ]
}

Banners

GET /api/banners

Returns a list of active promotional banners.

Query Parameters:
  • position - Filter by position (e.g., 'home', 'tables', 'specific-provider') (optional)
  • provider_id - Filter by provider ID (optional)
  • limit - Maximum number of banners to return (optional, default: 10)
Response Example:
{
  "success": true,
  "banners": [
    {
      "id": 3,
      "title": "Special Bonus Banner",
      "description": "Limited time offer with special bonus",
      "image_url": "https://example.com/images/banner.jpg",
      "target_url": "https://example.com/special-bonus",
      "position": "home",
      "provider_id": "evolution",
      "priority": 100,
      "start_date": "2025-05-01T00:00:00",
      "end_date": null,
      "provider": {
        "id": "evolution",
        "name": "Evolution Gaming",
        "image": "https://example.com/images/evolution.jpg"
      }
    }
  ]
}

GET /api/banners/{banner_id}

Returns details for a specific banner.

Parameters:
  • banner_id - The ID of the banner (required)
Response Example:
{
  "success": true,
  "banner": {
    "id": 3,
    "title": "Special Bonus Banner",
    "description": "Limited time offer with special bonus",
    "image_url": "https://example.com/images/banner.jpg",
    "target_url": "https://example.com/special-bonus",
    "position": "home",
    "provider_id": "evolution",
    "priority": 100,
    "start_date": "2025-05-01T00:00:00",
    "end_date": null,
    "provider": {
      "id": "evolution",
      "name": "Evolution Gaming",
      "image": "https://example.com/images/evolution.jpg"
    }
  }
}

Predictions

POST /api/predictions

Generate a baccarat prediction based on provided game data.

Request Body:
{
  "provider_id": "evolution", // required
  "table_id": "evo_bac_1", // required
  "game_history": "PBPBBBPPPPP" // optional (P=Player, B=Banker, T=Tie)
}
Response Example:
{
  "success": true,
  "prediction": {
    "provider_id": "evolution",
    "table_id": "evo_bac_1",
    "recommended_bet": "Banker",
    "confidence": 75,
    "message": "After 5 consecutive Player wins, trend is likely to change."
  }
}

Banners

GET /api/banners

Get a list of active promotional banners.

Query Parameters:
  • position - Filter by position (e.g., 'home', 'tables', 'specific-provider') (optional)
  • provider_id - Filter by provider ID (optional)
  • limit - Maximum number of banners to return (optional)
Example Requests:
  • /api/banners?position=home - Get banners for the home page
  • /api/banners?provider_id=evolution - Get banners for Evolution Gaming
  • /api/banners?limit=2 - Get the top 2 banners by priority
Response Example:
{
  "success": true,
  "banners": [
    {
      "id": 1,
      "title": "Welcome Bonus",
      "description": "Get 100% bonus on your first deposit",
      "image_url": "https://ik.imagekit.io/njzzfw1h3/banner-welcome-bonus.jpg",
      "target_url": "/promotions/welcome",
      "position": "home",
      "provider_id": null,
      "active": true,
      "priority": 100,
      "start_date": "2025-05-08T00:00:00",
      "end_date": "2025-06-07T00:00:00",
      "provider": null
    },
    {
      "id": 2,
      "title": "Evolution Gaming Special",
      "description": "Try the new Lightning Baccarat tables",
      "image_url": "https://ik.imagekit.io/njzzfw1h3/banner-evolution-special.jpg",
      "target_url": "/providers/evolution",
      "position": "tables",
      "provider_id": "evolution",
      "active": true,
      "priority": 90,
      "start_date": "2025-05-08T00:00:00",
      "end_date": "2025-05-23T00:00:00",
      "provider": {
        "id": "evolution",
        "name": "Evolution Gaming",
        "description": "Leading provider of live casino solutions",
        "status": "active",
        "supported_games": ["baccarat", "blackjack", "roulette"],
        "image": "https://ik.imagekit.io/njzzfw1h3/evolution-gaming-logo.png"
      }
    }
  ]
}

GET /api/banners/{banner_id}

Get details for a specific banner.

Parameters:
  • banner_id - The ID of the banner to retrieve (required, in path)
Response Example:
{
  "success": true,
  "banner": {
    "id": 1,
    "title": "Welcome Bonus",
    "description": "Get 100% bonus on your first deposit",
    "image_url": "https://ik.imagekit.io/njzzfw1h3/banner-welcome-bonus.jpg",
    "target_url": "/promotions/welcome",
    "position": "home",
    "provider_id": null,
    "active": true,
    "priority": 100,
    "start_date": "2025-05-08T00:00:00",
    "end_date": "2025-06-07T00:00:00",
    "provider": null
  }
}

Error Handling

When an error occurs, the API will return an error response with appropriate HTTP status code.

Error Response Format:
{
  "success": false,
  "error": "Error message",
  "message": "Detailed error description (optional)"
}
Common Error Codes:
  • 400 - Bad Request (invalid parameters)
  • 404 - Resource Not Found
  • 500 - Internal Server Error