# Get Account Info Source: https://docs.poof.bg/api-reference/account GET /me Retrieve account details and credit usage Get information about your account including your current plan, credit balance, and usage statistics. This endpoint is free: it does not consume credits and is not rate limited, so you can poll it as often as you like. ## Request No request body required. Just include your API key in the header. ```bash theme={null} curl https://api.poof.bg/v1/me \ -H "x-api-key: pk_your_api_key" ``` ## Response **organizationId** `string` Your unique organization identifier. **plan** `string` Your current plan's display name (e.g., "Free", "Basic", "Pro", "Mega", "Ultra", "Giga"). **maxCredits** `integer` Total credits available in your current billing cycle (monthly allocation plus any top-ups). **usedCredits** `integer` Credits consumed in the current billing cycle. Each successful `/remove` request costs 1 credit; video costs 5 credits per second of source video, rounded up (10 above 30 fps). Animated GIF input is billed at 5 credits per second whatever its frame rate. **autoRechargeThreshold** `number` Fraction of the plan limit at which Auto Recharge triggers, between `0.5` and `0.95` (e.g. `0.9` = 90%). Omitted when Auto Recharge is off. ```json Response theme={null} { "organizationId": "org_abc123xyz", "plan": "Pro", "maxCredits": 2000, "usedCredits": 1234, "autoRechargeThreshold": 0.9 } ``` ## Examples ```bash cURL theme={null} curl https://api.poof.bg/v1/me \ -H "x-api-key: pk_your_api_key" ``` ```python Python theme={null} from poof import Poof client = Poof(api_key="pk_your_api_key") info = client.me() print(f"Plan: {info['plan']}") print(f"Credits remaining: {info['maxCredits'] - info['usedCredits']}") ``` ```typescript TypeScript theme={null} import { Poof } from '@poof-bg/js'; const poof = new Poof({ apiKey: 'pk_your_api_key' }); const account = await poof.me(); console.log(`Plan: ${account.plan}`); console.log(`Credits remaining: ${account.maxCredits - account.usedCredits}`); ``` ## Use Cases ### Monitoring Usage Check your credit consumption before processing a batch: ```python theme={null} info = client.me() remaining = info["maxCredits"] - info["usedCredits"] if remaining < 100: print("Warning: Low credits, consider a top-up or upgrade") ``` ### Usage Dashboard Display account info in your application: ```typescript theme={null} const account = await poof.me(); const usagePercent = (account.usedCredits / account.maxCredits) * 100; console.log(`Usage: ${usagePercent.toFixed(1)}%`); ``` ### Pre-flight Check Verify credentials and check limits before starting a job: ```python theme={null} from poof import AuthError try: info = client.me() images_to_process = 500 remaining = info["maxCredits"] - info["usedCredits"] if remaining < images_to_process: raise Exception(f"Not enough credits. Need {images_to_process}, have {remaining}") # Proceed with processing except AuthError: print("Invalid API key") ``` ## Error Responses | Status | Code | Description | | - | - | - | | 401 | `authentication_error` | `x-api-key` missing or not recognised | See [API Error Codes](/errors/list) for the error body format. ```bash cURL theme={null} curl https://api.poof.bg/v1/me \ -H "x-api-key: pk_your_api_key" ``` # Get Video Job Source: https://docs.poof.bg/api-reference/jobs GET /jobs/{id} Poll a video background removal job for its status and progress, and get the result_url of the finished video. Polling is free. Returns the current state of a job created by [`POST /remove`](/api-reference/remove-background#video) for a video, including its progress and, once it has completed, the `result_url` to download the output from. This endpoint is free: polling does not consume credits, and `GET` requests under `/jobs/` are exempt from your plan's per-organisation rate limit. ## Request **id** `string` *required* The job ID returned as `id` in the `202` response to `POST /remove` (starts with `job_`). ```bash theme={null} curl https://api.poof.bg/v1/jobs/job_8f3a1c2e9b7d4a10 \ -H "x-api-key: pk_your_api_key" ``` ## Response **id** `string` Job ID, prefixed with `job_`. **status** `string` One of `queued`, `processing`, `completed` or `failed`. See [Status lifecycle](#status-lifecycle). **progress** `number` Fraction of the video processed so far, from `0` to `1`. It is `0` while `queued` and `1` once `completed`. **created\_at** `string` ISO 8601 timestamp of when the job was accepted. **started\_at** `string | null` When processing began. `null` while the job is still `queued`. **completed\_at** `string | null` When the job reached `completed` or `failed`. `null` until then. **duration\_seconds** `number` Source video duration in seconds. **fps** `number` Source frame rate. **width** `integer` Source video width in pixels. **height** `integer` Source video height in pixels. **frames** `integer` Number of frames in the source video. **credits** `integer` Credits charged for this job. Refunded automatically if the job fails. **format** `string` The requested output format: `webm`, `mov`, `mp4` or `gif`. **channels** `string` The requested output channels: `rgba`, `rgb` or `alpha`. **status\_url** `string` URL of this job, the same one returned as `status_url` when the job was created. **result\_url** `string | null` Direct download URL of the result on the Poof CDN (`https://cdn.poof.bg/...`). `null` until the job is `completed`. The link needs no API key, so it can be handed straight to a browser or a `