Prompt templates
Use these prompts as reusable starting points for AI assistants. Each template is optimized for actionable output.
Set up API authentication
Generate correct headers and quick auth checks for Mirqam API calls.
authapi-keyheaders
You are helping integrate the Mirqam API.
Goal:
Create authenticated request examples for my environment.
Context:
- Base URL: <BASE_URL>
- Endpoint: /v1/render
- Auth header: Authorization: Bearer <CLERK_API_KEY>
- Expected error envelope: {"error":{"code":"...","message":"...","details":[...]},"request_id":"..."}
Output:
1) curl request with Authorization: Bearer
2) JavaScript fetch request with Authorization: Bearer
3) Python requests example
4) quick troubleshooting checklist for 401/403Build render request payload
Draft valid JSON for /v1/render with text and optional image fields.
renderpayloadjson
Help me craft a valid Mirqam render request. Inputs: - template_id: <TEMPLATE_ID> - text keys and values: <TEXT_DATA_JSON> - image keys and values (optional): <IMAGES_JSON> - desired format: png, jpg, or pdf Requirements: - Output JSON for POST /v1/render - Include template_id, data, images, options - Use Arabic example text where relevant (e.g. "مرحبًا بكم") - Keep output machine-ready JSON only (no commentary).
Draft template schema
Generate a schema with text/image fields that follows Mirqam rules.
schemafieldseditor
Draft a Mirqam template schema JSON. Inputs: - canvas size: <WIDTH>x<HEIGHT> - desired fields: <FIELD_LIST> - font_id for text fields: <FONT_ID> Rules to enforce: - text fields: type="text", include font/font_id/size/min_size - image fields: type="image", include shape + fit - image fields with shape square/circle must have square boxes (w == h) - coordinates in pixels from top-left Return only valid JSON.
Troubleshoot API errors
Interpret Mirqam errors using code/message/details/request_id and suggest fixes.
errorsdebugrequest-id
Analyze this Mirqam API failure and provide a concrete fix plan.
Input:
- HTTP status: <STATUS>
- Response body: <ERROR_JSON>
- Request payload: <REQUEST_JSON>
Notes:
- Error envelope shape is stable: {"error":{"code":"...","message":"...","details":[...]},"request_id":"..."}
Output format:
1) root cause
2) exact payload/header changes
3) retry command (curl)
4) safeguards to prevent recurrenceUpload and apply fonts
Generate commands and follow-up steps for Arabic-capable font usage.
fontsarabicupload
Guide me through Mirqam font setup for Arabic rendering. Inputs: - Base URL: <BASE_URL> - Clerk API key: <CLERK_API_KEY> - local font files: <FONT_FILE_LIST> Output: 1) curl commands to upload fonts (POST /v1/fonts) with Authorization: Bearer header 2) command to list fonts (GET /v1/fonts) 3) how to pick a font_id 4) final schema snippet using selected font_id
End-to-end integration checklist
Produce a practical, ordered rollout checklist from template creation to render verification.
checklistintegrationqa
Create a practical end-to-end Mirqam integration checklist for my team. Cover: - template creation in /app/editor - Clerk API key creation and secure storage - schema verification - render request validation (PNG/JPG/PDF) - error handling with request_id logging - production readiness checks Include clear pass/fail checks for each step and a final smoke test command set.