Getting Started
Welcome to Reimage API! This guide will help you get up and running with the Reimage image and video processing API.
What is Reimage?
Reimage is a powerful image and video processing API that allows you to:
- Upload and store images and videos in the cloud
- Transform images on-the-fly using URL-based parameters
- Remove backgrounds from images automatically
- Process videos with HLS streaming support
- Search images using AI-powered semantic search
- Organize assets with tags and folders
Base URL
All API requests should be made to:
https://api.reimage.devPrerequisites
Before you begin, you'll need:
- A Reimage account with an API key
- Your unique bucket/directory identifier
- Basic knowledge of REST APIs
Getting Your API Key
- Log into your Reimage Dashboard
- Navigate to Settings → API Keys
- Copy your API key (keep it secure!)
Your API key should look like this:
sk_live_abc123def456ghi789Authentication
All API requests (except image retrieval via CDN) require authentication using your API key in the Authorization header:
http
Authorization: Bearer YOUR_API_KEYSee the Authentication Guide for detailed examples in different languages.
Your First Request
Let's make your first API call to get your user information:
javascript
const response = await fetch('https://api.reimage.dev/user/', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const user = await response.json();
console.log(user);
// {
// name: "John Doe",
// bucket_id: "abc123",
// storage_used: 1024,
// storage_limit: 10485760,
// image_count: 5
// }python
import requests
response = requests.get(
'https://api.reimage.dev/user/',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
user = response.json()
print(user)php
<?php
$ch = curl_init('https://api.reimage.dev/user/');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$user = json_decode($response, true);
print_r($user);
?>go
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.reimage.dev/user/", nil)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var user map[string]interface{}
json.Unmarshal(body, &user)
fmt.Println(user)
}rust
use reqwest::header::{HeaderMap, HeaderValue, AUTHORIZATION};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut headers = HeaderMap::new();
headers.insert(
AUTHORIZATION,
HeaderValue::from_str("Bearer YOUR_API_KEY")?
);
let client = reqwest::Client::new();
let response = client
.get("https://api.reimage.dev/user/")
.headers(headers)
.send()
.await?;
let user: serde_json::Value = response.json().await?;
println!("{:?}", user);
Ok(())
}Next Steps
Now that you have your API key configured:
- Learn about Authentication - Detailed authentication examples
- Quick Start Guide - Upload your first image
- API Reference - Explore all available endpoints
- Image Transformations - Learn about on-the-fly image processing
Need Help?
- Check out our API Reference for detailed endpoint documentation
- Review common Error Handling scenarios
- Contact support at [email protected]