# CodePen Prefill Embeds API

**Canonical:** https://apis.io/apis/codepen/prefill-embeds/  
**Provider:** CodePen — https://apis.io/providers/codepen/  
**Base URL:** https://public.codepenassets.com/embed/index.js  
**Documentation:** https://blog.codepen.io/documentation/prefill-embeds/

CodePen Prefill Embeds API is one of 4 APIs that [CodePen](https://apis.io/providers/codepen/) publishes on the [APIs.io](https://apis.io/) network. Tagged areas include Embeds, Front-End Development, and JavaScript. The published artifact set on APIs.io includes API documentation.

Declarative embed API that transforms existing code blocks on a web page into live, interactive CodePen sandboxes without requiring users to navigate away. Code is supplied via data-prefill JSON attributes and pre elements; the embed script at public.codepenassets.com renders an isolated iFrame. Supports HTML, CSS, and JavaScript preprocessors, external stylesheets and scripts, and optional editable mode.

## Machine-readable artifacts (1)

- **Documentation** — https://blog.codepen.io/documentation/prefill-embeds/

## Other CodePen APIs (3)

- [CodePen oEmbed API](https://apis.io/apis/codepen/oembed/)
- [CodePen Embed API](https://apis.io/apis/codepen/embed/)
- [CodePen POST to Prefill API](https://apis.io/apis/codepen/post-to-prefill/)

## Tags

Embeds, Front-End Development, JavaScript

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/codepen/prefill-embeds/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/codepen/.
