Ведическая визуальная карта
Ведическая визуальная карта
/api/v2/vedic/visual/chartОтобразите калиброванные ведические дробные карты V2 как необработанные изображения SVG или PNG. Один запрос может нарисовать D1, D9 или любой поддерживаемый набор подразделений на одном холсте изображения с использованием макетов Kundli Северной Индии, Южной Индии или Восточной Индии.
Полный URL-адрес
https://api.freeastroapi.com/api/v2/vedic/visual/chartБезопасные повторы с Idempotency-Key
Аутентифицированные платные astrology POST-запросы принимают необязательный заголовок Idempotency-Key: <уникальный ключ операции, созданный клиентом>. Повторно используйте тот же ключ только при повторе точно того же method, path, query string и JSON body после timeout или сетевой ошибки.
Завершенный повтор возвращает первый ответ с Idempotency-Replayed: true, не запускает расчет заново и не расходует дополнительную квоту. Ключи хранятся примерно 24 часа.
Повторное использование ключа с измененным запросом возвращает 409 idempotency_key_reused. Дубликат, пока первый запрос еще выполняется, возвращает 409 request_in_progress с Retry-After.
Что он возвращает
Тело ответа — это данные изображения, а не JSON. Использовать format: "svg" для редактируемого SVG со стабильными идентификаторами элементов или format: "png" для растрового вывода, созданного с помощью CairoSVG.
Реальные визуальные примеры
Они генерируются выходными данными SVG из конечной точки с использованием того же средства рендеринга, размещения меток, размещения тела и элементов управления темами, доступных через API.
north_indianРомбовидная раскладка Fixed-house со всеми включенными группами тел.
south_indianПланировка периметра Fixed-sign настроена для многолюдных домов.
east_indianКвадратный макет Fixed-sign с использованием моно-темы.
Пример запроса
curl -X POST "https://api.freeastroapi.com/api/v2/vedic/visual/chart" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"year": 1985,
"month": 8,
"day": 22,
"hour": 6,
"minute": 45,
"city": "Mumbai",
"lat": 19.076,
"lng": 72.8777,
"tz_str": "Asia/Kolkata",
"ayanamsha": "lahiri",
"house_system": "whole_sign",
"node_type": "mean",
"divisions": [
1,
9
],
"chart_style": "north_indian",
"format": "svg",
"size": 700,
"theme_type": "light",
"body_types": [
"ascendant",
"classical_grahas",
"nodes",
"outer_planets"
],
"ascendant_text_color": "#0B7285",
"display_settings": {
"ascendant": true,
"rahu": true,
"ketu": true,
"uranus": true,
"neptune": true,
"pluto": true,
"sign_labels": true
}
}' \
--output vedic-d1-d9.svgТело запроса
| Field | Type | Required | Description |
|---|---|---|---|
| year | integer | Yes | Birth year. |
| month | integer | Yes | Birth month (1-12). |
| day | integer | Yes | Birth day. |
| hour | integer | Yes | Birth hour (0-23). |
| minute | integer | Yes | Birth minute (0-59). |
| city | string | No | Birth city. Optional when lat/lng are provided. |
| lat | float | No | Birth latitude. Recommended for production. |
| lng | float | No | Birth longitude. Recommended for production. |
| tz_str | string | No | Optional timezone override such as Asia/Kolkata, Europe/London, AUTO, or LMT. Defaults to AUTO when omitted. |
| ayanamsha | string | No | Vedic ayanamsha. Default is lahiri. |
| house_system | string | No | House system. Default is whole_sign. |
| node_type | string | No | Lunar node type: mean or true. |
| divisions | array[number] | Yes | Divisional charts to render into one image, for example [1] or [1, 9]. Supported values: 1, 2, 3, 7, 9, 10, 12, 30, 60. |
| chart_style | string | No | Visual layout: north_indian, south_indian, or east_indian. Defaults to north_indian. |
| format | string | No | Output image format: svg or png. Defaults to svg. |
| size | integer | No | Per-chart square size in pixels. Defaults to 700. |
| png_quality_scale | float | No | PNG conversion scale used by CairoSVG. Defaults to 2.0. |
| theme_type | string | No | Built-in visual theme: light, dark, or mono. Defaults to light. |
| body_types | array[string] | No | Body groups to render: ascendant, classical_grahas, nodes, and outer_planets. Defaults to ascendant, classical_grahas, and nodes. |
| custom_theme | object | No | Optional color overrides for background, panel_background, panel_border, grid, outer_line, sign_text, house_text, body_text, ascendant_text, brand_text, title_text, subtitle_text, and badge_background. |
| ascendant_text_color | string | No | Convenience color override for the Asc label text. Equivalent to custom_theme.ascendant_text. |
| display_settings | object | No | Visibility toggles for chart_only, titles, subtitles, division_badge, sign_labels, house_labels, ascendant, grahas, body_visuals, and individual bodies such as sun, moon, rahu, ketu, uranus, neptune, or pluto. |
| chart_config | object | No | Layout, typography, spacing, border, line, label, and panel overrides, including sign_label_mode, sign_label_position, sign_label_offsets, body_label_mode, body_visual_size, sign_font_size, body_font_size, body_font_weight, grid_line_width, outer_line_width, panel_padding, and columns. |
| chart_config.sign_label_mode | string | No | Sign label style. Use number_abbr for the default labels, number, abbr, astrofont, glyph, or astrofont_number. |
| chart_config.sign_label_position | string | No | Sign label placement. Use center for the default placement or corners to place North Indian sign glyphs near chart corners/intersections. |
| chart_config.sign_label_offsets | object | No | Per-sign manual label offsets in pixels, keyed by sign id or lowercase sign name, for example { aries: { x: -4, y: 3 } }. |
| chart_config.sign_glyph_scale | float | No | Scale applied to AstroFont sign glyph labels. Defaults to 0.72 for smaller, lighter corner signs. |
| chart_config.sign_glyph_weight | string | No | Font weight for AstroFont sign glyph labels. Defaults to 400. |
| chart_config.body_label_mode | string | No | Planet/body label style. Use abbr for text labels, glyph or astrofont for AstroFont body glyphs, or visual for detailed SVG planet markers with a small text label. |
| chart_config.body_visual_size | float | No | Manual diameter in pixels for body_label_mode visual markers. Use this to override the default marker size. |
| chart_config.body_visual_scale | float | No | Optional multiplier applied to the resolved body_visual_size. |
| custom_css | string | No | Optional CSS appended to the generated SVG style block. |
Ответ
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | header | n/a | image/svg+xml when format is svg, or image/png when format is png. |
| body | image bytes | n/a | Raw rendered image bytes. SVG responses include stable element ids and embedded metadata for downstream styling and testing. |
| Content-Disposition | header | n/a | Inline filename hint, vedic-chart.svg or vedic-chart.png. |
PNG Вариант запроса
{
"year": 1985,
"month": 8,
"day": 22,
"hour": 6,
"minute": 45,
"city": "Mumbai",
"lat": 19.076,
"lng": 72.8777,
"tz_str": "Asia/Kolkata",
"ayanamsha": "lahiri",
"house_system": "whole_sign",
"node_type": "mean",
"divisions": [
1,
9
],
"chart_style": "north_indian",
"format": "png",
"size": 700,
"theme_type": "light",
"body_types": [
"ascendant",
"classical_grahas",
"nodes",
"outer_planets"
],
"ascendant_text_color": "#0B7285",
"display_settings": {
"ascendant": true,
"rahu": true,
"ketu": true,
"uranus": true,
"neptune": true,
"pluto": true,
"sign_labels": true
},
"png_quality_scale": 2
}Пример настройки
Use display_settings.chart_only удалить заголовки/субтитры, custom_theme для цветов линий и меток, а также chart_config для размера этикетки и толщины линии.
{
"year": 1985,
"month": 8,
"day": 22,
"hour": 6,
"minute": 45,
"city": "Mumbai",
"lat": 19.076,
"lng": 72.8777,
"tz_str": "Asia/Kolkata",
"ayanamsha": "lahiri",
"house_system": "whole_sign",
"node_type": "mean",
"divisions": [
1
],
"chart_style": "north_indian",
"format": "svg",
"size": 700,
"theme_type": "light",
"body_types": [
"ascendant",
"classical_grahas",
"nodes",
"outer_planets"
],
"ascendant_text_color": "#0B7285",
"display_settings": {
"chart_only": true,
"sign_labels": true,
"house_labels": false,
"division_badge": false
},
"custom_theme": {
"background": "#FFFFFF",
"panel_background": "#FFF9F0",
"grid": "#B8791D",
"outer_line": "#7A1717",
"sign_text": "#7A1717",
"body_text": "#111111",
"ascendant_text": "#0B7285"
},
"chart_config": {
"sign_font_size": 26,
"body_font_size": 19,
"body_font_weight": "500",
"grid_line_width": 3,
"outer_line_width": 4,
"panel_padding": 18
}
}Группы тел
ascendantМетка Asc и расположение по восходящей.
classical_grahasСолнце через Сатурн.
nodesRahu и Ketu.
outer_planetsУран, Нептун и Плутон.
Поддерживаемые макеты
north_indianРомбовидная раскладка Fixed-house со знаками, вращающимися от Лагны.
south_indianFixed-sign Планировка по периметру 4x4 с домами, вращающимися от лагны.
east_indianFixed-sign квадратная/диагональная планировка с домами, вращающимися от лагны.