> ## 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.

# Record API Call • AI Agents Framework

> record_api_call: Record an API/HTTP call timing.

# record\_api\_call

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**Profiler**](../classes/Profiler) class in the [**profiler**](../modules/profiler) module.

Record an API/HTTP call timing.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def record_api_call(endpoint: str, method: str, duration_ms: float, status_code: int, request_size: int, response_size: int) -> None
```

## Parameters

<ParamField query="endpoint" type="str" required={true}>
  No description available.
</ParamField>

<ParamField query="method" type="str" required={true}>
  No description available.
</ParamField>

<ParamField query="duration_ms" type="float" required={true}>
  No description available.
</ParamField>

<ParamField query="status_code" type="int" required={false} default="0">
  No description available.
</ParamField>

<ParamField query="request_size" type="int" required={false} default="0">
  No description available.
</ParamField>

<ParamField query="response_size" type="int" required={false} default="0">
  No description available.
</ParamField>

## Uses

* `cls.is_enabled`
* `APICallRecord`

## Used By

* [`Profiler.api_call`](../functions/Profiler-api_call)
* [`profile_api`](../functions/profile_api)
* [`profile_api_async`](../functions/profile_api_async)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/profiler.py#L458">
  `praisonai/profiler.py` at line 458
</Card>
