GO AI

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_TOKEN

A 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.

POST/functions/chatWithAI

Answer 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

FieldTypeNotes
messagesrequiredarrayThe conversation so far, oldest first. Each item is { role: "user" | "assistant", content: string }.
conversation_idstringContinue an existing thread — the rolling summary, memory and reference resolution carry over.
web_searchbooleanForce live web search on or off. Omit it and the router decides from the question.
reasoning_modestring"auto", "fast", "balanced" or "deep". Deep adds a reasoning pass and an independent review.
reasoningbooleanLegacy switch for the deep-reasoning pass.
attachmentsarrayUp to 5 file URLs. Images are read with vision; PDFs are read as text.
languagestringForce the reply language, as an ISO code (for example "ar").
language_namestringThe 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"
  }'
POST/functions/generateImage

Generate, 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

FieldTypeNotes
promptrequiredstringWhat to create, or what to look for when analysing.
modestring"generate" (default), "redesign" or "analyze".
source_image_urlstringThe image to redesign or analyse. Required in those two modes.
conversation_idstringAttach 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"
  }'
POST/functions/generateVideo

Generate 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

FieldTypeNotes
promptrequiredstringThe scene: subject, action, camera move and lighting.
durationnumber4, 6 or 8 seconds. Defaults to 6.
aspect_ratiostring"16:9" (default) or "9:16" for a vertical clip.
generate_audiobooleanInclude an audio track. Video costs more credits with audio on.
source_imagesarrayOptional stills to work from.
conversation_idstringAttach 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
  }'
POST/functions/generateSong

Write 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

FieldTypeNotes
promptrequiredstringWhat the song should be about.
lyricsstringSupply your own lyrics instead of letting them be written.
genrestringFor example "Pop", "Rock", "Arabic pop". Defaults to Pop.
moodstringFor example "Uplifting", "Melancholic". Defaults to Uplifting.
languagestringISO code for the vocals, or "auto" to detect.
language_namestringThe display name of that language.
conversation_idstringAttach 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"
  }'
POST/functions/webSearchLive

Look 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

FieldTypeNotes
queryrequiredstringThe question. Up to 2,000 characters.
language_namestringThe 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

CodeMeaning
200Success — the response body carries the payload listed for the endpoint.
400Invalid request — a required field is missing, empty or too long (validation_failed).
401auth_required — the request arrived without a signed-in account behind it.
429rate_limited or budget_exceeded — wait for the reset, or top up credits.
502A provider returned nothing usable — the same call can be retried.
500Unexpected 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 WhatsApp

For help with an account, plan or integration, the same line reaches the team that runs the platform.