Skip to main content
GET
/
api
/
chat
/
base64
/
:instance
Media as base64
curl --request GET \
  --url https://api.example.com/api/chat/base64/:instance

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Auth: TokenAccount or TokenInstanceRate-limit: Global (100/min) • Idempotent: yes

Description

Reads media already stored locally (after ingestion) and returns the content in base64. Works for images, videos, audio, documents, and stickers.
Only messages whose media has already been downloaded and persisted by the ingestion pipeline return data here. If the media does not yet exist in storage, the response is 404.

Example

curl -X GET "https://ryzeapi.cloud/api/chat/base64/$Instance_Name?messageId=3EB08FCF27E532F1B0F5" \
  -H "token: $Token_Instance"

Success response

The response echoes message_id, brings mime_type and media_type (general category: image, video, audio, document, sticker), and returns in base64 the raw media bytes already encoded, ready to write to a file, upload elsewhere, or display inline. The payload can be large for long videos/audios.
200 OK
{
  "success": true,
  "message": "Base64 retrieved successfully",
  "message_id": "3EB08FCF27E532F1B0F5",
  "mime_type": "image/jpeg",
  "media_type": "image",
  "base64": "iVBORw0KGgoAAAANSUhEUgAAAAEA..."
}

Path parameters

instance
string
required
Instance name.

Query params

messageId
string
required
ID of the message that contains the media.

Headers

NameRequiredExampleDescription
tokenyes (or Authorization)a1b2c3d4-...TokenAccount or TokenInstance.

Error responses

HTTPerror.messageWhen it happens
400Instance name is required
400messageId query parameter is required
401Invalid token
404Instance not found
404Message not found or no media availableMedia missing or not yet downloaded.
503Instance is not connected to WhatsApp
Error 404
{
  "success": false,
  "error": { "message": "Message not found or no media available" }
}

Find message

Retrieve metadata before downloading.

Delivery status

Check delivery/read.