# Show today's processing budget

> What the account has spent today and what is left, in seconds of processing time, and when the budget resets. unlimited is true when no daily budget applies.

Source: https://tools.vukem.dev/docs/api/usage.show/

## Authentication

Send your API key as `Authorization: Bearer <key>`. The `X-API-Key` header works too, and `Authorization` wins when both are present. Any valid key works: no ability is needed.

## Responses

### 200 OK

Content type `application/json`. Schema: [`UsageView`](/docs/api/schemas#usageview).

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `budget_seconds` | `integer (int64)` | - | Today's budget in seconds of processing time. 0 when unlimited |
| `remaining_seconds` | `integer (int64)` | - | What is left today, in seconds. 0 when unlimited or spent: read unlimited to tell them apart |
| `resets_at` | `string (date-time)` | - | When the next day's budget starts (midnight UTC) |
| `spent_seconds` | `integer (int64)` | - | Processing time spent today, in seconds |
| `stored_bytes` | `integer (int64)` | - | Bytes of yours that are stored and have not expired: uploads and results |
| `stored_limit_bytes` | `integer (int64)` | - | The most bytes an account may store at once. 0 when there is no cap |
| `unlimited` | `boolean` | - | True when no daily budget applies to this account |

### 401 Unauthorized

Content type `application/problem+json`. Error (RFC 9457 problem details). Schema: [`Problem`](/docs/api/schemas#problem).

The error follows RFC 9457. See [Errors](/docs/api/overview#errors).

### Any other status

Content type `application/problem+json`. Error (RFC 9457 problem details). Schema: [`Problem`](/docs/api/schemas#problem).

The error follows RFC 9457. See [Errors](/docs/api/overview#errors).

```bash
curl -X GET "http://localhost:3000/api/v1/usage" \
  -H "Authorization: Bearer $VUKEM_TOOLS_API_KEY"
```

```python
import os

import requests

response = requests.get(
    "http://localhost:3000/api/v1/usage",
    headers={"Authorization": f"Bearer {os.environ['VUKEM_TOOLS_API_KEY']}"},
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

```javascript
const response = await fetch("http://localhost:3000/api/v1/usage", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.VUKEM_TOOLS_API_KEY}`,
  },
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log(await response.json());
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest("GET", "http://localhost:3000/api/v1/usage", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("VUKEM_TOOLS_API_KEY"))

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, err := io.ReadAll(res.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(res.Status, string(out))
}
```

```php
<?php

$ch = curl_init("http://localhost:3000/api/v1/usage");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("VUKEM_TOOLS_API_KEY"),
    ],
]);

$response = curl_exec($ch);
if ($response === false) {
    throw new RuntimeException(curl_error($ch));
}
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $response, PHP_EOL;
```

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("http://localhost:3000/api/v1/usage"))
            .header("Authorization", "Bearer " + System.getenv("VUKEM_TOOLS_API_KEY"))
            .GET()
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode() + " " + response.body());
    }
}
```

```csharp
using System;
using System.Net.Http;
using System.Net.Http.Headers;

using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:3000/api/v1/usage");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Bearer", Environment.GetEnvironmentVariable("VUKEM_TOOLS_API_KEY"));

using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
```

```ruby
require "net/http"
require "uri"

uri = URI("http://localhost:3000/api/v1/usage")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch('VUKEM_TOOLS_API_KEY')}"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
puts "#{response.code} #{response.body}"
```

**Response examples**

```json
{
  "budget_seconds": 1800,
  "remaining_seconds": 1680,
  "resets_at": "2026-01-06T00:00:00Z",
  "spent_seconds": 120,
  "unlimited": false
}
```

```json
{
  "detail": "This action requires authentication.",
  "instance": "/api/v1/me",
  "request_id": "01JQZ8R4T6WQ2N9K3V5Y7B0C1D",
  "status": 401,
  "title": "Unauthorized",
  "type": "about:blank"
}
```

The examples are built from the schemas, so every value is a placeholder of its type. The tables above hold the fields that carry the real values.
