n8n - AI automated workflow platform
In n8n, connect to 58API through AI Agent and OpenAI Chat Model, and close the Responses API to complete compatible calls.
This tutorial uses the Chat Model route permanently
The main line is AI Agent → OpenAI Chat Model, and close Use Responses API. "Message a model" that does not use the OpenAI application node is used as a compatible access example.
n8n can connect models to triggers, agents, tools and business systems.
Preparation before use
- Log in 58API, create an API Key, and confirm that the balance is sufficient.
- Confirm 58API's
https://api.58api.net/v1/modelsCan return the models available for the current account. - Prepare an n8n instance of the current stable version.
Create a basic AI workflow
- Create a new Workflow in n8n.
- Added Chat Trigger.
- Add AI Agent and connect the Chat Trigger to the AI Agent.
- Click the plus sign on the Chat Model port of the AI Agent to add the OpenAI Chat Model child node.

Create OpenAI credentials
Find Credential to connect with in the OpenAI Chat Model, choose to create a new OpenAI credential, and then fill in:
| Field | Fill in the content |
|---|---|
| API Key | Your 58API API Key |
| Organization ID | Leave blank |
| Base URL | https://api.58api.net/v1 |
| Add Custom Header | closure |

The numbers in the picture are the order of filling in: enter the API Key, leave the Organization ID blank, and fill in the Base URL. https://api.58api.net/v1, close Custom Header, and then confirm that the connection test is successful.
Save and test the connection. n8n The current credential test will request:
GET https://api.58api.net/v1/modelsSo "Connection Test Failed" should first check the Base URL, API Key and /v1/models Is it accessible.
Select the model and close the Responses API
Return to the OpenAI Chat Model sub-node:
- Select in Model
/v1/modelsThe returned model. - If the drop-down list does not show the target model, switch Model to ID mode and manually paste the exact model ID.
- Find Use Responses API and close it.
Must check Use Responses API
The current OpenAI Chat Model node (v1.3) has the Responses API enabled by default. Only the selected model explicitly supports /v1/responses can only be turned on when; this tutorial turns it off to make the call go to the /v1/chat/completions。
Do not write the Base URL as /v1/chat/completions. The node will append the Chat Completions path by itself according to the closed protocol.
Execution and verification
- Save the workflow.
- Open Chat Trigger's test chat window and send a simple text.
- Confirm that the AI Agent returns normal content.
- Check the execution log of the AI Agent / OpenAI Chat Model to confirm that there are no 404, 401 or HTML error pages.
- Open the 58API console usage log and check the model, time and request records.

Why not use OpenAI application nodes as the main line?
n8n's OpenAI application node includes multiple operations such as text, pictures, videos, files, etc. Different operations will access different API paths. Credentials test passing only proves /v1/models Available does not mean that 58API supports every operation.
n8n official repository issue #21651 Record: OpenAI node v2’s “Message a model” passed the credential test under the custom Base URL, but returned 404 when running. The reason is that the node uses the Responses API by default (/responses); it will return to normal after closing Use Responses API. The OpenAI Chat Model node v1.3 also turns on the Responses API by default, so this tutorial requires turning it off and only using AI Agent → OpenAI Chat Model as the main line.
Verification Checklist
- The OpenAI Chat Model subnode under AI Agent is used.
- The Credential Base URL is
https://api.58api.net/v1。 - Credentials test to be able to access
/v1/models。 - Model The exact ID returned by 58API.
- Use Responses API is closed.
- The test conversation returns text, and the 58API usage log has corresponding records.
FAQ
The credential test is successful but returns 404 when run.
First confirm that you are using AI Agent → OpenAI Chat Model and close Use Responses API. Don't change directly to a guessed path; check the execution log for the actual endpoint.
Credentials test failed
n8n will call {Base URL}/models. Base URL should be https://api.58api.net/v1, the API Key must have access to the model list.
Model list is empty or has no target model
confirm /v1/models Return success. If only the target model does not appear in the drop-down box, use the Model ID pattern to manually fill in the exact model ID.
Return 401
Edit the OpenAI credential and re-paste the 58API API Key. The Organization ID generally does not need to be filled in, and the Custom Header should also be kept closed.
Can Responses API be opened?
Only the selected model supports Responses in the 58API model list (endpoints with openai-response) and then open it again. Just because one model is available does not mean that all models are available.
Can I use pictures, videos or Files operations directly?
It cannot be inferred from this tutorial that these operations are compatible. They are not Chat Completions routes and need to be independently verified for their respective endpoints, request bodies, and return formats.
official basis
OpenClaw - Self-hosted AI Assistant Platform
OpenClaw Tutorial — Install OpenClaw, integrate 58API, and quickly set up a self-hosted AI assistant. Open-source project, supporting multi-channel integration like Telegram, Discord, WhatsApp.
Dify - Visual AI application development platform
Access 58API through an OpenAI compatible model provider in Dify, and complete model configuration, conversation verification, and troubleshooting of common problems.