Call the free blink encode API endpoint
Put the text in the path:
curl https://aisenseapi.com/services/v1/blink_encode/SOS{"coding":"morse","morse":"... --- ...","bits":"101010001110111011100010101","timing":[100,100,100,100,100,300,300,100,300,100,300,300,100,100,100,100,100],"unit_ms":100,"duration_ms":2700,"skipped":[]}Or post it with a unit of your own, here 200 ms for a lamp seen across a room:
curl -X POST https://aisenseapi.com/services/v1/blink_encode \
-H "Content-Type: application/json" \
-d '{"data": "HELLO", "unit_ms": 200}'{"coding":"morse","morse":".... . .-.. .-.. ---","bits":"1010101000100010111010100010111010100011101110111","timing":[200,200,200,200,200,200,200,600,200,600,200,200,600,200,200,200,200,600,200,200,600,200,200,200,200,600,600,200,600,200,600],"unit_ms":200,"duration_ms":9800,"skipped":[]}The way back is the blink decode API endpoint.
Try it / Sender
Blink a message on this screen
Type a message, and the square below blinks it in Morse timing for a phone camera to read.
- Open the receiver on a phone and choose Start camera.
- Type a message here and choose Blink.
- Hold the phone so the square fills the marked frame until the text comes.

Scan the code to open the receiver on your phone, or go to aisense.no/free-public-api-blink-decode-api-endpoint.
5 / 128 bytes
The square flashes white and black, at most 3 times a second from 170 ms. At 80 ms it flashes up to 6 times a second and at 60 ms up to 8, so those units blink in a small square and full screen is off. Do not use it if flashing light affects you.
Ready.
The signal
The text goes to the API, which answers the timing. The blinking runs in your browser, and the screen stays awake while it blinks where the browser allows it.
The timing
Morse timing counts in units. The text becomes International Morse code first, as the Morse encode API endpoint writes it, with its code table.
| Part | Length |
|---|---|
| A dot | 1 unit on |
| A dash | 3 units on |
| The gap inside a letter | 1 unit off |
| The gap between letters | 3 units off |
| The gap between words | 7 units off |
Pick the unit for what will see the signal. It needs at least three samples a unit.
| Reader | Unit |
|---|---|
| A phone or webcam at 30 frames per second | 100 ms, the default; 150 ms or more when the picture flickers or moves |
| A camera at 60 frames per second | 50 ms |
| An LED switched by a small computer, read by a light sensor at 1 kHz or more | 5 ms and up |
| A person, or window shades seen from afar | 1000 to 5000 ms |
Input and answer
GET /blink_encode/{text}takes the text as one path segment, percent-encoded: a space as%20, a slash as%2F. Two more segments may follow, the coding and the unit:/blink_encode/SOS/morse/200.POST /blink_encodetakes{"data": "...", "unit_ms": 100}withContent-Type: application/json, or the text as the raw request body with any other type. At most 128 bytes, in UTF-8.unit_msis a whole number from 5 to 5000.morseis the code.bitshas one character per unit,1for on and0for off.timinglists the lengths of the runs in milliseconds, the first one on.duration_msis the whole signal.skippedlists each character without a code once, as the Morse encode endpoint does.
To play the signal, switch on for the first value of timing, off for the next, and so on. Leave it off for a few units before and after, so a reader sees where the message starts and ends.
curl -X POST https://aisenseapi.com/services/v1/blink_encode \
-H "Content-Type: application/json" \
-d '{"data": "OK #1"}'{"coding":"morse","morse":"--- -.- / .----","bits":"11101110111000111010111000000010111011101110111","timing":[300,100,300,100,300,300,300,100,100,100,300,700,100,100,300,100,300,100,300,100,300],"unit_ms":100,"duration_ms":4700,"skipped":["#"]}Errors
| Status | error | When |
|---|---|---|
| 400 | No text to blink. | No text in the path, no data string and no body |
| 413 | Text over 128 bytes. | More than 128 bytes of text in one request |
| 400 | The data is not UTF-8 text. | Bytes that are not UTF-8 |
| 400 | Nothing in the text has a Morse code. | Only characters without a code; skipped lists them |
| 400 | coding is morse. | Another coding was asked for |
| 400 | unit_ms is a whole number of milliseconds from 5 to 5000. | A unit outside 5 to 5000, or one with a fraction |
Each refusal also carries fix, a sentence saying what to send instead.
Common uses
A screen that speaks to a phone
Blink a square on a laptop, a kiosk or a sign, and read it back with a phone camera through the decode endpoint.
A lamp or a smart bulb
Switch a lamp by the timing to pass a short code, a room number or a status across a room.
Shades and slow signals
At a unit of a second or more, shades, a porch light or a flag can carry a word that a camera reads from far away.
Agents
Through the MCP server the same encoder is the tool encode_blink.
Privacy and limits
Nothing is stored. The blink encode answer is worked out while the request is open and the signal is gone with it. The access log records the path and the status. A text or bits sent in the path are part of that path, so post them when they should not be logged.
The base URL is https://aisenseapi.com/services/v1. There is no key, no account and no sign-up step. An encode takes at most 128 bytes of text and a decode at most 200,000 bits, run lengths or levels, and the service-wide limit is 5000 requests per IP address per day. Every endpoint in the collection is listed on the Free public REST APIs reference, and the encodings side by side on Encoding APIs.