Developer Documentation

Build with attest.ink - integrate AI attestations into your applications

Quick Start

Create your first AI attestation in 3 simple steps:

# Step 1: Create an attestation
curl "https://attest.ink/api/create.html?content_name=My%20Article&model=gpt-4&role=assisted"

# Step 2: Get the verification URL from response
# Step 3: Add the badge to your content
// Step 1: Create an attestation
const response = await fetch('https://attest.ink/api/create.html?' + 
  new URLSearchParams({
    content_name: 'My Article',
    model: 'gpt-4',
    role: 'assisted'
  })
);

const data = await response.json();

// Step 2: Add badge to your page
document.getElementById('badge').innerHTML = data.embedHtml;
import requests

# Step 1: Create an attestation
response = requests.get('https://attest.ink/api/create.html', params={
    'content_name': 'My Article',
    'model': 'gpt-4',
    'role': 'assisted'
})

data = response.json()

# Step 2: Get the badge HTML
badge_html = data['embedHtml']
verify_url = data['verifyUrl']
<!-- Add AI attestation badge to your page -->
<a href="https://attest.ink/verify/?data=YOUR_ATTESTATION_DATA" target="_blank">
    <img src="https://attest.ink/assets/badges/gpt-4-assisted.svg" 
         alt="AI Assisted" 
         width="140" 
         height="30">
</a>

Key Features

No API key required
Works offline
Decentralized
Instant verification

Core API

GET /api/create.html

Create a new attestation for your content. Returns JSON with attestation data and embed code.

View Documentation →
Premium
POST /api/shorten

Create permanent short URLs for your attestations. Requires API key.

View Documentation →

Badge Customization

Choose from multiple badge styles to match your brand:

Standard Standard
AI ASSISTED Glass
Shield Shield.io
View All Badge Styles →

Framework Integrations

import { useEffect, useState } from 'react';

function AIBadge({ contentName, model = 'gpt-4', role = 'assisted' }) {
  const [badgeHtml, setBadgeHtml] = useState('');
  
  useEffect(() => {
    fetch(`https://attest.ink/api/create.html?` + 
      new URLSearchParams({ content_name: contentName, model, role }))
      .then(res => res.json())
      .then(data => setBadgeHtml(data.embedHtml));
  }, [contentName, model, role]);
  
  return 
; }
<template>
  <div v-html="badgeHtml"></div>
</template>

<script>
export default {
  props: ['contentName', 'model', 'role'],
  data() {
    return { badgeHtml: '' }
  },
  async mounted() {
    const params = new URLSearchParams({
      content_name: this.contentName,
      model: this.model || 'gpt-4',
      role: this.role || 'assisted'
    });
    const res = await fetch(`https://attest.ink/api/create.html?${params}`);
    const data = await res.json();
    this.badgeHtml = data.embedHtml;
  }
}
</script>
// pages/api/attestation.js
export default async function handler(req, res) {
  const { content_name, model = 'gpt-4', role = 'assisted' } = req.query;
  
  const response = await fetch('https://attest.ink/api/create.html?' + 
    new URLSearchParams({ content_name, model, role }));
  
  const data = await response.json();
  res.status(200).json(data);
}

// Component
import useSWR from 'swr';

function AIBadge({ contentName }) {
  const { data } = useSWR(`/api/attestation?content_name=${contentName}`);
  return data ? 
: null; }
<script>
  import { onMount } from 'svelte';
  
  export let contentName;
  export let model = 'gpt-4';
  export let role = 'assisted';
  
  let badgeHtml = '';
  
  onMount(async () => {
    const params = new URLSearchParams({ content_name: contentName, model, role });
    const res = await fetch(`https://attest.ink/api/create.html?${params}`);
    const data = await res.json();
    badgeHtml = data.embedHtml;
  });
</script>

{@html badgeHtml}

Resources & Support

Need Help?

We're here to help you integrate AI attestations into your projects

Report an Issue Email Support