Documentation Index Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
Use this file to discover all available pages before exploring further.
10 credits per call · All plans from $0.00012/credit
curl -X PATCH https://xquik.com/api/v1/x/profile/avatar \
-H "x-api-key: xq_YOUR_KEY_HERE" \
-F "account=myxaccount" \
-F "file=@avatar.png" | jq
curl -X PATCH https://xquik.com/api/v1/x/profile/avatar \
-H "x-api-key: xq_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"account": "myxaccount",
"url": "https://example.com/avatar.png"
}' | jq
Your API key. Session cookie authentication is also supported. Generate a key from the dashboard .
Use multipart/form-data for file uploads or application/json for URL uploads. Most HTTP clients set the multipart boundary automatically.
Body
X username or account ID of your connected account to act as.
Multipart upload file. Required unless url is provided. Accepted formats: JPEG, PNG. Maximum file size: 700 KB.
JSON upload URL. Required unless file is provided. Must be an HTTPS URL that Xquik can fetch directly.
Response
{ "error" : "invalid_input" , "message" : "Invalid file format or size exceeded" }
The file is not a supported format (JPEG, PNG) or exceeds the 700 KB limit. { "error" : "unauthenticated" , "message" : "Missing or invalid API key" }
Missing or invalid API key. { "error" : "no_subscription" , "message" : "No active subscription" }
An active subscription is required. Subscribe from the dashboard . { "error" : "insufficient_credits" , "message" : "Insufficient credits" }
Insufficient credits for this operation. Top up your credit balance from the dashboard . { "error" : "account_needs_reauth" }
The connected X account failed a recent login attempt and needs to be reconnected. Reconnect it from the dashboard . { "error" : "account_restricted" }
The connected X account is locked, suspended, recovering, or temporarily restricted. Resolve the restriction on X before retrying. { "error" : "account_not_found" , "message" : "X account not found. Connect it first at /dashboard/account?tab=x-accounts." }
The specified account is not connected to your Xquik account. Connect it from the dashboard . { "error" : "x_content_too_long" , "message" : "..." }
X rejected the write or the media URL could not be downloaded. Possible codes: x_content_too_long, x_duplicate_action, x_account_suspended, x_account_protected, x_target_not_found, x_account_feature_required, x_rejected, media_download_failed (URL fetch path only - body.url not HTTPS, resolves to private IP, file too large, origin error, or timeout). See error handling for details. { "error" : "rate_limit_exceeded" , "retryAfter" : 60 }
The request hit an Xquik tier limit, or X throttled the avatar update. Possible codes: rate_limit_exceeded, x_rate_limited, or x_daily_limit. Respect the Retry-After header when present. { "error" : "x_transient_error" , "message" : "..." }
A transient write service issue occurred. Safe to retry with exponential backoff. { "error" : "x_write_failed" , "message" : "Failed to complete the action" }
The write action failed. Retry after a short delay.