# Schemas

## The APIChatMessage object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"APIChatMessage":{"additionalProperties":true,"properties":{"content":{"description":"The text content of this message.","title":"Content","type":"string"},"images":{"default":[],"description":"List of images for this message (potentially of length zero). May be exposed either as a base64 string or as stringified Plotly JSON, typically if the user requested it as such.","items":{"anyOf":[{"type":"string"},{"type":"object"}]},"title":"Images","type":"array"},"role":{"$ref":"#/components/schemas/RolesEnum","description":"The role of this message. User indicates the user sent the message, assistant indicates the assistant sent the message."},"table":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"description":"If there exists a table for this message, this will be set to a list of objects/records, where each record has a key of the column name and a value for that row's corresponding value for the column.","title":"Table"}},"required":["role","content"],"title":"APIChatMessage","type":"object"},"RolesEnum":{"enum":["user","assistant"],"title":"RolesEnum","type":"string"}}}}
```

## The APIStatusMetadataFailed object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"APIStatusMetadataFailed":{"additionalProperties":true,"properties":{"error":{"default":"Unable to complete request. Please verify your inputs, try again later, or get in touch at support@akkio.com.","description":"If provided, a text representation of what went wrong with the task, including if any action on your part may rectify the issue.","title":"Error","type":"string"},"type":{"const":"FAILED","default":"FAILED","enum":["FAILED"],"title":"Type","type":"string"}},"title":"APIStatusMetadataFailed","type":"object"}}}}
```

## The APIStatusMetadataInProgress object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"APIStatusMetadataInProgress":{"additionalProperties":true,"properties":{"estimate_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"If provided, an estimate of how many seconds we expect this task to take. This value should be treated as a rough estimate on a best-effort basis, not a guarantee.","title":"Estimate Seconds"},"type":{"const":"IN_PROGRESS","default":"IN_PROGRESS","enum":["IN_PROGRESS"],"title":"Type","type":"string"}},"title":"APIStatusMetadataInProgress","type":"object"}}}}
```

## The APIStatusMetadataPending object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"APIStatusMetadataPending":{"additionalProperties":true,"properties":{"type":{"const":"PENDING","default":"PENDING","enum":["PENDING"],"title":"Type","type":"string"}},"title":"APIStatusMetadataPending","type":"object"}}}}
```

## The APIStatusMetadataSucceeded object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"APIStatusMetadataSucceeded":{"additionalProperties":true,"properties":{"location":{"description":"The path at which you can submit a GET request to retrieve the result of the successful job. May require proper authentication or authorization to access.","title":"Location","type":"string"},"type":{"const":"SUCCEEDED","default":"SUCCEEDED","enum":["SUCCEEDED"],"title":"Type","type":"string"}},"required":["location"],"title":"APIStatusMetadataSucceeded","type":"object"}}}}
```

## The APIStatusResponse object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"APIStatusResponse":{"additionalProperties":true,"properties":{"metadata":{"description":"Metadata, contextually dependent on the status of the task being queried.","discriminator":{"mapping":{"FAILED":"#/components/schemas/APIStatusMetadataFailed","IN_PROGRESS":"#/components/schemas/APIStatusMetadataInProgress","PENDING":"#/components/schemas/APIStatusMetadataPending","SUCCEEDED":"#/components/schemas/APIStatusMetadataSucceeded"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/APIStatusMetadataPending"},{"$ref":"#/components/schemas/APIStatusMetadataInProgress"},{"$ref":"#/components/schemas/APIStatusMetadataSucceeded"},{"$ref":"#/components/schemas/APIStatusMetadataFailed"}],"title":"Metadata"},"status":{"$ref":"#/components/schemas/TaskStatusEnum","description":"The current status of the task being queried."}},"required":["status","metadata"],"title":"APIStatusResponse","type":"object"},"APIStatusMetadataPending":{"additionalProperties":true,"properties":{"type":{"const":"PENDING","default":"PENDING","enum":["PENDING"],"title":"Type","type":"string"}},"title":"APIStatusMetadataPending","type":"object"},"APIStatusMetadataInProgress":{"additionalProperties":true,"properties":{"estimate_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"If provided, an estimate of how many seconds we expect this task to take. This value should be treated as a rough estimate on a best-effort basis, not a guarantee.","title":"Estimate Seconds"},"type":{"const":"IN_PROGRESS","default":"IN_PROGRESS","enum":["IN_PROGRESS"],"title":"Type","type":"string"}},"title":"APIStatusMetadataInProgress","type":"object"},"APIStatusMetadataSucceeded":{"additionalProperties":true,"properties":{"location":{"description":"The path at which you can submit a GET request to retrieve the result of the successful job. May require proper authentication or authorization to access.","title":"Location","type":"string"},"type":{"const":"SUCCEEDED","default":"SUCCEEDED","enum":["SUCCEEDED"],"title":"Type","type":"string"}},"required":["location"],"title":"APIStatusMetadataSucceeded","type":"object"},"APIStatusMetadataFailed":{"additionalProperties":true,"properties":{"error":{"default":"Unable to complete request. Please verify your inputs, try again later, or get in touch at support@akkio.com.","description":"If provided, a text representation of what went wrong with the task, including if any action on your part may rectify the issue.","title":"Error","type":"string"},"type":{"const":"FAILED","default":"FAILED","enum":["FAILED"],"title":"Type","type":"string"}},"title":"APIStatusMetadataFailed","type":"object"},"TaskStatusEnum":{"description":"Celery task status enum. Update apps/web-backend-api/src/types/TaskStatusEnum.ts if you update this enum.","enum":["PENDING","IN_PROGRESS","SUCCEEDED","FAILED","UNKNOWN_TIMEOUT"],"title":"TaskStatusEnum","type":"string"}}}}
```

## The APITaskStartedResponse object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"APITaskStartedResponse":{"additionalProperties":true,"properties":{"task_id":{"description":"The ID of the task that was started. This is generally queryable at a nearby `/status` endpoint to get the current status of the task.","title":"Task Id","type":"string"}},"required":["task_id"],"title":"APITaskStartedResponse","type":"object"}}}}
```

## The ChatExploreImageFormat object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"ChatExploreImageFormat":{"enum":["base64_png","plotly_json"],"title":"ChatExploreImageFormat","type":"string"}}}}
```

## The ChatExploreRequestPayload object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"ChatExploreRequestPayload":{"additionalProperties":true,"properties":{"chatContext":{"default":"","description":"Anything you'd like Chat Explore to know about this application to provide better responses. For example: (1) This dataset is customer engagement data, (2) The units of the sales column are in millions, (3) The data is messy and contains typos","title":"Chatcontext","type":"string"},"chatInstructions":{"default":"","title":"Chatinstructions","type":"string"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The dataset ID which you want to run a Chat Explore query against. Either this or project_id must be specified.","title":"Dataset Id"},"messages":{"description":"A list of messages to query Chat Explore with.","items":{"$ref":"#/components/schemas/APIChatMessage"},"title":"Messages","type":"array"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The project ID which you want to run a Chat Explore query against. Either this or dataset_id must be specified; if this is specified, custom instructions attached to the project will be provided as context to the query.","title":"Project Id"}},"required":["messages"],"title":"ChatExploreRequestPayload","type":"object"},"APIChatMessage":{"additionalProperties":true,"properties":{"content":{"description":"The text content of this message.","title":"Content","type":"string"},"images":{"default":[],"description":"List of images for this message (potentially of length zero). May be exposed either as a base64 string or as stringified Plotly JSON, typically if the user requested it as such.","items":{"anyOf":[{"type":"string"},{"type":"object"}]},"title":"Images","type":"array"},"role":{"$ref":"#/components/schemas/RolesEnum","description":"The role of this message. User indicates the user sent the message, assistant indicates the assistant sent the message."},"table":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"description":"If there exists a table for this message, this will be set to a list of objects/records, where each record has a key of the column name and a value for that row's corresponding value for the column.","title":"Table"}},"required":["role","content"],"title":"APIChatMessage","type":"object"},"RolesEnum":{"enum":["user","assistant"],"title":"RolesEnum","type":"string"}}}}
```

## The CreateProjectPayload object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"CreateProjectPayload":{"additionalProperties":true,"properties":{"_org":{"description":"Foreign key to the organization this object belongs to.","title":" Org","type":"string"},"_owner":{"description":"Foreign key to the user this object belongs to.","title":" Owner","type":"string"},"chatContext":{"default":"","description":"\nWhat would you like Chat Explore to know about this application to provide better responses? For example:\n- This dataset is customer engagement data\n- The units of the sales column are in millions\n- The data is messy and contains typos\n","title":"Chatcontext","type":"string"},"chatInstructions":{"default":"","description":"\nHow would you like Chat Explore to respond? For example:\n- Respond only in spanish\n- Provide short and concise answers only\n- Make sure to always include a chart","title":"Chatinstructions","type":"string"},"chatSuggestions":{"default":"","description":"\nCustomize the default chat suggestions by writing a list of suggestions separated by newlines. For example:\n- What is the average net media cost by campaign ID?\n- Make sure to always include a chart\n","title":"Chatsuggestions","type":"string"},"name":{"description":"The name of the flow.","title":"Name","type":"string"}},"required":["_owner","_org","name"],"title":"CreateProjectPayload","type":"object"}}}}
```

## The GetProjectResponse object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"GetProjectResponse":{"additionalProperties":true,"properties":{"chatContext":{"default":"","description":"\nWhat would you like Chat Explore to know about this application to provide better responses? For example:\n- This dataset is customer engagement data\n- The units of the sales column are in millions\n- The data is messy and contains typos\n","title":"Chatcontext","type":"string"},"chatInstructions":{"default":"","description":"\nHow would you like Chat Explore to respond? For example:\n- Respond only in spanish\n- Provide short and concise answers only\n- Make sure to always include a chart","title":"Chatinstructions","type":"string"},"chatSuggestions":{"default":"","description":"\nCustomize the default chat suggestions by writing a list of suggestions separated by newlines. For example:\n- What is the average net media cost by campaign ID?\n- Make sure to always include a chart\n","title":"Chatsuggestions","type":"string"},"id":{"description":"The ID of this object.","title":"Id","type":"string"},"name":{"default":"","description":"The name of the flow.","title":"Name","type":"string"}},"required":["id"],"title":"GetProjectResponse","type":"object"}}}}
```

## The HTTPValidationError object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```

## The RolesEnum object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"RolesEnum":{"enum":["user","assistant"],"title":"RolesEnum","type":"string"}}}}
```

## The TaskStatusEnum object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"TaskStatusEnum":{"description":"Celery task status enum. Update apps/web-backend-api/src/types/TaskStatusEnum.ts if you update this enum.","enum":["PENDING","IN_PROGRESS","SUCCEEDED","FAILED","UNKNOWN_TIMEOUT"],"title":"TaskStatusEnum","type":"string"}}}}
```

## The TrainRequestPayload object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"TrainRequestPayload":{"additionalProperties":true,"properties":{"dataset_id":{"description":"The ID of the dataset to train the model on.","title":"Dataset Id","type":"string"},"duration":{"description":"Integer corresponding to how much time we should spend on training. Higher values will take longer but generally be more accurate. Allowed values: 10 (Fastest), 60 (High Quality), 300 (Higher Quality), 1800 (Production)","title":"Duration","type":"integer"},"extra_attention":{"default":false,"description":"Helps with predicting rare cases.","title":"Extra Attention","type":"boolean"},"force":{"default":false,"description":"Forces the creation of a new model even if another currently exists.","title":"Force","type":"boolean"},"ignore_fields":{"default":[],"description":"An array of field names to ignore (case sensitive).","items":{"type":"string"},"title":"Ignore Fields","type":"array"},"predict_fields":{"description":"An array of field names to predict (case sensitive).","items":{"type":"string"},"title":"Predict Fields","type":"array"}},"required":["dataset_id","predict_fields","duration"],"title":"TrainRequestPayload","type":"object"}}}}
```

## The UpdateProjectPayload object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"UpdateProjectPayload":{"additionalProperties":true,"properties":{"chatContext":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"\nWhat would you like Chat Explore to know about this application to provide better responses? For example:\n- This dataset is customer engagement data\n- The units of the sales column are in millions\n- The data is messy and contains typos\n","title":"Chatcontext"},"chatInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"\nHow would you like Chat Explore to respond? For example:\n- Respond only in spanish\n- Provide short and concise answers only\n- Make sure to always include a chart","title":"Chatinstructions"},"chatSuggestions":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"\nCustomize the default chat suggestions by writing a list of suggestions separated by newlines. For example:\n- What is the average net media cost by campaign ID?\n- Make sure to always include a chart\n","title":"Chatsuggestions"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the flow.","title":"Name"}},"title":"UpdateProjectPayload","type":"object"}}}}
```

## The ValidationError object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```

## The \_ApiBaseChatRecord object

```json
{"openapi":"3.1.0","info":{"title":"Akkio Public API (Beta)","version":"0.1.0"},"components":{"schemas":{"_ApiBaseChatRecord":{"additionalProperties":true,"properties":{"_org":{"description":"Foreign key to the organization this object belongs to.","title":" Org","type":"string"},"_owner":{"description":"Foreign key to the user this object belongs to.","title":" Owner","type":"string"},"messages":{"description":"List of messages in the chat.","items":{"$ref":"#/components/schemas/APIChatMessage"},"title":"Messages","type":"array"}},"required":["_owner","_org","messages"],"title":"_ApiBaseChatRecord","type":"object"},"APIChatMessage":{"additionalProperties":true,"properties":{"content":{"description":"The text content of this message.","title":"Content","type":"string"},"images":{"default":[],"description":"List of images for this message (potentially of length zero). May be exposed either as a base64 string or as stringified Plotly JSON, typically if the user requested it as such.","items":{"anyOf":[{"type":"string"},{"type":"object"}]},"title":"Images","type":"array"},"role":{"$ref":"#/components/schemas/RolesEnum","description":"The role of this message. User indicates the user sent the message, assistant indicates the assistant sent the message."},"table":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"description":"If there exists a table for this message, this will be set to a list of objects/records, where each record has a key of the column name and a value for that row's corresponding value for the column.","title":"Table"}},"required":["role","content"],"title":"APIChatMessage","type":"object"},"RolesEnum":{"enum":["user","assistant"],"title":"RolesEnum","type":"string"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akkio.com/akkio-docs/endpoints-and-schemas/schemas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
