> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orthogonal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Platforms

> Integrate Orthogonal into any AI agent platform

This guide shows how to integrate Orthogonal into custom AI agent platforms or any system that supports REST API tool definitions.

## Configuration

Use these settings to configure Orthogonal as a tool provider:

### Base URL

```
https://api.orthogonal.com/v1
```

### Authentication

Orthogonal uses API key authentication via the Authorization header:

```
Authorization: Bearer {{api_key}}
```

During setup, create an authentication variable (often called `api_key` or `orthogonal_api_key`) that users provide when installing your integration. Use this variable in the Authorization header.

## Tools

Define these tools in your agent platform:

### 1. Search APIs

Search for APIs using natural language.

| Property        | Value                                       |
| --------------- | ------------------------------------------- |
| **Name**        | `search_apis`                               |
| **Method**      | `POST`                                      |
| **Path**        | `/search`                                   |
| **Description** | Search for APIs by describing what you need |

**Request Body:**

```json theme={null}
{
  "prompt": "string (required) - Natural language description",
  "limit": "number (optional) - Max results, default 10"
}
```

**Example:**

```json theme={null}
{
  "prompt": "enrich lead by email",
  "limit": 5
}
```

***

### 2. Run API

Execute any API call through Orthogonal.

| Property        | Value                                     |
| --------------- | ----------------------------------------- |
| **Name**        | `run_api`                                 |
| **Method**      | `POST`                                    |
| **Path**        | `/run`                                    |
| **Description** | Call an API endpoint and get the response |

**Request Body:**

```json theme={null}
{
  "api": "string (required) - API slug from search results",
  "path": "string (required) - Endpoint path",
  "body": "object (optional) - Request body for POST/PUT/PATCH",
  "query": "object (optional) - Query string parameters"
}
```

**Example:**

```json theme={null}
{
  "api": "apollo",
  "path": "/v1/people/match",
  "body": {
    "email": "ceo@stripe.com"
  }
}
```

***

### 3. Get Details

Get full parameter information for a specific endpoint.

| Property        | Value                                     |
| --------------- | ----------------------------------------- |
| **Name**        | `get_details`                             |
| **Method**      | `POST`                                    |
| **Path**        | `/details`                                |
| **Description** | Get endpoint parameters and documentation |

**Request Body:**

```json theme={null}
{
  "api": "string (required) - API slug",
  "path": "string (required) - Endpoint path"
}
```

**Example:**

```json theme={null}
{
  "api": "olostep",
  "path": "/v1/scrapes"
}
```

***

### 4. Get Code Snippets

Get ready-to-use code for an endpoint.

| Property        | Value                                  |
| --------------- | -------------------------------------- |
| **Name**        | `get_code`                             |
| **Method**      | `POST`                                 |
| **Path**        | `/integrate`                           |
| **Description** | Get code snippets in various languages |

**Request Body:**

```json theme={null}
{
  "api": "string (required) - API slug",
  "path": "string (required) - Endpoint path",
  "format": "string (optional) - curl, run-api, x402-fetch, x402-python, all"
}
```

***

### 5. List All APIs

Get a full list of available APIs and endpoints.

| Property        | Value                     |
| --------------- | ------------------------- |
| **Name**        | `list_apis`               |
| **Method**      | `GET`                     |
| **Path**        | `/list-endpoints`         |
| **Description** | Browse all available APIs |

**Query Parameters:**

```
limit: number (optional) - Max APIs to return, default 100
offset: number (optional) - Pagination offset
```

## Quick Reference

```yaml theme={null}
# Integration Configuration
name: Orthogonal
description: Search and use paid APIs with one API key
base_url: https://api.orthogonal.com/v1

# Authentication
auth_type: bearer
auth_header: Authorization
auth_value: Bearer {{api_key}}

# Tools
tools:
  - name: search_apis
    method: POST
    path: /search
    body: { prompt: string, limit?: number }
    
  - name: run_api
    method: POST
    path: /run
    body: { api: string, path: string, body?: object, query?: object }
    
  - name: get_details
    method: POST
    path: /details
    body: { api: string, path: string }
    
  - name: get_code
    method: POST
    path: /integrate
    body: { api: string, path: string, format?: string }
    
  - name: list_apis
    method: GET
    path: /list-endpoints
    query: { limit?: number, offset?: number }
```

## Example Workflow

Here's how an agent would use these tools:

1. **User asks:** "Find the CEO's email at Stripe"

2. **Agent calls `search_apis`:**
   ```json theme={null}
   {"prompt": "find email for person", "limit": 3}
   ```

3. **Agent calls `run_api`:**
   ```json theme={null}
   {
     "api": "hunter",
     "path": "/email-finder",
     "body": {
       "first_name": "Patrick",
       "last_name": "Collison",
       "domain": "stripe.com"
     }
   }
   ```

4. **Agent returns:** "Patrick Collison's email is [patrick@stripe.com](mailto:patrick@stripe.com)"

## Response Format

All endpoints return JSON with this structure:

**Success:**

```json theme={null}
{
  "success": true,
  "data": { ... },
  "requestId": "run_xxxxx"
}
```

**Error:**

```json theme={null}
{
  "success": false,
  "error": "Error message"
}
```

## Getting an API Key

Users need an Orthogonal API key to use your integration:

1. Sign up at [orthogonal.com](https://orthogonal.com)
2. Go to Dashboard → API Keys
3. Create a new key
4. Add credits to the account

The API key should be entered during your integration's installation flow.
