> ## Documentation Index
> Fetch the complete documentation index at: https://developers.myeden.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Ingesting videos

> Best practices for the POST /v1/videos endpoint.

## Source URL requirements

* Must be HTTPS
* Must be publicly accessible (no cookie auth, no short-expiry signed URLs)
* Container: mp4, mov, mkv, webm
* Codec: H.264 / H.265 / VP9 / AV1
* Recommended max duration: 4 hours
* Recommended max size: 5 GB

If your CDN requires signed URLs, generate one valid for at least 30
minutes so Eden's pipeline has time to fetch.

## Custom thumbnails

The optional `thumbnail_url` parameter lets you supply your own promotional
image for each video. If omitted, Mux generates one automatically from a
frame in the video.

**Recommended specs:**

* Aspect ratio: **16:9** (e.g. 1920×1080, 1280×720)
* Format: JPEG or PNG
* Max size: 2 MB
* Must be HTTPS and publicly accessible

**Example request with custom thumbnail:**

```json theme={null}
{
  "source_url": "https://media.example.com/highlight.mp4",
  "thumbnail_url": "https://media.example.com/highlight-thumb.jpg",
  "title": "Q4 Game-Winning Shot",
  "tags": ["highlights", "finals"]
}
```

The thumbnail URL is stored as-is and served directly from your CDN. Eden
does not download or proxy the image, so make sure your CDN can handle the
expected traffic to the URL.

If you change the thumbnail later, currently you'd need to delete and
re-ingest the video. Per-video thumbnail updates are planned for v1.1.

## Sport

The `sport` field links your video to one of Eden's sport-specific feeds
and surfaces. It is optional but strongly recommended — videos with a
sport tag get better placement in personalized recommendations.

| Value                 | Sport               |
| --------------------- | ------------------- |
| `tennis`              | Tennis              |
| `soccer`              | Soccer              |
| `basketball`          | Basketball          |
| `cricket`             | Cricket             |
| `american_football`   | American Football   |
| `australian_football` | Australian Football |
| `baseball`            | Baseball            |
| `lacrosse`            | Lacrosse            |
| `badminton`           | Badminton           |
| `equestrian`          | Equestrian          |
| `golf`                | Golf                |
| `boxing`              | Boxing              |
| `mma`                 | Mixed Martial Arts  |
| `formula_one`         | Formula 1           |
| `ice_hockey`          | Ice Hockey          |
| `rugby`               | Rugby               |
| `cycling`             | Cycling             |
| `track_and_field`     | Track & Field       |
| `swimming`            | Swimming            |
| `gymnastics`          | Gymnastics          |
| `table_tennis`        | Table Tennis        |
| `skiing`              | Skiing              |
| `snowboarding`        | Snowboarding        |
| `skateboarding`       | Skateboarding       |
| `surfing`             | Surfing             |
| `wrestling_pro`       | Wrestling (Pro)     |
| `motocross`           | Motocross           |
| `fencing`             | Fencing             |
| `climbing`            | Climbing            |
| `pickleball`          | Pickleball          |

Sending an unknown `sport` value returns `400 invalid_input`. If a sport
you need is missing, contact developer support to have it added.

## Category

The `category` field is YouTube-style content-type taxonomy and is
**independent of the `sport` field**. They describe different dimensions:

* `sport` identifies the sport the content is about (routes to sport-specific feeds)
* `category` identifies the content type (entertainment, comedy, education, etc.)

A tennis player's interview is `sport: "tennis"`, `category: "entertainment"`.
A highlight reel is `sport: "tennis"`, `category: "sports"`. A behind-the-scenes
training video is `sport: "tennis"`, `category: "howto_style"`. Both fields are
optional but recommended — they power different discovery surfaces.

| Value                | Category              |
| -------------------- | --------------------- |
| `autos_vehicles`     | Autos & Vehicles      |
| `comedy`             | Comedy                |
| `education`          | Education             |
| `entertainment`      | Entertainment         |
| `film_animation`     | Film & Animation      |
| `gaming`             | Gaming                |
| `howto_style`        | Howto & Style         |
| `music`              | Music                 |
| `news_politics`      | News & Politics       |
| `nonprofits`         | Nonprofits & Activism |
| `people_blogs`       | People & Blogs        |
| `pets_animals`       | Pets & Animals        |
| `science_technology` | Science & Technology  |
| `sports`             | Sports                |
| `travel_events`      | Travel & Events       |

## Language code

The `language_code` field tells Mux's caption generation what language
the source video's audio is in. Defaults to `en` if omitted.

**Format**: lowercase ISO 639-1 two-letter code only. Examples: `en`, `es`,
`fr`, `de`, `pt`, `ja`, `zh`, `ar`. Country variants like `en-US` are
**not accepted** — send the base language code only.

Eden auto-translates captions into 18 additional languages regardless of
source — partners only need to send the source language correctly.

## Summary

The `summary` field is an optional text description of the video. Use it
to capture your editorial blurb, press release snippet, or game recap —
anything you'd want to surface alongside the title in feeds, search
results, and recommendations.

**Constraints:**

* Maximum length: 2000 characters
* Format: plain text (no HTML, no markdown rendering — special characters
  are preserved as-is)
* Optional. Videos without a summary still index normally; the field
  simply stays null.

If a summary is provided, it persists in both QuickBlox (powering the
in-app display) and Recombee (powering search and recommendation ranking).
Longer-form context generally improves recommendation match quality, so
sending a meaningful summary is encouraged for highlight reels, interviews,
and feature content. Short clips (raw plays, 10-second moments) can safely
omit it.

## What happens after you POST

1. **Mux fetches** your video from `source_url` directly
2. **Mux** transcodes the video for adaptive bitrate streaming
3. **Mux AI** generates captions and translates them into 18 languages
4. **Azure Video Indexer** extracts metadata (topics, labels, scenes)
5. **Eden's discovery layer** indexes the video across feeds, search,
   and recommendations

Total time depends on duration. Short clips (under 2 minutes) complete
in \~90 seconds; full games can take 30+ minutes.

## Trust & safety

The Developer API does not run UGC content moderation. As an invited
partner, you've agreed to Eden's content policy and warrant that all
videos uploaded comply with it. Eden may review, archive, or remove
content that violates policy.

If you discover content that should be removed, use
`POST /v1/videos/{id}/archive` (reversible) or `DELETE /v1/videos/{id}`
(permanent).

## Idempotency

The API is not automatically idempotent. POSTing the same `source_url`
twice creates two videos. Deduplicate on your side before calling.

## Common mistakes

<AccordionGroup>
  <Accordion title="Submitting before the file is fully uploaded">
    If your CDN serves a partial file, transcoding will fail. Wait until
    your upload pipeline confirms the asset is complete.
  </Accordion>

  <Accordion title="Using HTTP instead of HTTPS">
    `source_url` must start with `https://`. HTTP is rejected with
    `400 invalid_input`.
  </Accordion>

  <Accordion title="Geo-restricted or IP-restricted source URLs">
    Mux fetches the video directly from your URL. If your CDN blocks
    requests from Mux's fetcher (rotating IPs, mostly US-based) the
    ingest will fail. The simplest fix: serve the video from a URL with
    no geo or IP restrictions. If you need to whitelist specific IPs,
    reach out and we'll share Mux's current ingress ranges.
  </Accordion>

  <Accordion title="Source URL behind authentication">
    Public URL means publicly accessible. If your CDN requires headers or
    cookies, Eden's fetcher won't be able to authenticate. Use a signed
    URL with a long enough TTL instead.
  </Accordion>
</AccordionGroup>
