> For the complete documentation index, see [llms.txt](https://docs.brianknows.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brianknows.org/brian-api/apis/parameters-extraction.md).

# /parameters-extraction

## Extract parameters from a prompt.

<mark style="color:green;">`POST`</mark> `https://api.brianknows.org/api/v0/agent/parameters-extraction`

Allows you to send a prompt to Brian and return all the extracted parameters from the prompt.

You can implement your own custom logic and decide how to use the extracted parameters in you app. For example, you could take the swap parameters and build an integration on a chain that is not currently supported by Brian.

#### Headers

| Name                                              | Type             | Description        |
| ------------------------------------------------- | ---------------- | ------------------ |
| x-brian-api-key<mark style="color:red;">\*</mark> | String           | Brian API key.     |
| Content-Type<mark style="color:red;">\*</mark>    | application/json | Body content type. |

#### Request Body

| Name                                     | Type   | Description        |
| ---------------------------------------- | ------ | ------------------ |
| prompt<mark style="color:red;">\*</mark> | String | User input prompt. |

#### Requesting information

{% code overflow="wrap" %}

```bash
curl -XPOST "https://api.brianknows.org/api/v0/agent/parameters-extraction" -H "Content-Type: application/json" -H "x-brian-api-key: API_KEY" -d '{"prompt": "swap 1 eth to usdc on arbitrum"}'
```

{% endcode %}

{% tabs %}
{% tab title="200: OK OK." %}
{% code title="Response" overflow="wrap" fullWidth="true" %}

```json
{
  "result": {
    "prompt": "swap 1 eth to usdc on arbitrum",
    "completion": [
      {
        "action": "swap",
        "token1": "eth",
        "chain": "usdc",
        "amount": "1".
        ... // other parameters
      }
    ]
  }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}
