Documentation Index
Fetch the complete documentation index at: https://pinata-fix--redirect--docs-to--quickstart.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Documentation Index
Fetch the complete documentation index at: https://pinata-fix--redirect--docs-to--quickstart.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
AnalyticsQuerytype AnalyticsQuery = {
gateway_domain: string;
start_date: string;
end_date: string;
cid?: string;
file_name?: string;
user_agent?: string;
country?: string;
region?: string;
referer?: string;
limit?: number;
sort_order?: "asc" | "desc";
};
TopAnalyticsQuerytype TopAnalyticsQuery = AnalyticsQuery & {
sort_by: "requests" | "bandwidth";
attribute: "cid" | "country" | "region" | "user_agent" | "referer" | "file_name";
};
TopAnalyticsResponsetype TopAnalyticsResponse = {
data: TopAnalyticsItem[];
};
TopAnalyticsItemtype TopAnalyticsItem = {
value: string;
requests: number;
bandwidth: number;
};
TimeIntervalAnalyticsQuerytype TimeIntervalAnalyticsQuery = AnalyticsQuery & {
sort_by?: "requests" | "bandwidth";
date_interval: "day" | "week";
};
TimePeriodItemtype TimePeriodItem = {
period_start_time: string;
requests: number;
bandwidth: number;
};
TimeIntervalAnalyticsResponsetype TimeIntervalAnalyticsResponse = {
total_requests: number;
total_bandwidth: number;
time_periods: TimePeriodItem[];
};
UserPinnedDataResponsetype UserPinnedDataResponse = {
pin_count: number;
pin_size_total: number;
pin_size_with_replications_total: number;
};
PinataConfigtype PinataConfig = {
pinataJwt?: string;
pinataGateway?: string;
pinataGatewayKey?: string;
customHeaders?: Record<string, string>;
endpointUrl?: string;
uploadUrl?: string;
};
FileObjecttype FileObject = {
name: string;
size: number;
type: string;
lastModified: number;
arrayBuffer: () => Promise<ArrayBuffer>;
};
JsonBodytype JsonBody = Record<string, unknown>;
PinataMetadatatype PinataMetadata = {
name?: string;
keyvalues?: Record<string, string>;
};
UpdateFileOptionstype UpdateFileOptions = {
id: string;
name?: string;
keyvalues?: Record<string, string>;
};
DeleteResponsetype DeleteResponse = {
id: string;
status: string;
};
FileListItemtype FileListItem = {
id: string;
name: string | null;
cid: "pending" | string;
size: number;
number_of_files: number;
mime_type: string;
keyvalues: Record<string, string>;
group_id: string | null;
created_at: string;
};
FileListResponsetype FileListResponse = {
files: FileListItem[];
next_page_token: string;
};
FileListQuerytype FileListQuery = {
name?: string;
group?: string;
noGroup?: boolean;
mimeType?: string;
cid?: string;
cidPending?: boolean;
metadata?: Record<string, string>;
order?: "ASC" | "DESC";
limit?: number;
pageToken?: string;
};
PinQueueQuerytype PinQueueQuery = {
sort?: "ASC" | "DSC";
status?: "prechecking" | "retrieving" | "expired" | "backfilled" | "over_free_limit" | "over_max_size" | "invalid_object" | "bad_host_node";
cid?: string;
limit?: number;
pageToken?: string;
};
PinQueueItemtype PinQueueItem = {
id: string;
cid?: string;
ipfs_pin_hash?: string;
date_queued: string;
name: string;
status: string;
keyvalues: any;
host_nodes: string[];
pin_policy: {
regions: {
id: string;
desiredReplicationCount: number;
}[];
version: number;
};
};
PinQueueResponsetype PinQueueResponse = {
rows: PinQueueItem[];
next_page_token: string;
};
SwapCidOptionstype SwapCidOptions = {
cid: string;
swapCid: string;
};
SwapHistoryOptionstype SwapHistoryOptions = {
cid: string;
domain: string;
};
SwapCidResponsetype SwapCidResponse = {
mapped_cid: string;
created_at: string;
};
VectorizeFileResponsetype VectorizeFileResponse = {
status: boolean;
};
VectorizeQuerytype VectorizeQuery = {
groupId: string;
query: string;
returnFile?: boolean;
};
VectorQueryMatchtype VectorQueryMatch = {
file_id: string;
cid: string;
score: number;
};
VectorizeQueryResponsetype VectorizeQueryResponse = {
count: number;
matches: VectorQueryMatch[];
};
ContentTypetype ContentType =
| "application/json"
| "application/xml"
| "text/plain"
| "text/html"
| "text/css"
| "text/javascript"
| "application/javascript"
| "image/jpeg"
| "image/png"
| "image/gif"
| "image/svg+xml"
| "audio/mpeg"
| "audio/ogg"
| "video/mp4"
| "application/pdf"
| "application/octet-stream"
| string
| null;
GetCIDResponsetype GetCIDResponse = {
data?: JSON | string | Blob | null;
contentType: ContentType;
};
OptimizeImageOptionstype OptimizeImageOptions = {
width?: number;
height?: number;
dpr?: number;
fit?: "scaleDown" | "contain" | "cover" | "crop" | "pad";
gravity?: "auto" | "side" | string;
quality?: number;
format?: "auto" | "webp";
animation?: boolean;
sharpen?: number;
onError?: boolean;
metadata?: "keep" | "copyright" | "none";
};
AccessLinkOptionstype AccessLinkOptions = {
cid: string;
date?: number;
expires: number;
gateway?: string;
};
ContainsCIDResponsetype ContainsCIDResponse = {
containsCid: boolean;
cid: string | null;
};
GroupOptionstype GroupOptions = {
name: string;
isPublic?: boolean;
};
UpdateGroupOptionstype UpdateGroupOptions = {
groupId: string;
name?: string;
isPublic?: boolean;
};
GetGroupOptionstype GetGroupOptions = {
groupId: string;
};
GroupListResponsetype GroupListResponse = {
groups: GroupResponseItem[];
next_page_token: string;
};
GroupResponseItemtype GroupResponseItem = {
id: string;
is_public: boolean;
name: string;
createdAt: string;
};
GroupQueryOptionstype GroupQueryOptions = {
name?: string;
limit?: number;
pageToken?: string;
isPublic?: boolean;
};
GroupCIDOptionstype GroupCIDOptions = {
groupId: string;
files: string[];
};
UpdateGroupFilesResponsetype UpdateGroupFilesResponse = {
id: string;
status: string;
};
KeyPermissionstype KeyPermissions = {
admin?: boolean;
endpoints?: Endpoints;
resources?: ResourcePermission[];
};
ResourcePermissiontype ResourcePermission =
| "org:read"
| "org:write"
| "org:files:read"
| "org:files:write"
| "org:groups:read"
| "org:groups:write"
| "org:gateways:read"
| "org:gateways:write"
| "org:analytics:read"
| "org:analytics:write";
Endpointstype Endpoints = {
data?: DataEndponts;
pinning?: PinningEndpoints;
};
DataEndpontstype DataEndponts = {
pinList?: boolean;
userPinnedDataTotal?: boolean;
};
PinningEndpointstype PinningEndpoints = {
hashMetadata?: boolean;
hashPinPolicy?: boolean;
pinByHash?: boolean;
pinFileToIPFS?: boolean;
pinJSONToIPFS?: boolean;
pinJobs?: boolean;
unpin?: boolean;
userPinPolicy?: boolean;
};
KeyOptionstype KeyOptions = {
keyName: string;
permissions: KeyPermissions;
maxUses?: number;
};
KeyResponsetype KeyResponse = {
JWT: string;
pinata_api_key: string;
pinata_api_secret: string;
};
KeyListQuerytype KeyListQuery = {
revoked?: boolean;
limitedUse?: boolean;
exhausted?: boolean;
name?: string;
offset?: number;
};
KeyListItemtype KeyListItem = {
id: string;
name: string;
key: string;
secret: string;
max_uses: number;
uses: number;
user_id: string;
scopes: KeyScopes;
revoked: boolean;
createdAt: string;
updatedAt: string;
};
KeyScopestype KeyScopes = {
endpoints: {
pinning: {
pinFileToIPFS: boolean;
pinJSONToIPFS: boolean;
};
};
admin: boolean;
};
KeyListResponsetype KeyListResponse = {
keys: KeyListItem[];
count: number;
};
RevokeKeyResponsetype RevokeKeyResponse = {
key: string;
status: string;
};
SignatureOptionstype SignatureOptions = {
cid: string;
signature: string;
address: string;
};
SignatureResponsetype SignatureResponse = {
cid: string;
signature: string;
};
UploadResponsetype UploadResponse = {
id: string;
name: string;
cid: string;
size: number;
created_at: string;
number_of_files: number;
mime_type: string;
group_id: string | null;
keyvalues: {
[key: string]: string;
};
vectorized: boolean;
network: string;
};
UploadOptionstype UploadOptions = {
metadata?: PinataMetadata;
keys?: string;
groupId?: string;
vectorize?: boolean;
url?: string;
peerAddresses?: string[];
};
SignedUploadUrlOptionstype SignedUploadUrlOptions = {
date?: number;
expires: number;
groupId?: string;
name?: string;
keyvalues?: Record<string, string>;
vectorize?: boolean;
maxFileSize?: number;
mimeTypes?: string[];
};
UploadCIDOptionstype UploadCIDOptions = {
metadata?: PinataMetadata;
peerAddresses?: string[];
keys?: string;
groupId?: string;
};
PinByCIDResponsetype PinByCIDResponse = {
id: string;
cid: string;
date_queued: string;
name: string;
status: string;
keyvalues: Record<string, any> | null;
host_nodes: string[] | null;
group_id: string | null;
};