Назад к документации

Ведическая визуальная карта

Ведическая визуальная карта

POST/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.

Северная Индия D1 + D9 Vedic visual chart SVG example
Северная Индия D1 + D9
north_indian

Ромбовидная раскладка Fixed-house со всеми включенными группами тел.

Южноиндийский D1 + D9 Vedic visual chart SVG example
Южноиндийский D1 + D9
south_indian

Планировка периметра Fixed-sign настроена для многолюдных домов.

Восточно-индийское моно D1 + D9 Vedic visual chart SVG example
Восточно-индийское моно D1 + D9
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
year
Type
integer
Required
Yes
Description
Birth year.
Field
month
Type
integer
Required
Yes
Description
Birth month (1-12).
Field
day
Type
integer
Required
Yes
Description
Birth day.
Field
hour
Type
integer
Required
Yes
Description
Birth hour (0-23).
Field
minute
Type
integer
Required
Yes
Description
Birth minute (0-59).
Field
city
Type
string
Required
No
Description
Birth city. Optional when lat/lng are provided.
Field
lat
Type
float
Required
No
Description
Birth latitude. Recommended for production.
Field
lng
Type
float
Required
No
Description
Birth longitude. Recommended for production.
Field
tz_str
Type
string
Required
No
Description
Optional timezone override such as Asia/Kolkata, Europe/London, AUTO, or LMT. Defaults to AUTO when omitted.
Field
ayanamsha
Type
string
Required
No
Description
Vedic ayanamsha. Default is lahiri.
Field
house_system
Type
string
Required
No
Description
House system. Default is whole_sign.
Field
node_type
Type
string
Required
No
Description
Lunar node type: mean or true.
Field
divisions
Type
array[number]
Required
Yes
Description
Divisional charts to render into one image, for example [1] or [1, 9]. Supported values: 1, 2, 3, 7, 9, 10, 12, 30, 60.
Field
chart_style
Type
string
Required
No
Description
Visual layout: north_indian, south_indian, or east_indian. Defaults to north_indian.
Field
format
Type
string
Required
No
Description
Output image format: svg or png. Defaults to svg.
Field
size
Type
integer
Required
No
Description
Per-chart square size in pixels. Defaults to 700.
Field
png_quality_scale
Type
float
Required
No
Description
PNG conversion scale used by CairoSVG. Defaults to 2.0.
Field
theme_type
Type
string
Required
No
Description
Built-in visual theme: light, dark, or mono. Defaults to light.
Field
body_types
Type
array[string]
Required
No
Description
Body groups to render: ascendant, classical_grahas, nodes, and outer_planets. Defaults to ascendant, classical_grahas, and nodes.
Field
custom_theme
Type
object
Required
No
Description
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.
Field
ascendant_text_color
Type
string
Required
No
Description
Convenience color override for the Asc label text. Equivalent to custom_theme.ascendant_text.
Field
display_settings
Type
object
Required
No
Description
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.
Field
chart_config
Type
object
Required
No
Description
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.
Field
chart_config.sign_label_mode
Type
string
Required
No
Description
Sign label style. Use number_abbr for the default labels, number, abbr, astrofont, glyph, or astrofont_number.
Field
chart_config.sign_label_position
Type
string
Required
No
Description
Sign label placement. Use center for the default placement or corners to place North Indian sign glyphs near chart corners/intersections.
Field
chart_config.sign_label_offsets
Type
object
Required
No
Description
Per-sign manual label offsets in pixels, keyed by sign id or lowercase sign name, for example { aries: { x: -4, y: 3 } }.
Field
chart_config.sign_glyph_scale
Type
float
Required
No
Description
Scale applied to AstroFont sign glyph labels. Defaults to 0.72 for smaller, lighter corner signs.
Field
chart_config.sign_glyph_weight
Type
string
Required
No
Description
Font weight for AstroFont sign glyph labels. Defaults to 400.
Field
chart_config.body_label_mode
Type
string
Required
No
Description
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.
Field
chart_config.body_visual_size
Type
float
Required
No
Description
Manual diameter in pixels for body_label_mode visual markers. Use this to override the default marker size.
Field
chart_config.body_visual_scale
Type
float
Required
No
Description
Optional multiplier applied to the resolved body_visual_size.
Field
custom_css
Type
string
Required
No
Description
Optional CSS appended to the generated SVG style block.

Ответ

Field
Content-Type
Type
header
Required
n/a
Description
image/svg+xml when format is svg, or image/png when format is png.
Field
body
Type
image bytes
Required
n/a
Description
Raw rendered image bytes. SVG responses include stable element ids and embedded metadata for downstream styling and testing.
Field
Content-Disposition
Type
header
Required
n/a
Description
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

Солнце через Сатурн.

nodes

Rahu и Ketu.

outer_planets

Уран, Нептун и Плутон.

Поддерживаемые макеты

north_indian

Ромбовидная раскладка Fixed-house со знаками, вращающимися от Лагны.

south_indian

Fixed-sign Планировка по периметру 4x4 с домами, вращающимися от лагны.

east_indian

Fixed-sign квадратная/диагональная планировка с домами, вращающимися от лагны.

Связанные документы