Skip to main content

Overview

This guide will walk you through creating your first API integration using AnyAPI.ai. You’ll learn how to:
  1. Get your API key
  2. Create a connection
  3. Execute your first workflow
  4. View results
Prerequisites: You’ll need an AnyAPI.ai account. Sign up for free if you haven’t already.

Step 1: Get Your API Key

1

Access Dashboard

Navigate to your AnyAPI.ai dashboard
2

Go to API Keys

Click on SettingsAPI Keys in the sidebar
3

Create New Key

Click “Create API Key” and give it a descriptive name like “My First Integration”
4

Copy Key

Copy the generated API key and store it securely
Keep your API key secure! Never commit it to version control or expose it in client-side code.

Step 2: Create Your First Connection

Let’s create a connection to the JSONPlaceholder API (a free testing API):
curl -X POST https://api.anyapi.ai/v1/connections \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "JSONPlaceholder API",
"type": "rest",
"base_url": "https://jsonplaceholder.typicode.com",
"auth": {
"type": "none"
}
}'
Save the connection_id from the response - you’ll need it for the next step.

Step 3: Create a Simple Workflow

Now let’s create a workflow that fetches user data from the JSONPlaceholder API:
curl -X POST https://api.anyapi.ai/v1/workflows \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Fetch User Data",
"description": "Get user information from JSONPlaceholder",
"steps": [
{
"type": "api_call",
"config": {
"connection_id": "YOUR_CONNECTION_ID",
"method": "GET",
"endpoint": "/users/1",
"headers": {}
}
}
]
}'

Step 4: Execute the Workflow

Execute your workflow to see it in action:
curl -X POST https://api.anyapi.ai/v1/workflows/YOUR_WORKFLOW_ID/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"async": false
}'

Expected Result

If everything worked correctly, you should see a response like this:
{
  "success": true,
  "data": {
    "execution_id": "exec_1234567890",
    "status": "completed",
    "result": {
      "id": 1,
      "name": "Leanne Graham",
      "username": "Bret",
      "email": "Sincere@april.biz",
      "address": {
        "street": "Kulas Light",
        "suite": "Apt. 556",
        "city": "Gwenborough",
        "zipcode": "92998-3874"
      },
      "phone": "1-770-736-8031 x56442",
      "website": "hildegard.org"
    },
    "started_at": "2025-01-15T10:30:00Z",
    "completed_at": "2025-01-15T10:30:01Z"
  }
}

🎉 Congratulations!

You’ve successfully: ✅ Created your first API connection
✅ Built a simple workflow
✅ Executed the workflow and received data

Next Steps

Interactive Playground

Want to test this right now? Use our interactive playground below:
The playground will use your actual API key if you’re logged into the dashboard. Make sure you’re using a test environment!

Troubleshooting

Make sure your API key is correct and includes the Bearer prefix in the Authorization header.
Verify the base URL is correct and the target API is accessible. You can test the connection using the /connections/{id}/test endpoint.
Check the workflow configuration and ensure the connection ID is valid. Review the error details in the response.
If you’re hitting rate limits, consider upgrading your plan or implementing delays between requests.

Need Help?

I