Saltar al contenido
Documentación de la API

Introducción

Envíe su primera solicitud a la API de Astro Sabio: URL base, formato de solicitud y respuesta de ejemplo.

The API is a resource-oriented REST interface. All requests go over HTTPS, bodies and responses are JSON, and every request is signed with an API key.

Temel adres https://www.astrosabio.com/api/v1
Content type application/json; charset=utf-8

Comienza en cuatro pasos

  1. Crea una cuenta Create your API customer account in the API panel at www.astrosabio.com/api-panel.
  2. Genera una clave API After choosing a plan or an endpoint package, generate your key in the panel and store it somewhere safe.
  3. Envía tu primera solicitud Verify your connection with the /ping endpoint, which costs no credits.
  4. Pasa a producción Pick the plan or endpoint package that fits your needs and review your rate limits.

Solicitud de ejemplo

Paid endpoints are called with POST and expect birth data in the body. Time zones must be given in IANA format.

curl -X POST https://www.astrosabio.com/api/v1/chart/natal \
  -H "Authorization: Bearer ab_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "date": "1990-04-12",
    "time": "08:35",
    "lat": 41.0082,
    "lng": 28.9784,
    "timezone": "Europe/Istanbul"
  }'

Respuesta de ejemplo

Successful responses contain success, data and meta fields. The meta block reports the request id (request_id), the credits charged, and your remaining credits/quota.

{
  "success": true,
  "data": {
    "chart_type": "natal",
    "chart_key": "natal",
    "title": "Doğum Haritası (Natal)",
    "png_data_uri": "data:image/png;base64,iVBORw0KGgo..."
  },
  "meta": { "request_id": "5a1f2b3c-...", "credits_charged": 1, "credits_remaining": 97, "quota_remaining": 1000 }
}

Nota: las cartas dibujables como chart.natal devuelven un PNG con la marca de agua "www.astrosabio.com" en la esquina inferior derecha. El campo png_data_uri puede usarse directamente dentro de una etiqueta <img src>.

This is abbreviated — see the full real response on the Endpoint Reference page →