---
docId: doc_6ea1daa37c59419f9fd651e82f8a1ac3
title: Get usage
description: "Read workspace function calls, functions, deployments, and limits."
api:
  group: herramientas/funciones-personalizadas
  auth: bearer
  operations:
    - operationId: getFunctionsUsage
      method: GET
      path: /v1/tools/functions/usage
      postmanName: Get function usage
---

<script>
  import { Ways, Collapsible } from '$lib/components';
</script>

# Get usage

Read today's and the month's calls, created functions, and today's deployments. The response includes the limits for each usage category.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl "https://api.platic.ai/v1/tools/functions/usage" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.tools.functions.usage();
```

</Ways.Way>
</Ways>

## Response

```json
{
  "status": "success",
  "data": {
    "usage": { "today": 132, "month": 2840, "functions": 3, "deploysToday": 4 },
    "limits": {
      "functionsPerWorkspace": 20,
      "callsPerMinutePerFunction": 60,
      "callsPerDayPerWorkspace": 5000,
      "callsPerMonthPerWorkspace": 50000,
      "deploysPerDayPerWorkspace": 50,
      "timeoutSeconds": { "min": 1, "max": 60, "default": 20 },
      "memoryMb": 256,
      "inputBytes": 256000,
      "outputBytes": 256000,
      "sourceBytes": 100000,
      "httpCallsPerRun": 20,
      "httpTimeoutSeconds": 15,
      "httpResponseBytes": 2000000,
      "allowedDomains": 10,
      "secretSlots": 10
    }
  }
}
```

## Response fields

<Collapsible summary="Show all fields">

| Field | Description |
|-------|-------------|
| `usage.today` | Today's calls |
| `usage.month` | This month's calls |
| `usage.functions` | The workspace's functions |
| `usage.deploysToday` | Today's publications and tests |
| `limits.functionsPerWorkspace` | Functions per workspace |
| `limits.callsPerMinutePerFunction` | Calls per minute to a single function |
| `limits.callsPerDayPerWorkspace`, `callsPerMonthPerWorkspace` | The workspace's calls per day and per month |
| `limits.deploysPerDayPerWorkspace` | Publications and tests per day |
| `limits.timeoutSeconds` | Time per execution: `min`, `max` and `default`, in seconds |
| `limits.memoryMb` | Memory of each execution |
| `limits.inputBytes`, `outputBytes` | Maximum size of the input and the output |
| `limits.sourceBytes` | Maximum size of the code |
| `limits.httpCallsPerRun`, `httpTimeoutSeconds`, `httpResponseBytes` | HTTP calls per execution, wait per call and size of each response |
| `limits.allowedDomains`, `secretSlots` | Domains and secret slots per function |

</Collapsible>

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `403` | `FORBIDDEN` | The person behind the token does not have access to Integrations |

## Notes

- When a call or deployment limit is exceeded, the response is `429 LIMIT_REACHED` with `details.limit` and `details.resetAt`. An agent that calls a function at that moment gets the same error and should not retry.
- Limits can change. Read them from this response instead of hardcoding them.
