# Quick Start

Five minutes from signup to a full natal chart in JSON.

<GetApiKeyBlock />

<Steps>

1. **Sign up at [astroway.info](https://api.astroway.info/dashboard/sign-up)**

   AstroWay API uses a shared account with the rest of the ecosystem. The free plan gives you 10,000 credits/month with no credit card.

2. **Create a key in the [dashboard](https://api.astroway.info/dashboard/keys)**

   Every key starts with `aw_live_` (production) or `aw_test_` (sandbox, doesn't consume credits). Copy the key immediately — it's shown in plain text only once.

   <Aside type="caution">
   The key is a secret. Never commit it to git, never put it in frontend code, never send via messengers. For frontend, use an intermediate backend or short-lived session tokens (Phase 3).
   </Aside>

3. **Make your first request**

   <Tabs>
     <TabItem label="cURL">
       ```bash frame="terminal" title="first-request.sh"
       curl -X POST https://api.astroway.info/v1/chart \
         -H "X-Api-Key: aw_live_your_key_here" \
         -H "Content-Type: application/json" \
         -d '{
           "date": "1990-07-14",
           "time": "14:30:00",
           "timezoneOffset": 3,
           "latitude": 50.4501,
           "longitude": 30.5234,
           "houseSystem": "P"
         }'
       ```
     </TabItem>
     <TabItem label="Node.js">
       ```ts title="first-request.ts"
       // native fetch — Node 18+ / Bun / Deno / browser. TS SDK in roadmap.
       const r = await fetch('https://api.astroway.info/v1/chart', {
         method: 'POST',
         headers: {
           'X-Api-Key': process.env.ASTROWAY_API_KEY!,
           'Content-Type': 'application/json',
         },
         body: JSON.stringify({
           date: '1990-07-14',
           time: '14:30:00',
           timezoneOffset: 3,
           latitude: 50.4501,
           longitude: 30.5234,
           houseSystem: 'P',
         }),
       });

       const { data: chart } = await r.json();
       console.log(chart.planets[0]);
       ```
     </TabItem>
     <TabItem label="Python">
       ```python title="first_request.py"
       # requests or httpx — SDK in roadmap.

       r = requests.post(
           'https://api.astroway.info/v1/chart',
           headers={'X-Api-Key': os.environ['ASTROWAY_API_KEY']},
           json={
               'date': '1990-07-14',
               'time': '14:30:00',
               'timezoneOffset': 3,
               'latitude': 50.4501,
               'longitude': 30.5234,
               'houseSystem': 'P',
           },
       )
       chart = r.json()['data']
       print(chart['planets'][0])
       ```
     </TabItem>
     <TabItem label="PHP">
       ```php title="first-request.php"
       <?php
       use GuzzleHttp\Client;

       $client = new Client(['base_uri' => 'https://api.astroway.info/v1/']);

       $response = $client->post('chart', [
           'headers' => [
               'X-Api-Key'    => getenv('ASTROWAY_API_KEY'),
               'Content-Type' => 'application/json',
           ],
           'json' => [
               'date' => '1990-07-14',
               'time' => '14:30:00',
               'timezoneOffset' => 3,
               'latitude' => 50.4501,
               'longitude' => 30.5234,
               'houseSystem' => 'P',
           ],
       ]);

       $chart = json_decode((string) $response->getBody(), true);
       print_r($chart['planets'][0]);
       ```
     </TabItem>
   </Tabs>

4. **Read the response**

   Response — full JSON with planet positions, house cusps, aspects, and metadata. Abbreviated example:

   ```json
   {
     "julianDay": 2448087.979166,
     "planets": [
       { "name": "Sun",  "longitude": 111.87, "sign": "cancer",  "house": 10 },
       { "name": "Moon", "longitude":  87.23, "sign": "gemini",  "house":  8 }
     ],
     "houses": {
       "system": "P",
       "cusps": [12.34, 43.21, 72.56, 100.12, ...],
       "ascendant": 12.34,
       "mc": 280.12
     },
     "aspects": [
       { "planet1": "Sun", "planet2": "Moon", "type": "sextile", "orb": 1.36, "applying": true }
     ]
   }
   ```

   Response headers:

   ```
   X-Credits-Used: 20
   X-Credits-Remaining: 4980
   X-Credits-Reset: 2026-05-01T00:00:00Z
   X-Request-Id: 01HXY2A7ZM...
   ```

5. **Check your balance**

   Dashboard shows real-time usage: [api.astroway.info/dashboard](https://api.astroway.info/dashboard).
   Or via API:

   ```bash
   curl https://api.astroway.info/v1/keys/usage \
     -H "X-Api-Key: aw_live_your_key_here"
   ```

</Steps>

## Next

- [Authentication](/en/authentication/) — best practices, key rotation, sandbox mode
- [Credits & Rate Limits](/en/rate-limits-credits/) — pricing table, rate limiting, overage
- [Example: Natal chart](/en/examples/natal/) — detailed `/v1/chart` walkthrough
- [Runnable integrations on GitHub](https://github.com/astroway/examples) — Discord/Slack bots, OpenAI tools, Cloudflare, FastAPI on the official SDKs
- [Full API reference](/docs/api/) — all {siteMeta.endpoints} endpoints with playground
