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

# API Call • AI Agents Framework

> api_call: Context manager for profiling API calls.

# api\_call

Method

> This is a method of the [**ProfilerCompat**](https://praison.ai/docs/sdk/reference/praisonai/classes/ProfilerCompat.md) class in the [**profiler**](https://praison.ai/docs/sdk/reference/praisonai/modules/profiler.md) module.

Context manager for profiling API calls.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def api_call(endpoint: str, method: str) -> Any
```

## Parameters

**endpoint** `str` *required*

No description available.

**method** `str` (default: 'GET')

No description available.

### Returns

**Returns** `Any`

The result of the operation.

## Uses

* `api_call`
* `get_profiler`

## Used By

* [`ProfilerCompat.api_call`](../functions/ProfilerCompat-api_call)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/profiler.py#L879)
>
> `praisonai/profiler.py` at line 879


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.