Getting Started

5-Minute Quickstart with curl

Run the Datafuse v1 flow from the terminal with curl and jq.

This path uses curl and jq. It is useful for smoke tests, shell scripts and quick debugging.

Before you start you need an integration connected in the dashboard with credentials verified.


Step 1: Sign In

Exchange your email and password for an access token. It is valid for 30 minutes.

bash
export DATAFUSE_API_URL="https://api.datafuse.xyz"
export DATAFUSE_EMAIL="[email protected]"
export DATAFUSE_PASSWORD="your_password"

export DF_TOKEN=$(curl -sS -X POST "$DATAFUSE_API_URL/api/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d "{\"email\": \"$DATAFUSE_EMAIL\", \"password\": \"$DATAFUSE_PASSWORD\"}" | jq -r '.access_token')

!TIP For a self-hosted deployment, point DATAFUSE_API_URL at your own API address.


Step 2: Pick a Verified Integration

List your integrations with their verification state:

bash
curl -sS "$DATAFUSE_API_URL/api/v1/integrations" \
  -H "Authorization: Bearer $DF_TOKEN" | jq '.items[] | {id, provider_key, verified}'

Export the first verified one. Only verified integrations expose tool schemas and run tools.

bash
export INTEGRATION_ID=$(curl -sS "$DATAFUSE_API_URL/api/v1/integrations" \
  -H "Authorization: Bearer $DF_TOKEN" | jq -r '[.items[] | select(.verified)][0].id')
echo "$INTEGRATION_ID"

If this prints null, no integration is verified yet. Verify one in the dashboard, or run its credential check and look for "verified": true:

bash
curl -sS -X POST "$DATAFUSE_API_URL/api/v1/integrations/your_integration_id/test" \
  -H "Authorization: Bearer $DF_TOKEN"

Step 3: Resolve Tools

List the tool slugs and the arguments each one requires:

bash
curl -sS -X POST "$DATAFUSE_API_URL/api/v1/integrations/$INTEGRATION_ID/resolve-tools" \
  -H "Authorization: Bearer $DF_TOKEN" | jq '.[] | {slug, required: (.input_schema.required // [])}'

Step 4: Invoke a Tool

Pass a slug from Step 3 as tool_key, with arguments that match its input schema. This example calls DeepSeek's deepseek_list_models, which is read-only and takes no arguments. Replace both values for your own integration.

bash
curl -sS -X POST "$DATAFUSE_API_URL/api/v1/integrations/$INTEGRATION_ID/invoke" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DF_TOKEN" \
  -d '{"tool_key": "deepseek_list_models", "arguments": {}}' | jq '{successful, error}'

successful is true when the provider accepted the call. When it is false, error says why.

Steps 3 and 4 also accept an API key in place of the access token: swap the Authorization header for -H "x-api-key: $DATAFUSE_API_KEY".


Next Steps