← Back to Blog

AI and Workflows racing on the costs

AI and Workflows racing on the costs To compare the cost of running Azure Logic Apps with using GPT-3.5 calls, we need to break down the cost structure for each service.

AI and Workflows racing on the costs

To compare the cost of running Azure Logic Apps with using GPT-3.5 calls, we need to break down the cost structure for each service.

Azure Logic Apps Cost

Azure Logic Apps pricing depends on various factors such as the number of actions, triggers, connectors, and other operations used within the app. Below are some key cost components:

  • Action and Connector Executions: Each time an action or connector executes in a logic app, there is a cost.

  • Standard vs. Consumption Plan: Azure Logic Apps can be run on either a Consumption Plan (pay per use) or a Standard Plan (fixed cost).

  • Built-in vs. Enterprise Connectors: Built-in connectors are cheaper compared to enterprise connectors.

  • Integration Service Environment (ISE): Running in an ISE can incur additional costs.

GPT-3.5 Cost

Using GPT-3.5 (OpenAI API) is typically charged based on the number of tokens processed (input and output). Key cost components include:

  • Number of Tokens: The cost is based on the total number of tokens processed by the API.

  • Model Type: Different models (e.g., GPT-3, GPT-4) have different pricing structures.

Example Cost Calculation

Azure Logic Apps (Consumption Plan)

  • Action Executions: $0.000025 per action

  • Standard Connectors: $0.000125 per connector execution

  • Enterprise Connectors: $0.001 per connector execution

GPT-3.5 API (Example Pricing)

  • GPT-3.5-turbo: $0.002 per 1,000 tokens

Cost Comparison Example

Let's assume the following scenario:

  • Azure Logic App with 1,000 action executions using standard connectors.

  • 10 GPT-3.5 API calls, each processing 2,000 tokens.

Azure Logic Apps Cost

  • Action Executions:
    [
    1,000 \text{ actions} \times \$0.000025 \text{ per action} = \$0.025
    ]

  • Standard Connector Executions:
    [
    1,000 \text{ connectors} \times \$0.000125 \text{ per connector} = \$0.125
    ] Total Cost for Azure Logic Apps:
    [
    \$0.025 + \$0.125 = \$0.15
    ]

GPT-3.5 Cost

  • API Calls:
    [
    10 \text{ calls} \times 2,000 \text{ tokens} = 20,000 \text{ tokens}
    ]

  • Total Token Cost:
    [
    20,000 \text{ tokens} \times \$0.002 \text{ per 1,000 tokens} = \$0.04
    ]

Summary

  • Azure Logic Apps Cost: $0.15 for 1,000 actions and standard connectors.

  • GPT-3.5 API Cost: $0.04 for 10 API calls processing 2,000 tokens each.

Conclusion

In this example, running the specified number of actions and connectors in Azure Logic Apps is more expensive than making 10 GPT-3.5 API calls processing 2,000 tokens each. However, actual costs can vary significantly based on the specific usage patterns and configurations of each service.

For a precise cost estimation, it would be necessary to model your specific use case and usage patterns against the detailed pricing models provided by both Azure and OpenAI.


Imported from rifaterdemsahin.com · 2024