# Long-CLIP API

> CLIP ViT-L/14 fine-tuned to accept 248-token text with positional-embedding stretching, for long, detailed captions and instructions.

## Details

- Model id: `thu/longclip`
- Provider: Shanghai AI Lab / SJTU
- Type: Vision encoder
- Parameters: 428M (L/14)
- Output: Image-text embeddings (248-token text)
- Embodiments: Any (video)
- Embedding size: 768 dimensions
- Endpoint: `POST /v1/embed`
- Price: $0.02 per 1,000 calls
- Checkpoint served: `BeichenZhang/LongCLIP-L`
- License: Apache-2.0 (base OpenAI CLIP ViT-L/14: MIT)
- Released: March 2024
- Status: Live
- Paper or model card: https://github.com/beichenzbc/Long-CLIP

## Call Long-CLIP

Send one request with your API key to `POST https://api.openrobotics.dev/v1/embed`. The response comes back in the same call. The [API reference](https://www.openrobotics.dev/docs/api/embed) lists every field. GPUs start on demand: after a quiet spell the first call returns `503` with `Retry-After` while one boots (never billed).

Python:

```python
import os, requests

res = requests.post(
  "https://api.openrobotics.dev/v1/embed",
  headers={"Authorization": f"Bearer {os.environ['OPENROBOTICS_API_KEY']}"},
  json={
    "model": "thu/longclip",
    "image": "<base64 JPEG or PNG>",
  },
).json()
res["embedding"]        # unit-length float vector
```

TypeScript:

```typescript
const res = await fetch("https://api.openrobotics.dev/v1/embed", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OPENROBOTICS_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "thu/longclip",
    image: "<base64 JPEG or PNG>",
  }),
}).then((r) => r.json());
```

cURL:

```bash
curl https://api.openrobotics.dev/v1/embed \
  -H "Authorization: Bearer $OPENROBOTICS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"thu/longclip","image":"<base64 JPEG or PNG>"}'
```

## Guides about Long-CLIP

- [DINOv3 vs DINOv2: features, licenses and retrieval](https://www.openrobotics.dev/blog/dinov2-vs-dinov3.md): Compare DINOv2 and DINOv3, distinguish dense features from pooled API vectors, and test same-space image retrieval with offline Python.
- [Physical AI explained: the open model stack for robots](https://www.openrobotics.dev/blog/physical-ai.md): What physical AI (embodied AI) means, the five kinds of models a robot uses, from perception to VLAs and world models, and open examples of each.

## Long-CLIP FAQ

### How do I run Long-CLIP without my own GPU?

Call POST /v1/embed on the OpenRobotics API with "model": "thu/longclip". We run Long-CLIP on cloud GPUs that start on demand, so there is nothing to install or host.

### How much does the Long-CLIP API cost?

$0.02 per 1,000 calls, billed only for successful calls. Pay with prepaid credits or monthly pay-as-you-go.

### What license does Long-CLIP use?

The weights we serve (BeichenZhang/LongCLIP-L) are released under Apache-2.0 (base OpenAI CLIP ViT-L/14: MIT). Check the license for your use case.

### Is Long-CLIP open source?

Long-CLIP's weights are publicly available under Apache-2.0 (base OpenAI CLIP ViT-L/14: MIT). OpenRobotics serves them behind an API so you can use the model without hosting it.

## Similar models

- [SigLIP So400m](https://www.openrobotics.dev/models/google/siglip-so400m.md): `google/siglip-so400m`, $0.02 per 1,000 calls
- [DINOv2](https://www.openrobotics.dev/models/meta/dinov2.md): `meta/dinov2`, $0.02 per 1,000 calls
- [ResNet-18 / ResNet-50](https://www.openrobotics.dev/models/microsoft/resnet-18.md): `microsoft/resnet-18`, $0.02 per 1,000 calls
- [CLIP ViT-L/14](https://www.openrobotics.dev/models/openai/clip-vit-l-14.md): `openai/clip-vit-l-14`, $0.02 per 1,000 calls
- [SigLIP 2](https://www.openrobotics.dev/models/google/siglip2-so400m.md): `google/siglip2-so400m`, $0.02 per 1,000 calls
- [EfficientNet](https://www.openrobotics.dev/models/google/efficientnet.md): `google/efficientnet`, $0.02 per 1,000 calls
