# 非同期のリサーチ Agent 実行を送信

**API:** Data API

**Endpoint:** `POST /v1/beta/exa/agent/runs`

**Tags:** Exa

非同期のリサーチタスクを送信します。query を指定し、任意で systemPrompt と effort（minimal のみ）を指定します。Idempotency-Key は必須です。HTTP 202 はジョブを返します。その id を対応する Felo のポーリングエンドポイントに渡し、completed、failed、cancelled のいずれかになるまで繰り返します。ジョブの価格フィールドはプロバイダーの承認と決済のメタデータであり、Felo の請求記録ではありません。

### 料金の参考情報

- 計量方式：固定リクエストの参考値。
- 参考リクエスト見積もり：USD 0.1。

参考情報のメタデータであり、アカウントへの見積もり、保証された価格、支出上限ではありません。リソースクレジットは Felo クレジットではありません。最終的な請求は Felo の請求記録に従います。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | yes | string | トリム後の UTF-8 長は 1～191 バイトでなければなりません。 |

## Request body

Required: **yes**

### application/json

Schema:

```json
{
  "additionalProperties": false,
  "properties": {
    "effort": {
      "default": "minimal",
      "description": "minimal effort のみがサポートされます。省略、空、null の値は minimal に正規化されます。",
      "enum": [
        null,
        "",
        "minimal"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "query": {
      "description": "空白をトリムした後に空でないクエリ。",
      "pattern": "\\S",
      "type": "string"
    },
    "systemPrompt": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

Example:

```json
{
  "query": "Find the official documentation for Go"
}
```

## Responses

### 202 — 成功

Headers:
- `X-Request-Id` (string) — Felo サポートに問い合わせる際に伝えるリクエスト識別子。

**application/json**

Schema: object

```json
{
  "properties": {
    "completedAt": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "endpoint": {
      "type": [
        "string",
        "null"
      ],
      "description": "プロバイダーのオペレーション識別子。ポーリングにはドキュメント記載の Felo ジョブパスを使用してください。"
    },
    "error": {
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "id": {
      "type": [
        "string",
        "null"
      ]
    },
    "object": {
      "const": "integration_async_job",
      "type": "string"
    },
    "output": {},
    "outputExpired": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "pricing": {
      "properties": {
        "authorizedMicrosUSD": {
          "type": [
            "integer",
            "null"
          ]
        },
        "billingMode": {
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "finalMicrosUSD": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ],
      "description": "マイクロ USD 単位のプロバイダー承認および精算メタデータ。Felo の残高、保留金額、請求書ではありません。"
    },
    "status": {
      "enum": [
        "queued",
        "running",
        "completed",
        "failed",
        "cancelled"
      ],
      "type": "string"
    }
  },
  "required": [
    "completedAt",
    "createdAt",
    "endpoint",
    "error",
    "id",
    "object",
    "output",
    "pricing",
    "status"
  ],
  "type": "object"
}
```

### 400 — リクエストを処理できませんでした。リクエストパラメータを確認してください。

### 401 — 有効な Felo API キーが必要です。

### 402 — 請求要件が満たされていないため、リクエストを続行できません。

### 403 — このアカウントにはこの操作を行う権限がありません。

### 429 — リクエストまたは支出の上限に達しました。

### 502 — サービスがリクエストを完了できませんでした。

### 503 — API または請求サービスが一時的に利用できません。

### 504 — リクエストの処理中にサービスがタイムアウトしました。

### default — 操作に失敗しました。Felo サポートに問い合わせる際は、レスポンスのリクエスト ID を保持してください。
