Démarrage rapide

Premier flash en 5 minutes

Vous compilez. Cloudhil programme une vraie NUCLEO-F429ZI, attend au plus 20 secondes, renvoie une mailbox JSON, puis efface la carte. Les agents suivent install.md.

Il vous faut

  • arm-none-eabi-gcc et curl.
  • Une clé d’agent Cloudhil (ch_…), montrée une fois.
  • Un bon Pay With Prompt (pwpv_…) pour le marchand cloudhil. 10 crédits = 1 flash.

Utilisez https://. Le http:// nu est redirigé et ne flashe pas. Ne publiez ni la clé ni le bon.

1. Enregistrer un agent

register
curl -sS -X POST https://cloudhil.com/api/v1/agents/register -F label=my-agent

Envoyez api_key dans Authorization: Bearer.

2. Obtenir un bon

Sur Pay With Prompt, inscrivez-vous, résolvez une consigne, échangez. La recette : paywithprompt.com/AGENTS.md. N’ajoutez pas -L : une redirection perd le corps du POST.

paywithprompt.com
curl -sS -X POST https://paywithprompt.com/api/v1/agents/register \
  -H 'Content-Type: application/json' -d '{"label":"my-agent"}'
curl -sS 'https://paywithprompt.com/api/v1/prompts/next?merchant=cloudhil' \
  -H 'Authorization: Bearer pwp_…'
curl -sS -X POST "https://paywithprompt.com/api/v1/prompts/PROMPT_ID/submit" \
  -H 'Authorization: Bearer pwp_…' -H 'Content-Type: application/json' \
  -d '{"answer":"..."}'
curl -sS -X POST https://paywithprompt.com/api/v1/redeem \
  -H 'Authorization: Bearer pwp_…' -H 'Content-Type: application/json' \
  -d '{"merchant":"cloudhil","units":1}'

Seul un code PASS paie. Le champ voucher est le pwpv_… à envoyer. Un bon, un flash.

3. Compiler le hello

nucleo-f4
curl -fsSL -o hello.c https://cloudhil.com/hello/src/hello.c
curl -fsSL -o f4.ld https://cloudhil.com/hello/src/f4.ld
arm-none-eabi-gcc -mthumb -ffreestanding -nostdlib -Os -mcpu=cortex-m4 \
  -T f4.ld -DMAILBOX=0x2002FF00 -o f4.elf hello.c

Cloudhil ne compile pas. N’envoyez pas n6-nn/nn.elf. Les autres cartes sont dans AGENTS.md.

4. Flasher et lire la mailbox

flash
curl -sS -X POST https://cloudhil.com/api/v1/jobs/flash \
  -H 'Authorization: Bearer ch_…' \
  -F board=nucleo-f4 -F firmware=@f4.elf -F voucher=pwpv_… -F uart_seconds=2
curl -sS "https://cloudhil.com/api/v1/jobs/JOB_ID" \
  -H 'Authorization: Bearer ch_…'

Succès : result.mailbox.ok vrai et nn_magic 0x4e4e4f4b (NNOK). L’UART est dans result.uart. Un banc éteint renvoie HTTP 503 et ne consomme pas le bon. Un mauvais bon renvoie HTTP 402.

Depuis un agent

Collez install.md ou indiquez-le à l’agent. MCP distant : https://cloudhil.com/mcp. Swagger : /docs. Confidentialité : /privacy.