"use client" import { useState } from "react" import { Copy, CheckCheck, ExternalLink, ImageIcon, UserCircle, Code } from "lucide-react" import { Button } from "@/components/ui/button" import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert" import { AlertTriangle } from "lucide-react" import { Badge } from "@/components/ui/badge" export default function Home() { const [copied, setCopied] = useState(null) const baseUrl = typeof window !== "undefined" ? window.location.origin : "" const randomImageUrl = `${baseUrl}/random-image` const gravatarProxyUrl = `${baseUrl}/gravatar` const copyToClipboard = (text: string, id: string) => { navigator.clipboard.writeText(text) setCopied(id) setTimeout(() => setCopied(null), 2000) } return (

API Services

Connect the world with us

Access Restricted The API is not open to the public. If you need it, please contact us at{" "} 10010@spircape.com Integration Guide Follow these examples to integrate our services into your application Random Image Gravatar Proxy

Random Image API

GET

This API randomly serves an image from a predefined collection. Perfect for placeholder images, random backgrounds, or testing purposes.

HTML Usage

                          {`Random image`}
                        

React Usage

                          {`import { useState } from 'react';\n\nfunction RandomImage() {\n  const [refresh, setRefresh] = useState(0);\n  \n  return (\n    Random image setRefresh(Date.now())}\n      className="cursor-pointer transition-opacity hover:opacity-90"\n    />\n  );\n}`}
                        

Gravatar Proxy

GET

Our Gravatar proxy service improves loading speed and reliability for Gravatar images. It caches and optimizes avatar delivery for your applications.

Basic Usage

                          {`\nUser avatar`}
                        

With Size Parameter

                          {`\nUser avatar`}
                        

With Default Image

                          {`\nUser avatar`}
                        
The above is for example only, please adjust according to the specific development environment

© {new Date().getFullYear()} Spircape. All rights reserved.

) }