canonical: https://jentic.com/apis/compressgif.net/compressgif

# CompressGIF API

The CompressGIF API compresses animated GIFs asynchronously. A job is created from a source URL, and the agent polls it for status and a temporary download link once processing finishes. Work is metered against a shared account credit balance: valid output consumes credits even when the compression target is not met, while failed processing, polling, and downloads consume none. There is no automatic overage billing, and a required idempotency key keeps a retried compression request from being charged twice.

## For AI agents

Compress animated GIFs asynchronously: create a compression job from a source URL, poll it for status and a temporary download link, and read the shared account credit balance.

## Scope

Does not handle video transcoding, image resizing, or hosting. Use for asynchronous animated GIF compression only.

## Capabilities

- Create an asynchronous GIF compression job from a source URL
- Send an idempotency key so a retried compression request is not charged twice
- Poll a job for its status and a temporary download link
- Check from the job status whether the compression met its target
- Read the shared account credit balance

## Use cases

### Agent Compress-and-Wait

An AI agent connected through Jentic compresses a GIF without blocking: it creates a job from the source URL, then polls the job until it reports a status and a temporary download link. Because the API is asynchronous, the agent submits the work and checks back rather than holding a long-running request open.

Example prompt: Create a compression job from a GIF URL, poll it until it completes, and return the temporary download link

### Credit-Aware Batch Compression

A pipeline compressing many GIFs reads the shared credit balance first so it can pace work against available credits. Since failed processing and polling consume no credits and there is no automatic overage billing, the pipeline can run a batch knowing it will not be charged for jobs that do not produce valid output.

Example prompt: Read the account credit balance, then submit compression jobs for a batch of GIF URLs while credits remain

### Idempotent Retry

A workflow that may retry on a network blip sends a stable idempotency key with each compression request, so a repeated submission returns the original job instead of creating and charging a second one. The CompressGIF API requires the key on job creation, which makes safe retries the default rather than an add-on.

Example prompt: Submit a compression job with an idempotency key, then retry with the same key and confirm the same job is returned

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/api/v1/compressions` | Create a GIF compression job |
| GET | `/api/v1/compressions/{id}` | Read job status and temporary download link |
| GET | `/api/v1/usage` | Read the shared account credit balance |

## Key resources

- **Compressions** — Create a GIF compression job from a source URL and poll it for status and a download link
- **Usage** — Read the shared account credit balance

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 63 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 69 / 100
  - AI-Readiness & Agent Experience: 44 / 100
  - Agent Usability: 94 / 100
  - Security: 55 / 100
  - AI Discoverability: 54 / 100
- **View full report:** https://jentic.com/apis/compressgif.net/compressgif/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the CompressGIF API by hand means managing a bearer or `x-api-key` credential, handling the asynchronous create-then-poll flow, and sending a required idempotency key on every job so retries are safe. Through Jentic you install once, import the CompressGIF API from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** CompressGIF puts the job id in the URL path (`/api/v1/compressions/{id}`), so a rule can allow your agent to create and poll compression jobs while leaving other operations out. You choose the operations it may call, so a rule can allow the compression and status operations and leave the usage read out.
- **Credential handling:** Your CompressGIF credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'compress a GIF' or 'check a compression job', and Jentic returns the matching CompressGIF operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **ShortPixel** — ShortPixel optimizes and compresses images including GIFs, overlapping with CompressGIF's core job.
- **Cloudinary Upload API** — Cloudinary stores and delivers media, a natural home for the compressed GIF CompressGIF produces.
- **PhotoRoom** — PhotoRoom edits and composes images that may later be exported and compressed as GIFs.

## FAQ

### What authentication does the CompressGIF API use?

The CompressGIF API accepts either a bearer API key in the Authorization header or an API key in the `x-api-key` header, per its OpenAPI spec. Either credential works on every operation. Through Jentic the credential is stored encrypted by your own Jentic One instance and injected at call time, so it never enters the agent's prompt, logs, or context.

### Does the CompressGIF API work synchronously or asynchronously?

It is asynchronous. You create a compression job from a source URL and then poll the job for its status and a temporary download link once processing completes. This means an agent submits the work and checks back rather than holding a request open for the whole compression.

### What are the rate limits for the CompressGIF API?

The OpenAPI spec meters work by a shared credit balance rather than a fixed request-per-second limit: valid output consumes credits even when the target is not met, while failed processing, polling, and downloads consume none. Check https://compressgif.net for the credit and throughput limits on your plan.

### Is there a CompressGIF MCP server?

Yes, CompressGIF offers an MCP server that shares its credit balance with this REST surface. You can also connect the CompressGIF API directly through Jentic: your agent gets the full 3-endpoint surface without loading another server's tool definitions into its context, your credential is injected at call time by your self-hosted instance instead of living in an MCP config, and your rules decide which operations the agent may call.

### Can I limit what my agent is allowed to do with the CompressGIF API?

Yes. Because the job id travels in the URL path, you write a rule that allows only the create-compression and read-status operations and leaves the usage read out, or the reverse. The agent can then compress GIFs and fetch their download links but touch nothing else, and every call it makes is logged.

### How do I compress a GIF through Jentic?

Import the CompressGIF API from the Jentic API Directory, store your API key once, and have your agent search Jentic for 'compress a GIF'. Jentic returns the create-compression operation with its input schema so the agent sends the `sourceUrl` and an idempotency key and then polls for the download link. To run it on your own infrastructure, install Jentic One from its GitHub repo.
