Quickstart
Use this guide to install an SDK, send your first request, and inspect the result in a few minutes.
Before You Begin
Section titled “Before You Begin”You will need:
- an API key stored in
ABSTIME_API_KEY - a Python or Node.js environment that can call the AbsTime API
For production use, keep your API key on the server side. Do not expose private credentials in browser code.
1. Create an API key
Section titled “1. Create an API key”Create an account or sign in in the Console.
Generate an API key in the console, then store it in an environment variable named ABSTIME_API_KEY.
export ABSTIME_API_KEY="your_api_key_here"$env:ABSTIME_API_KEY="your_api_key_here"2. Install the SDK
Section titled “2. Install the SDK”For the main integration path, install the official SDK for your language before copying the first request example.
pip install abstimePython SDK requirements: Python 3.9+
npm install @abstime/sdkNode.js SDK requirements: Node.js 18+
3. Send your first request
Section titled “3. Send your first request”For most teams, the fastest way to start is with an official SDK.
These examples send a natural-language time expression, an explicit reference time, and a target timezone.
import os
from abstime import AbsTime
client = AbsTime(api_key=os.environ["ABSTIME_API_KEY"])
result = client.resolve( text="the last Friday of this month at 2 pm", ref_time="2026-04-09T17:30:00Z", ref_timezone="America/Los_Angeles",)
print(result.time)print(result.view)import { AbsTime } from "@abstime/sdk";
const client = new AbsTime({ apiKey: process.env.ABSTIME_API_KEY });
const result = await client.resolve({ text: "the last Friday of this month at 2 pm", refTime: "2026-04-09T17:30:00Z", refTimezone: "America/Los_Angeles",});
console.log(result.time);console.log(result.view);curl --request POST "https://api.abstime.ai/v1/resolve" \ --header "Authorization: Bearer $ABSTIME_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "text": "the last Friday of this month at 2 pm", "ref_time": "2026-04-09T17:30:00Z", "ref_timezone": "America/Los_Angeles" }'Use cURL when you want to test the raw API contract directly without an SDK.
Example request body
Section titled “Example request body”| Field | Type | Description |
|---|---|---|
text | string | The extracted natural-language time expression to resolve. |
ref_time | string | An RFC3339 UTC anchor used to interpret relative phrases. |
ref_timezone | string | The IANA timezone that should be used during resolution. |
4. Inspect the response
Section titled “4. Inspect the response”A successful response returns a normalized representation of the resolved time.
{ "status": "resolved", "time": "2026-04-24T21:00:00Z", "view": "Apr 24, 2026 2 PM", "confidence": "C0", "context": { "text": "the last Friday of this month at 2 pm", "ref_time": "2026-04-09T17:30:00Z", "ref_timezone": "America/Los_Angeles" }}Example response fields
Section titled “Example response fields”| Field | Meaning |
|---|---|
status | The top-level result state, such as resolved. |
time | The final resolved datetime in ISO 8601 UTC format. |
view | A human-readable display string derived from the result. |
confidence | The interpretation confidence level returned by the API. |
context | The normalized request context used during resolution. |
5. Run the request in your preferred language
Section titled “5. Run the request in your preferred language”Use the language tabs above to switch between Python, JavaScript, and cURL while keeping the same request contract in view.
6. Recommended integration pattern
Section titled “6. Recommended integration pattern”For most teams, the first integration looks like this:
- collect or extract a time expression from the user or workflow
- send the expression to AbsTime from your backend using an official SDK
- store the returned normalized datetime
- pass the resolved value to the rest of your application
If you are building AI features, let the model identify the phrase and let the SDK send the final resolution request to AbsTime.
7. Common mistakes
Section titled “7. Common mistakes”- sending requests directly from untrusted client-side code
- sending full user sentences instead of extracted time expressions
- copying SDK examples before installing the package
- omitting
ref_timefor relative phrases such astomorrow morning - relying on server local time instead of passing an explicit
ref_timezone - treating
viewas a storage value instead of usingtime
8. What to read next
Section titled “8. What to read next”9. Next steps for production
Section titled “9. Next steps for production”Once your first request works, the next production tasks are:
- standardize on the Python or Node.js SDK across your services
- define how your application handles ambiguous or partial inputs
- add test cases for timezone boundaries and daylight saving transitions
- standardize how
ref_timeis supplied across services
This quickstart is the shortest path from zero to a working AbsTime request.