Skip to content

Latest commit

 

History

History
146 lines (132 loc) · 6.05 KB

openai-api-issues.md

File metadata and controls

146 lines (132 loc) · 6.05 KB

The service is receiving too many requests from you

This error displays when you've exceeded OpenAI's rate limits{:target=_blank .external-link}.

There are two ways to work around this issue:

  1. Split your data up into smaller chunks using the Loop Over Items node and add a Wait node at the end for a time amount that will help. Copy the code below and paste it into a workflow to use as a template.
    {
        "nodes": [
        {
            "parameters": {},
            "id": "35d05920-ad75-402a-be3c-3277bff7cc67",
            "name": "When clicking ‘Test workflow’",
            "type": "n8n-nodes-base.manualTrigger",
            "typeVersion": 1,
            "position": [
            880,
            400
            ]
        },
        {
            "parameters": {
            "batchSize": 500,
            "options": {}
            },
            "id": "ae9baa80-4cf9-4848-8953-22e1b7187bf6",
            "name": "Loop Over Items",
            "type": "n8n-nodes-base.splitInBatches",
            "typeVersion": 3,
            "position": [
            1120,
            420
            ]
        },
        {
            "parameters": {
            "resource": "chat",
            "options": {},
            "requestOptions": {}
            },
            "id": "a519f271-82dc-4f60-8cfd-533dec580acc",
            "name": "OpenAI",
            "type": "n8n-nodes-base.openAi",
            "typeVersion": 1,
            "position": [
            1380,
            440
            ]
        },
        {
            "parameters": {
            "unit": "minutes"
            },
            "id": "562d9da3-2142-49bc-9b8f-71b0af42b449",
            "name": "Wait",
            "type": "n8n-nodes-base.wait",
            "typeVersion": 1,
            "position": [
            1620,
            440
            ],
            "webhookId": "714ab157-96d1-448f-b7f5-677882b92b13"
        }
        ],
        "connections": {
        "When clicking ‘Test workflow’": {
            "main": [
            [
                {
                "node": "Loop Over Items",
                "type": "main",
                "index": 0
                }
            ]
            ]
        },
        "Loop Over Items": {
            "main": [
            null,
            [
                {
                "node": "OpenAI",
                "type": "main",
                "index": 0
                }
            ]
            ]
        },
        "OpenAI": {
            "main": [
            [
                {
                "node": "Wait",
                "type": "main",
                "index": 0
                }
            ]
            ]
        },
        "Wait": {
            "main": [
            [
                {
                "node": "Loop Over Items",
                "type": "main",
                "index": 0
                }
            ]
            ]
        }
        },
        "pinData": {}
    }
    
  2. Use the HTTP Request node with the built-in batch-limit option against the OpenAI API{:target=_blank .external-link} instead of using the OpenAI node.

Insufficient quota

This error displays when your OpenAI account doesn't have enough credits or capacity to fulfill your request. This may mean that your OpenAI trial period has ended, that your account needs more credit, or that you've gone over a usage limit.

To troubleshoot this error, on your OpenAI settings{:target=_blank .external-link} page:

  • Select the correct organization for your API key in the first selector in the upper-left corner.
  • Select the correct project for your API key in the second selector in the upper-left corner.
  • Check the organization-level billing overview{:target=_blank .external-link} page to ensure that the organization has enough credit. Double-check that you select the correct organization for this page.
  • Check the organization-level usage limits{:target=_blank .external-link} page. Double-check that you select the correct organization for this page and scroll to the Usage limits section to verify that you haven't exceeded your organization's usage limits.
  • Check your OpenAI project's usage limits. Double-check that you select the correct project in the second selector in the upper-left corner. Select Project > Limits to view or change the project limits.
  • Check that the OpenAI API{:target=_blank .external-link} is operating as expected.

/// note | Balance waiting period After topping up your balance, there may be a delay before your OpenAI account reflects the new balance. ///

In n8n:

If you find yourself frequently running out of account credits, consider turning on auto recharge in your OpenAI billing settings{:target=_blank .external-link} to automatically reload your account with credits when your balance reaches $0.

Bad request - please check your parameters

This error displays when the request results in an error but n8n wasn't able to interpret the error message from OpenAI.

To begin troubleshooting, try running the same operation using the HTTP Request node, which should provide a more detailed error message.