> ## Documentation Index
> Fetch the complete documentation index at: https://incredible-42686482-cursor-create-detailed-ai-agent-cookboo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting API Endpoints

> Call external APIs via function calling and pass results back to the model

### External API Integration

Enable Incredible to interact with third-party services:

Connect your AI to real services and systems:

```jsx
curl https://api.incredible.one/v1/chat-completion \
  -H "Content-Type: application/json" \
  -d '{
    "model": "small-1",
    "functions": [
      {
        "name": "get_weather",
        "description": "Get current weather information for a specific location",
        "parameters": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "City name or coordinates"
            },
            "unit": {
              "type": "string",
              "enum": ["celsius", "fahrenheit"],
              "description": "Temperature unit"
            }
          },
          "required": ["location"]
        }
      }
    ],
    "messages": [
      {
        "role": "user",
        "content": "What is the weather like in San Francisco?"
      }
    ]
  }'
```

### Example Scenario

1. **User:** “What is the weather like in San Francisco?”
2. **AI:** “Let me check the latest weather for you.”\
   → AI calls `get_weather` with `location="San Francisco"`, `unit="celsius"`
3. **AI:** “The current temperature in San Francisco is 18°C with partly cloudy skies.”
