A WAV link for any fart you can build on fartrater.com. Free, no key. v1
One URL gives one WAV file. It uses the same three engines as the Fart Builder page (Sculpted, Real and Physics). It also uses the same voice check. The same settings always give the same sound, so browsers and CDNs can cache it for ever.
Phase 1 is read-only: you make sounds. You cannot post to the Community Wall from the API.
<audio controls src="https://fartrater.com/api/v1/fart.wav?preset=thunder"></audio>
Returns a 16-bit mono PCM WAV. Give one of: code, preset, or slider values. All answers allow any origin (CORS), so fetch works from a web page.
# a preset
curl -o thunder.wav "https://fartrater.com/api/v1/fart.wav?preset=thunder"
# a share code from a fartrater.com/f/... link
curl -o mine.wav "https://fartrater.com/api/v1/fart.wav?code=l19p105t35r12f0w4s10v65"
# sliders, on the Physics engine
curl -o rip.wav "https://fartrater.com/api/v1/fart.wav?len=1.4&pitch=70&rattle=90&power=85&engine=physics"
| Parameter | Meaning |
|---|---|
| code | A share code, with an optional name: l19p105...v65~My%20Name. Use it alone. |
| preset | A preset key such as silent-sneaker, its full name, or one word of it (sneaker). Not case sensitive. List them at /api/v1/presets. You can add sliders to change it. |
| engine | sculpted (default), real or physics. |
| name | Optional. A name for the sound (40 characters). It changes the headers and JSON only, not the audio. |
A missing slider takes the default. A value outside the range is moved to the nearest end of the range.
| Name | Range | Default | Effect |
|---|---|---|---|
| len | 0.2 to 4 (seconds) | 1.9 | How long it lasts |
| pitch | 40 to 300 (Hz) | 105 | Base buzz of the valve |
| tight | 0 to 100 | 35 | Relaxed blat to tight squeal |
| rattle | 0 to 100 | 12 | Smooth tone to ragged rip |
| flutter | 0 to 30 (per second) | 0 | Flaps per second, 0 is steady |
| wet | 0 to 100 | 4 | Dry to swampy |
| squeak | 0 to 100 | 10 | Pitch climbs as it closes |
| power | 0 to 100 | 65 | Silent hiss to seismic. Below 20 you get air only. |
Answer headers: Content-Type: audio/wav, X-Fart-Name and X-Fart-Score (the Bean Scale, 0.5 to 10), ETag, and Cache-Control: public, max-age=31536000, immutable.
Put a small player on any page. It has the fart name, the score, a play button and a waveform. It loads no outside scripts.
<iframe src="https://fartrater.com/embed/l16p120t10r20f0w10s0v6" width="360" height="130"
style="border:0;max-width:100%" loading="lazy" title="A fart on FartRater"></iframe>
/embed/<code> plays any fart code from the Fart Builder (add ~name for a custom name). /embed/w/<id> plays a Community Wall post.GET https://fartrater.com/oembed?url=https://fartrater.com/f/<code>&format=json returns the iframe HTML, the size and a thumbnail. It accepts /f/, /embed/ and /embed/w/ links. Share pages (/f/<code>) also announce it with a link rel="alternate" tag.GET /api/fotd returns today's pick with its embed and share links. The page is /today.power below 20, every engine gives a quiet air hiss at 22.05 kHz.Takes the same inputs. It tells you the name and score and gives ready links. It does not make the sound.
curl "https://fartrater.com/api/v1/fart.json?preset=swamp&engine=real"
{
"code": "l13p70t15r55f9w90s0v55",
"name": "The Swamp Bubbler",
"title": "The judges asked for a moment alone. Please check your chair.",
"score": 5.9,
"engine": "real",
"params": { "len": 1.3, "pitch": 70, "tight": 15, ... },
"wav": "https://fartrater.com/api/v1/fart.wav?code=l13p70t15r55f9w90s0v55&engine=real",
"share": "https://fartrater.com/f/l13p70t15r55f9w90s0v55",
"credits": "..."
}
title is the one-line verdict from the rating card.
A list of {key, name, code}. GET /api/v1/health answers ok.
Fart Rater has one hard rule: no human voice in any sound. Each sound from the API is checked by the YAMNet model, the same check the page runs. If it hears a voice, the API makes the sound again with a new seed, up to 4 tries in total, exactly as the page does. If every try has a voice, you get an error (422) and no sound.
Retry-After: 5. Wait and try again.Errors are JSON: {"error": "..."}.
| Status | Meaning |
|---|---|
| 400 | The input is not valid (bad code, unknown preset or engine, a slider that is not a number). |
| 404 | Unknown path. |
| 422 | No voice-free sound for these settings. Change a slider. |
| 429 | Too many new sounds from your address. Wait a minute. |
| 503 | Busy. Try again soon. |
Add the bot to your server. Type /fart and it posts a WAV file with the name, the score and a share link. With no options you get a random fart. Options: preset, engine, power, pitch, length and random. The "Make another" button makes a new random one. Each person can make 20 per minute. The bot needs only Send Messages and Attach Files, and it does not read your messages.
Please link back to fartrater.com where you use the sounds. The credits field of the JSON answer has a short text for this.