Request API access
The Media API is included with a Nexpher Images subscription. Email [email protected] to request keys for staging and production.
Media API Documentation
This guide helps your team integrate search and download endpoints so users can retrieve licensed images without leaving your product.
The Media API is included with a Nexpher Images subscription. Email [email protected] to request keys for staging and production.
Save your API key in server-side environment variables. Never expose private keys in frontend code.
Call the search endpoint from your backend, then render image previews and metadata in your application.
Request a download token and fetch the file with a secure URL so users can download inside your own system.
Keep credentials server-side and route API calls through your backend service.
# .env.local (server only)
NEXPHER_API_BASE_URL=https://media-api.nexpherimages.com/v1
NEXPHER_API_KEY=your_private_api_key
# Never expose private key in browser bundle
# Live API docs: https://media-api.nexpherimages.com/docsExample server-side flow: search image, request token, then download through your application.
const API_BASE = process.env.NEXPHER_API_BASE_URL; // https://media-api.nexpherimages.com/v1
const API_KEY = process.env.NEXPHER_API_KEY;
const headers = { Authorization: 'Bearer ${API_KEY}' };
// 1) Search images
const searchRes = await fetch(API_BASE + '/images/search?q=election&limit=20', { headers });
const searchData = await searchRes.json();
const imageId = searchData.items[0]?.id;
// 2) Request secure download token
const tokenRes = await fetch(API_BASE + '/images/' + imageId + '/download-token?size=article', { headers });
const tokenData = await tokenRes.json();
// 3) Download image with tokenized URL (302 redirect to S3)
const fileRes = await fetch(API_BASE + '/images/' + imageId + '/download?token=' + tokenData.token, { headers });
// Or use @nexpher/media-api-client npm packageSubscribers can connect Claude, Cursor, or other MCP clients to the same library. Use your Bearer API key — there is no separate MCP credential.
{
"mcpServers": {
"nexpher-media": {
"url": "https://media-api.nexpherimages.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
# Tools: search_images, get_image, create_download_token,
# get_latest_feed, get_account_usageCheck Authorization header format and confirm your API key is active.
The image or license tier may be restricted for your account. Contact support for permission updates.
Apply retry with backoff and review your subscription quota for sustained traffic.
Verify imageId values and ensure the asset still exists in your account scope.
Share your platform stack and use case. Our team can guide implementation and rollout planning.
Email [email protected]