> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aitasker.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulate Spend Endpoint

> Simulate ad performance at different daily budget levels.

Uses a log diminishing returns model to project clicks, conversions,
and revenue for each budget scenario.



## OpenAPI

````yaml /openapi.json post /api/v1/ads/simulate
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/ads/simulate:
    post:
      tags:
        - Ad Simulator
        - Ad Simulator
      summary: Simulate Spend Endpoint
      description: |-
        Simulate ad performance at different daily budget levels.

        Uses a log diminishing returns model to project clicks, conversions,
        and revenue for each budget scenario.
      operationId: simulate_spend_endpoint_api_v1_ads_simulate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulateSpendRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulationResultResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SimulateSpendRequest:
      properties:
        platform:
          type: string
          title: Platform
          description: Ad platform (e.g. google, meta, linkedin)
        current_daily_budget:
          type: number
          exclusiveMinimum: 0
          title: Current Daily Budget
          description: Current daily budget (USD)
        current_metrics:
          $ref: '#/components/schemas/CurrentMetrics'
        budget_scenarios:
          items:
            type: number
          type: array
          maxItems: 20
          minItems: 1
          title: Budget Scenarios
          description: Daily budget amounts to simulate (USD)
      type: object
      required:
        - platform
        - current_daily_budget
        - current_metrics
        - budget_scenarios
      title: SimulateSpendRequest
    SimulationResultResponse:
      properties:
        platform:
          type: string
          title: Platform
        baseline_metrics:
          additionalProperties: true
          type: object
          title: Baseline Metrics
        scenarios:
          items:
            $ref: '#/components/schemas/ScenarioForecastResponse'
          type: array
          title: Scenarios
        recommendation:
          type: string
          title: Recommendation
      type: object
      required:
        - platform
        - baseline_metrics
        - scenarios
        - recommendation
      title: SimulationResultResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CurrentMetrics:
      properties:
        cpc:
          type: number
          exclusiveMinimum: 0
          title: Cpc
          description: Current cost per click (USD)
        ctr:
          type: number
          maximum: 1
          exclusiveMinimum: 0
          title: Ctr
          description: Current click-through rate (0-1)
        conversion_rate:
          type: number
          maximum: 1
          exclusiveMinimum: 0
          title: Conversion Rate
          description: Current conversion rate (0-1)
        avg_order_value:
          type: number
          exclusiveMinimum: 0
          title: Avg Order Value
          description: Average order value (USD)
      type: object
      required:
        - cpc
        - ctr
        - conversion_rate
        - avg_order_value
      title: CurrentMetrics
    ScenarioForecastResponse:
      properties:
        daily_budget:
          type: number
          title: Daily Budget
        monthly_budget:
          type: number
          title: Monthly Budget
        estimated_impressions:
          type: integer
          title: Estimated Impressions
        estimated_clicks:
          type: integer
          title: Estimated Clicks
        estimated_conversions:
          type: integer
          title: Estimated Conversions
        estimated_revenue:
          type: number
          title: Estimated Revenue
        estimated_roas:
          type: number
          title: Estimated Roas
        confidence:
          type: string
          title: Confidence
      type: object
      required:
        - daily_budget
        - monthly_budget
        - estimated_impressions
        - estimated_clicks
        - estimated_conversions
        - estimated_revenue
        - estimated_roas
        - confidence
      title: ScenarioForecastResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````