# odysee.video

**stable** **Standard**

A single Odysee video/claim by claim id.

`GET /v1/odysee/video`

## What you get

One Odysee record in Onekey's unified shape, in `data`. If the record does not exist you get a `404 not_found` and are not charged.

## What it costs

- **Standard · 1 credit** for a fresh fetch, charged only when it succeeds.
- **Free when served from cache (0.2 credit for a cached response over 100 KB).**
- **Free** if the request is invalid (never charged) or the source fails or reports not found (refunded).

## Parameters

| Name | Type | Required | Default | What it is | Constraints |
| --- | --- | --- | --- | --- | --- |
| `claim_id` | string | yes | (required) | Odysee claim id (40 hex chars) | max 40 chars; must match `[0-9a-f]{40}`; trimmed, lowercased |

## Request

```bash
curl "https://api.onekey.dev/v1/odysee/video?claim_id=864291658b95336bdadbd92190ce3172d8bf2342" \
  -H "x-api-key: YOUR_API_KEY"
```

```python
import requests

res = requests.get(
    "https://api.onekey.dev/v1/odysee/video",
    params={"claim_id": "864291658b95336bdadbd92190ce3172d8bf2342"},
    headers={"x-api-key": "YOUR_API_KEY"},
)
body = res.json()

if body["success"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
```

```javascript
const params = new URLSearchParams({ claim_id: "864291658b95336bdadbd92190ce3172d8bf2342" });
const res = await fetch(`https://api.onekey.dev/v1/odysee/video?${params}`, {
  headers: { "x-api-key": "YOUR_API_KEY" },
});
const body = await res.json();

if (body.success) console.log(body.data);
else console.error(body.error.code, body.error.message);
```

## Recorded response

A real Odysee response, recorded and returned in Onekey's shape. Fields the platform does not provide are `null`.

```json
{
  "success": true,
  "data": {
    "content": {
      "id": "864291658b95336bdadbd92190ce3172d8bf2342",
      "title": "Spaced Linux - SystemD Free Linux",
      "text": "This video look at the new Spaced Linux based on Devuan with Sysvinit and flatpak for software.\n#linux #devuan #sysvinit\n\nhttps://spacedlinux.com/\n\n-----------\nSupport Switched to Linux!\n👥 locals: https://switchedtolinux.locals.com\n👕 Merch: https://shop.switchedtolinux.com\n🛒 Amazon: http://tlm.li/amazon\n💰 Support: https://switchedtolinux.com/support\n🛒 Affiliates: https://switchedtolinux.com/support/affiliates\n💰 https://patreon.com/tomm\n💰 https://subscribestar.com/switchedtolinux\n-----------\nSocial Media:\n🐦 Twitter: @switchedtolinux\nReddit: /r/switchedtolinux\n-----------\n\nWe are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.\n...\nhttps://www.youtube.com/watch?v=4-TWyCz8DtA",
      "createdAt": "2026-09-19T00:00:00Z"
    },
    "ext": {
      "canonical": "lbry://@switchedtolinux#0/spaced-linux-systemd-free-linux#8"
    },
    "media": {
      "thumbnailUrl": "https://thumbnails.lbry.com/4-TWyCz8DtA",
      "durationSeconds": 619
    },
    "author": {
      "id": "0a60026345d27058f970d5918a7b7b23a8ca4c43",
      "username": "@switchedtolinux",
      "displayName": "Switched to Linux"
    },
    "engagement": {
      "shares": 0
    }
  },
  "metadata": {
    "platform": "odysee",
    "endpoint": "video",
    "cached": false,
    "stale": false,
    "age_s": 0,
    "fetched_at": "2026-01-01T12:00:00+00:00",
    "credits_charged": 1,
    "request_id": "7f3a9c2e5b1d4c8fa2e6d0b9c4f18e37"
  },
  "error": null
}
```

## Field mapping

How this endpoint's source fields become Onekey's [unified schema](https://onekey.dev/docs/schema.md). Fields the source lacks come back as `null`.

| Source path | Onekey field | Transform |
| --- | --- | --- |
| `claim_id` | `content.id` | - |
| `value.title` | `content.title` | - |
| `value.description` | `content.text` | - |
| `canonical_url` | `ext.canonical` | - |
| `value.release_time` | `content.createdAt` | `toIsoDate` |
| `value.thumbnail.url` | `media.thumbnailUrl` | `safeUrl` |
| `value.video.duration` | `media.durationSeconds` | `toNumber` |
| `signing_channel.claim_id` | `author.id` | - |
| `signing_channel.name` | `author.username` | - |
| `signing_channel.value.title` | `author.displayName` | - |
| `meta.reposted` | `engagement.shares` | `toNumber` |

## Caching and freshness

- Fresh for about 1 hour. Repeat calls in that window are served from cache and are free.
- Between 1 hour and 1 day the cached copy is still served instantly and marked `stale: true` while Onekey refreshes it in the background.
- If the source is down when a refresh is needed, the last copy can be served for up to 3 days more (marked stale).
- A "not found" is remembered for 5 minutes and is free.
- The cache is shared across all customers, which is what keeps repeat calls cheap.

## What can go wrong

| Status | Code | What to do |
| --- | --- | --- |
| 401 | `unauthorized` | Check the `x-api-key` header. |
| 402 | `insufficient_credits` | [Add credits](https://onekey.dev/pricing); your balance must cover the price. |
| 404 | `not_found` | That record does not exist. Free; do not retry. |
| 422 | `invalid_params` | Fix the parameters using the table above. Free. |
| 429 | `rate_limited` | Wait `Retry-After` seconds, then retry. |
| 502 | `upstream_error` | The source failed. Refunded; retry with backoff. |

See [Errors](https://onekey.dev/docs/errors.md) for the full list and retry guidance.

Status: stable (verified against the live source).
