imgauth — API di attestazione opere digitali Agent API

The Agent API from imgauth — API di attestazione opere digitali — 4 operation(s) for agent.

GitHub OpenAPI

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /api/agent/authorize Start a device-flow authorization for an agent · Avvia il device flow (P21) #
Ask an LLM
“How does an AI agent or MCP client get authorized to attest works on my behalf?”
“Can I kick off the agent device flow without any credentials?”
Tell an agent
Start a new device-flow authorization request for my agent.
Begin the short-lived agent authorization so a human can approve it.
GET /agent/authorize Open the human approval page for an agent · Pagina di autorizzazione device flow #
Ask an LLM
“Where does a person go to approve an agent's device-flow code?”
“Can the agent authorization page be shown in English instead of Italian?”
Tell an agent
Open the agent authorization page for code {code}.
Show the device-flow approval page for {code} in {lang}.
POST /api/agent/approve Approve an agent's device-flow request · Approva il device flow, genera il session token #
Ask an LLM
“What happens after I pass the Turnstile check on the agent approval page?”
“Which values are needed to approve a pending agent and mint its session token?”
Tell an agent
Approve device-flow code {code} using Turnstile token {turnstile_token}.
Grant the agent session token for code {code} after challenge {turnstile_token}.
GET /api/agent/token Poll for an agent's session token · Polling del device flow #
Ask an LLM
“How does my agent find out whether the human approved its request?”
“Why does polling return 'claimed' after I already picked up the token?”
Tell an agent
Poll the device flow for the token issued to code {code}.
Check whether authorization {code} has been approved and collect the token.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/imgauth-api-di-attestazione-opere-digitali:imgauth-api-di-attestazione-opere-digitali-agent-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

imgauth-api-di-attestazione-opere-digitali-agent-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: imgauth — API di attestazione opere digitali Agent API
  version: 1.34.1
  description: 'Motore di attestazione Spazio Genesi ETS. Full privacy: l''impronta SHA-256 si calcola sul client, il file non viene mai inviato al server. Contratto reale in italiano (non tradurre i nomi campo). Vedi https://attestazione.spaziogenesi.org per l''interfaccia utente e https://github.com/SPAZIO-GENESI/imgauth per il codice sorgente (AGPL-3.0).'
  contact:
    name: Spazio Genesi ETS
    url: https://spaziogenesi.org
  license:
    name: AGPL-3.0-only
    url: https://github.com/SPAZIO-GENESI/imgauth/blob/main/LICENSE
servers:
- url: https://imgauth.spaziogenesi.org
  description: produzione
tags:
- name: Agent
paths:
  /api/agent/authorize:
    post:
      summary: Avvia il device flow (P21)
      description: Nessuna autenticazione richiesta. Crea una richiesta di autorizzazione a breve scadenza.
      responses:
        '200':
          description: Codice generato
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  verification_url:
                    type: string
                  expires_in:
                    type: integer
                    example: 600
                  interval:
                    type: integer
                    example: 3
        '429':
          description: Rate limit per-IP (60/60s)
      tags:
      - Agent
      operationId: postApiAgentAuthorize
      x-operation-id-source: derived
  /agent/authorize:
    get:
      summary: Pagina di autorizzazione device flow
      description: 'HTML servita dal Worker con widget Turnstile: l''umano autorizza qui l''agente/MCP.'
      parameters:
      - name: code
        in: query
        required: true
        schema:
          type: string
      - name: lang
        in: query
        required: false
        schema:
          type: string
          enum:
          - it
          - en
        description: Lingua della pagina (P41). Default 'it'.
      responses:
        '200':
          description: Pagina HTML
          content:
            text/html: {}
        '400':
          description: codice non valido
        '410':
          description: richiesta scaduta
      tags:
      - Agent
      operationId: getAgentAuthorize
      x-operation-id-source: derived
  /api/agent/approve:
    post:
      summary: Approva il device flow, genera il session token
      description: Chiamata dalla pagina /agent/authorize dopo il completamento della challenge Turnstile.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                turnstile_token:
                  type: string
              required:
              - code
              - turnstile_token
      responses:
        '200':
          description: Approvato
        '400':
          description: codice o token mancante
        '403':
          description: verifica anti-bot non superata
        '409':
          description: richiesta già gestita
        '410':
          description: richiesta scaduta
        '429':
          description: Rate limit per-IP (60/60s)
      tags:
      - Agent
      operationId: postApiAgentApprove
      x-operation-id-source: derived
  /api/agent/token:
    get:
      summary: Polling del device flow
      description: 'Il token è consegnato UNA SOLA VOLTA: dopo la prima lettura, i poll successivi restituiscono status ''claimed''.'
      parameters:
      - name: code
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Stato o token
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                    - pending
                    - approved
                    - claimed
                  token:
                    type:
                    - string
                    - 'null'
                    description: presente solo su status:approved, una sola volta
        '410':
          description: richiesta scaduta
        '429':
          description: Rate limit per-IP (60/60s)
      tags:
      - Agent
      operationId: getApiAgentToken
      x-operation-id-source: derived
components:
  securitySchemes:
    agentBearer:
      type: http
      scheme: bearer
      bearerFormat: sg_k_<id>_<secret> oppure sg_s_<id>_<secret>
      description: 'Credenziale agente (P21): API key per convenzioni o session token da device flow. Sblocca SOLO il bypass della challenge Turnstile su POST /api/hash — HMAC, timestamp server e rate limit per-IP restano invariati. Facoltativa: senza header, il percorso Turnstile è identico a prima.'
    voucherHeader:
      type: apiKey
      in: header
      name: X-SG-Voucher
      description: 'Voucher firmato stateless (P25 §2.7): ottenuto SOLO tramite il flusso OAuth "Attesta con la tua email" sul sito — non c''è un endpoint pubblico in questo contratto che lo emette. TTL 8h. Bypassa il solo Turnstile su /api/hash e /api/cert-pdf, applica pool/tetto di un''eventuale convenzione o la fascia Professionale — stesso principio del bearer agente.'
x-provenance:
  method: harvested
  publisher: imgauth — API di attestazione opere digitali
  source: https://imgauth.spaziogenesi.org/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)