AI
Get Ask settings
What Ask g1t answers with in a workspace: provider_id, provider_name and provider (one of its AI providers), the model chosen, auto (each question goes to the provider's model that suits it), and problem, why Ask cannot answer, when it cannot.
GET
/workspaces/{workspace}/ai/askAsk runs on the workspace’s own key: g1t hosts no model and bills nothing for it. Members only.
auto is true when Ask picks one of the provider’s models for each question. problem says why Ask cannot answer, such as no provider chosen, and is null when it can. See Ask g1t.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
aiwithactionget_ask, and the same inputs - Scope: An access token needs
workspace:read.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
workspace |
string | Yes | The workspace’s slug, e.g. “flagon-io”. |
Example request
Section titled “Example request”curl https://api.g1t.sh/workspaces/flagon-io/ai/ask \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
{ "provider_id": "ai_01kpx4n8r3g9s0v5w7x1z2a3be", "provider_name": "Anthropic", "provider": "anthropic", "model": null, "auto": true, "problem": null}Errors
Section titled “Errors”A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated |
A token is required, or the one sent is not valid. |
| 403 | forbidden |
The token is valid but not allowed to do this, such as a member-only change, or a token without the scope it needs. |
| 404 | not_found |
It does not exist, or you cannot see it. |
| 422 | invalid |
The input is not valid. message says which field and why. |