Build camera effects and games for Fentra
Every effect in the Fentra camera is a package in an open format. You can make one today, check it against the gateway's rules and submit it for review.
Three kinds of package
Each is a folder with a manifest and the files it names. The full rules, limits and error codes are in the format spec at effectslab.fentra.com/learn.
| Package | Folder | What it is |
|---|---|---|
| Lens | <id>.fentralens/ | AR worn on the face: image cards placed on the head, 3D models in glTF binary, and paint on the face's own surface. |
| Filter | <id>.fentrafilter/ | A colour look: one 3D lookup table, applied the same way in the camera, the editor and the export. |
| Game | <id>.fentragame/ | A camera game played while it's filmed, on one of Fentra's game templates, filled with your words, pictures, models and sounds. |
A game package is data, not code. The app carries the game engines; your package says which template it plays on and fills it. Nothing in a package runs as code on a phone, which is why an approved effect can reach people without waiting for an app release.
A filter, from folder to camera
A filter is the smallest package: exactly three files.
golden-hour.fentrafilter/
filter.json the manifest
look.cube the 3D lookup table
thumbnail.jpg the look applied to a sample imageEvery key in the manifest is required, and no other key is allowed.
{
"schema": 1,
"id": "golden-hour",
"name": "Golden Hour",
"version": 1,
"category": "trending",
"intensityDefault": 1.0,
"lut": "look.cube",
"thumbnail": "thumbnail.jpg"
}Submitting for review
Submission happens in three requests to the Fentra gateway. EffectsLab does this for you; the shape is here so you know what it checks.
- Create a submission. Send the kind, the parsed manifest, and every file in the package with its exact byte count, lower-case hex SHA-256 and content type.
- Upload the files. The gateway answers with an upload URL for each file.
PUTeach file's raw bytes to its URL. - Submit. The gateway validates the whole package and answers
pending(in the review queue) orinvalid, with a code and a path for every error.
POST /api/v1/effects/submissions
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"kind": "filter",
"manifest": { "schema": 1, "id": "golden-hour", "…": "…" },
"files": [
{ "path": "filter.json", "bytes": 182, "sha256": "…", "contentType": "application/json" },
{ "path": "look.cube", "bytes": 1006471, "sha256": "…", "contentType": "text/plain" },
{ "path": "thumbnail.jpg", "bytes": 48210, "sha256": "…", "contentType": "image/jpeg" }
]
}Then POST /api/v1/effects/submissions/{id}/submit. A package that fails validation comes back like this, so you can fix exactly what's wrong:
{
"submission": {
"status": "invalid",
"validation": {
"ok": false,
"errors": [
{ "code": "thumbnail_size", "path": "thumbnail.png", "message": "…" }
],
"warnings": []
}
}
}Review
Fentra reviews every submitted effect against the Community Guidelines before it's published. Approved effects are published to the catalogue, downloaded by the app, checked against their digests and rendered in the camera.
Where to go next
- EffectsLab, the home of Fentra's effects
- The format spec: every rule, limit and error code for lenses, filters and games