API Documentation
How an external service talks to GO AI's generation functions
Authentication
A personal access token, sent on every request
Requests authenticate with a personal access token, created on the API page of the app dashboard. Send it on every request:
Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKENA token is a credential with your account behind it — keep it on your server, never in a browser bundle or a mobile app. If you update an integration that used an older account key, replace that key with the token.
Session scope — read this before you build
These endpoints spend money, so they insist on an owner
Every generation endpoint bills a paid provider, and credits, per-account rate limits and the daily budget are all counted per account. Because of that, a call must reach the function with a signed-in account behind it. A request that arrives with a bare token and no account context is refused with 401 auth_required — deliberately, so a leaked token cannot spend credits with no one to bill.
In practice this means an external service either calls on behalf of the account it acts for, or the work runs server-side inside the app itself — a backend function or a scheduled task, where service access and the account's budget already apply. If your integration needs an unattended path of its own, ask us and we will scope an endpoint for it rather than hand out a way to spend credits without an owner.
Quick start
One POST, JSON in and JSON out
curl -X POST https://resourceful-omni-mind-pulse.base44.app/functions/chatWithAI \
-H "Authorization: Bearer $GO_AI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "Summarise the attached report in five bullets." }],
"attachments": ["https://your-host.example/report.pdf"],
"reasoning_mode": "balanced"
}'Every endpoint lives at the same base URL, and takes one JSON object in the body:
POST https://resourceful-omni-mind-pulse.base44.app/functions/<function-name>Endpoints
Five generation functions, each with the fields it accepts and the shape it answers with.
/functions/chatWithAIAnswer a question
Runs the full answer pipeline the chat uses: reasoning depth, a live web search when the question needs current facts, tables, diagrams and generated images, and the cited sources behind every live figure.
- The response can be long: it is the finished answer, already formatted for display.
- A question that needs live data comes back with used_realtime_data set and the sources listed.
Request body
| Field | Type | Notes |
|---|---|---|
| messagesrequired | array | The conversation so far, oldest first. Each item is { role: "user" | "assistant", content: string }. |
| conversation_id | string | Continue an existing thread — the rolling summary, memory and reference resolution carry over. |
| web_search | boolean | Force live web search on or off. Omit it and the router decides from the question. |
| reasoning_mode | string | "auto", "fast", "balanced" or "deep". Deep adds a reasoning pass and an independent review. |
| reasoning | boolean | Legacy switch for the deep-reasoning pass. |
| attachments | array | Up to 5 file URLs. Images are read with vision; PDFs are read as text. |
| language | string | Force the reply language, as an ISO code (for example "ar"). |
| language_name | string | The display name of that language, for example "Arabic". |
Response
{ "response": string, "conversation_id": string, "used_realtime_data": boolean, "sources": array }curl -X POST https://resourceful-omni-mind-pulse.base44.app/functions/chatWithAI \
-H "Authorization: Bearer $GO_AI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "Compare solar and nuclear power for the UAE." }],
"reasoning_mode": "deep"
}'/functions/generateImageGenerate, redesign or analyse an image
In generate mode it enriches the prompt and produces a new image. In redesign mode it reworks a source image. In analyze mode it reads a supplied image and returns a written analysis instead.
- Generate and redesign return the finished image URL; analyze returns text, never an image.
- The prompt you send is enriched before generation, so a short brief still produces a detailed result.
Request body
| Field | Type | Notes |
|---|---|---|
| promptrequired | string | What to create, or what to look for when analysing. |
| mode | string | "generate" (default), "redesign" or "analyze". |
| source_image_url | string | The image to redesign or analyse. Required in those two modes. |
| conversation_id | string | Attach the result to a chat thread. |
Response
generate / redesign: { "image_url": string, "enhanced_prompt": string } · analyze: { "analysis": string }curl -X POST https://resourceful-omni-mind-pulse.base44.app/functions/generateImage \
-H "Authorization: Bearer $GO_AI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Photorealistic photo of an Arabian horse galloping through desert sand at sunset, low angle.",
"mode": "generate"
}'/functions/generateVideoGenerate a short video
Produces a cinematic clip from a description of the scene and the camera movement. Audio can be requested or left off.
- Rendering takes 30 to 60 seconds, so allow a longer client timeout than for the other endpoints.
- The app renders video in the background; when you call this endpoint directly, the request stays open until the clip is ready.
Request body
| Field | Type | Notes |
|---|---|---|
| promptrequired | string | The scene: subject, action, camera move and lighting. |
| duration | number | 4, 6 or 8 seconds. Defaults to 6. |
| aspect_ratio | string | "16:9" (default) or "9:16" for a vertical clip. |
| generate_audio | boolean | Include an audio track. Video costs more credits with audio on. |
| source_images | array | Optional stills to work from. |
| conversation_id | string | Attach the result to a chat thread. |
Response
{ "video_url": string, "enhanced_prompt": string }curl -X POST https://resourceful-omni-mind-pulse.base44.app/functions/generateVideo \
-H "Authorization: Bearer $GO_AI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Slow aerial push over Dubai Marina at sunrise, glass towers in warm light, calm water.",
"duration": 6,
"aspect_ratio": "16:9",
"generate_audio": false
}'/functions/generateSongWrite and produce a song
Turns an idea into lyrics, sets the genre and mood, produces the audio, and saves it to the account library.
- Production takes longer than an image — allow the same patience as video.
Request body
| Field | Type | Notes |
|---|---|---|
| promptrequired | string | What the song should be about. |
| lyrics | string | Supply your own lyrics instead of letting them be written. |
| genre | string | For example "Pop", "Rock", "Arabic pop". Defaults to Pop. |
| mood | string | For example "Uplifting", "Melancholic". Defaults to Uplifting. |
| language | string | ISO code for the vocals, or "auto" to detect. |
| language_name | string | The display name of that language. |
| conversation_id | string | Attach the result to a chat thread. |
Response
{ "id": string, "title": string, "lyrics": string, "style_notes": string, "audio_url": string, "genre": string }curl -X POST https://resourceful-omni-mind-pulse.base44.app/functions/generateSong \
-H "Authorization: Bearer $GO_AI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "An upbeat Arabic pop song about a long drive from Dubai to Fujairah, with a warm oud intro.",
"genre": "Arabic pop",
"mood": "Uplifting",
"language": "ar"
}'/functions/webSearchLiveLook up something current
A fast, single-purpose lookup for anything time-sensitive — news, weather, prices, scores, schedules. Returns a short plain answer with no formatting, which makes it easy to read aloud.
- This is the endpoint behind live voice answers — it is optimised for speed rather than depth.
Request body
| Field | Type | Notes |
|---|---|---|
| queryrequired | string | The question. Up to 2,000 characters. |
| language_name | string | The language to answer in. Defaults to English. |
Response
{ "answer": string }curl -X POST https://resourceful-omni-mind-pulse.base44.app/functions/webSearchLive \
-H "Authorization: Bearer $GO_AI_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "query": "Gold price today in Dubai", "language_name": "English" }'Response codes
What to handle in your client
| Code | Meaning |
|---|---|
| 200 | Success — the response body carries the payload listed for the endpoint. |
| 400 | Invalid request — a required field is missing, empty or too long (validation_failed). |
| 401 | auth_required — the request arrived without a signed-in account behind it. |
| 429 | rate_limited or budget_exceeded — wait for the reset, or top up credits. |
| 502 | A provider returned nothing usable — the same call can be retried. |
| 500 | Unexpected failure. The error message is safe to show to a developer. |
On a 429 the body explains which limit was hit. A 401 is not a transient error — retrying it unchanged will never succeed. A 429 or a 5xx is worth a retry with a widening delay rather than a tight loop.
Limits you will meet
- Per-minute limits apply per account, separately for chat and for generation, and each function answers 429 with the reason when one is hit.
- A daily credit budget caps how much an account can spend in a day. Video is the expensive call — roughly 30 credits against 2 for an image and 1 for a written answer.
- Long calls need patience: video and song production take 30 to 60 seconds, so set your client's timeout well above the default.
- Batching is your friend: one request that answers five questions is cheaper and faster than five requests, and it stays inside the rate limit.
Contact
GO AI is the AI platform developed by Dr. Khalaf Al Otaiba. For any inquiry, WhatsApp +971 54 411 9999.
Message on WhatsAppFor help with an account, plan or integration, the same line reaches the team that runs the platform.