Quickstart Guide
Picsha AI allows you to instantly upload, intelligently process, and deliver media around the globe using our edge network.
1. Get an API Key
To interact with the Delivery or Upload APIs programmatically, you'll need an API key.
- Navigate to the API Keys tab in your dashboard.
- Click Generate New Key.
- Store this key securely. You will use it to authorize HTTP requests.
2. Uploading an Image
For standard backend uploads, you can seamlessly push binary data to our tus resumable upload endpoints, or directly request a Signed S3 Upload URL.
If you are using React, the easiest way is to use our SDK:
import { PicshaUploadWidget } from '@picsha-ai/react';
export default function MyUpload() {
return (
<PicshaUploadWidget
apiKey="sk_your_api_key_here"
onUploadComplete={(asset) => console.log('Upload finished:', asset.id)}
/>
)
}
3. Delivering the Image
Once uploaded, Picsha instantly encodes and distributes your media via CloudFront.
<img src="https://api.picsha.ai/v1/assets/ab7d2-1234/render?fit=cover&ht=500&wt=500" />
Any image parameters (ht, wt, fit) are automatically computed on the fly by our high-performance rust image processors!