Arcee Platform API (AFM API)

OpenAI-compatible inference API for Arcee's open-weight models. Provides chat completions (streaming, function calling, structured outputs, reasoning traces), a model catalog endpoint, and usage/credits reporting, plus the full Arcee Platform surface (chats, prompts, RAG over data groups, files, API key management, organizations, and billing). Secured with bearer API keys created in the Arcee Platform dashboard.

OpenAPI Specification

arcee-ai-afm-openapi.json Raw ↑
{"openapi":"3.1.0","info":{"title":"AFM API","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/app/v1/chat":{"post":{"tags":["Chat"],"summary":"Create Chat","description":"Create a new chat session.","operationId":"create_chat_app_v1_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/app/v1/chat/{id}":{"get":{"tags":["Chat"],"summary":"Get Chat","description":"Get a specific chat session by ID.","operationId":"get_chat_app_v1_chat__id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Chat"],"summary":"Update Chat","description":"Update a chat session.","operationId":"update_chat_app_v1_chat__id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Chat"],"summary":"Delete Chat","description":"Delete a chat session.","operationId":"delete_chat_app_v1_chat__id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/chats":{"get":{"tags":["Chat"],"summary":"Get User Chats","description":"Get paginated chat sessions for the current user.\nOptionally filter by search term in title.","operationId":"get_user_chats_app_v1_chats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/chat/{session_id}/history":{"get":{"tags":["Chat"],"summary":"Get Chat History","description":"Get conversation history for a chat session.","operationId":"get_chat_history_app_v1_chat__session_id__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/chat/{session_id}/messages":{"get":{"tags":["Chat"],"summary":"Get Session Messages","description":"Get messages for a specific chat session.","operationId":"get_session_messages_app_v1_chat__session_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageResponse"},"title":"Response Get Session Messages App V1 Chat  Session Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/chat/{session_id}/message/{message_id}/meta":{"patch":{"tags":["Chat"],"summary":"Update Message Meta","description":"Update the meta field of a message (merges with existing meta).\n\nThe session_id is required to verify user access and ensure the message\nbelongs to the specified session. Returns 404 if the session is not accessible\nor the message doesn't exist within that session.","operationId":"update_message_meta_app_v1_chat__session_id__message__message_id__meta_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageMetaUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/chat/{session_id}/message/{message_id}":{"delete":{"tags":["Chat"],"summary":"Delete Message","description":"Delete a user or assistant message and its corresponding pair.\n\nThis endpoint deletes the specified user or assistant message along with its paired\nmessage (the next assistant message if a user message is provided, or the previous user\nmessage if an assistant message is provided). Any file attachments stored in S3 are also deleted.\n\n- Only user and assistant messages can be deleted (not system messages)\n- The corresponding paired message is automatically deleted\n- S3 file attachments from both messages are cleaned up\n\nReturns the IDs of all deleted messages.","operationId":"delete_message_app_v1_chat__session_id__message__message_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/chat/flag-response":{"post":{"tags":["Chat"],"summary":"Flag Message","description":"Flag a message for review.\n\nThis endpoint allows users to flag a specific message within a chat session for review. The flagged message\nis associated with the user's organization and can be reviewed by administrators.\n\nReturns a success message upon successful flagging.","operationId":"flag_message_app_v1_chat_flag_response_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagResponseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/app/v1/prompts":{"post":{"tags":["Chat"],"summary":"Create Prompt","description":"Create a new prompt.","operationId":"create_prompt_app_v1_prompts_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Chat"],"summary":"Get User Prompts","description":"Get all prompts for the current user.","operationId":"get_user_prompts_app_v1_prompts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromptResponse"},"title":"Response Get User Prompts App V1 Prompts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/prompts/{prompt_id}":{"get":{"tags":["Chat"],"summary":"Get Prompt","description":"Get a specific prompt by ID.","operationId":"get_prompt_app_v1_prompts__prompt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Chat"],"summary":"Update Prompt","description":"Update an existing prompt.","operationId":"update_prompt_app_v1_prompts__prompt_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Chat"],"summary":"Delete Prompt","description":"Delete a prompt.","operationId":"delete_prompt_app_v1_prompts__prompt_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/prompts/set_active":{"post":{"tags":["Chat"],"summary":"Set Active Prompt","description":"Set a prompt as the active prompt for the user.","operationId":"set_active_prompt_app_v1_prompts_set_active_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptSetActiveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/app/v1/chat-models":{"get":{"tags":["Chat"],"summary":"Get Chat Models","description":"Get all models and tools for the chat interface.\nReturns models with their available tools and all available tools metadata.","operationId":"get_chat_models_app_v1_chat_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatModelsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/app/v1/completions/{session_id}/stream":{"post":{"tags":["Completions"],"summary":"Stream Message Completion","description":"Send a message and get a streaming completion response.","operationId":"stream_message_completion_app_v1_completions__session_id__stream_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/completions/create-chat":{"post":{"tags":["Completions"],"summary":"Create Chat With First Message","description":"Create new chat and stream first message response in one request.\nOptimized: streams immediately, saves to DB asynchronously at the end.","operationId":"create_chat_with_first_message_app_v1_completions_create_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatWithMessageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/app/v1/completions/{session_id}/regenerate":{"post":{"tags":["Completions"],"summary":"Regenerate Last Response","description":"Regenerate the last assistant response for a chat session.\n\nThis endpoint:\n1. Gets the last user message and its paired assistant response\n2. Deletes only the assistant message (preserving the user message and its files)\n3. Streams a new response using the same user message content and settings","operationId":"regenerate_last_response_app_v1_completions__session_id__regenerate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/completions/messages/{message_id}/stop":{"post":{"tags":["Completions"],"summary":"Stop Message Stream","description":"Signal the backend to stop an in-progress stream for the given assistant message.\nWorks across pods by setting a Valkey key that the streaming generator polls per chunk.","operationId":"stop_message_stream_app_v1_completions_messages__message_id__stop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/completions/generate-title":{"post":{"tags":["Completions"],"summary":"Generate Chat Title","description":"Generate a title for a chat session based on the initial message.","operationId":"generate_chat_title_app_v1_completions_generate_title_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTitleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTitleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/app/v1/demo/chat/create":{"post":{"tags":["Demo Mode"],"summary":"Demo Create Chat","description":"Create a new demo chat session and stream the first assistant response.\n\nNo per-session message-limit check here (unlike demo_stream_message)\nbecause this endpoint creates a brand-new session with zero messages.\nCross-session abuse (cookie clearing) is mitigated by Caddy's\nper-IP rate limiter at the infrastructure layer.","operationId":"demo_create_chat_app_v1_demo_chat_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoCreateChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/demo/chat/{session_id}/stream":{"post":{"tags":["Demo Mode"],"summary":"Demo Stream Message","description":"Send a message to an existing demo chat session and stream the response.","operationId":"demo_stream_message_app_v1_demo_chat__session_id__stream_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemoStreamMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/demo/chat/messages/{message_id}/stop":{"post":{"tags":["Demo Mode"],"summary":"Demo Stop Stream","description":"Stop an in-progress demo stream by setting the Valkey stop key.","operationId":"demo_stop_stream_app_v1_demo_chat_messages__message_id__stop_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/demo/chat/session":{"get":{"tags":["Demo Mode"],"summary":"Demo Get Session","description":"Get the current demo session with messages, identified by the signed cookie token.","operationId":"demo_get_session_app_v1_demo_chat_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/app/v1/demo/chat-models":{"get":{"tags":["Demo Mode"],"summary":"Demo Get Chat Models","description":"Get available models for demo mode (no auth required).","operationId":"demo_get_chat_models_app_v1_demo_chat_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatModelsResponse"}}}}}}},"/app/v1/dev-mode/chat/completions":{"post":{"tags":["Dev Mode"],"summary":"Dev Chat Completion","description":"Dev mode chat completion endpoint (user-auth, no API key).","operationId":"dev_chat_completion_app_v1_dev_mode_chat_completions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Existing dev session ID; creates new if omitted","title":"Session Id"},"description":"Existing dev session ID; creates new if omitted"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"},"402":{"description":"Insufficient credits"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/dev-mode/sessions":{"get":{"tags":["Dev Mode"],"summary":"Dev List Sessions","description":"List dev sessions for current user.","operationId":"dev_list_sessions_app_v1_dev_mode_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/dev-mode/sessions/{session_id}":{"get":{"tags":["Dev Mode"],"summary":"Dev Get Session","description":"Get dev session with messages.","operationId":"dev_get_session_app_v1_dev_mode_sessions__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Dev Mode"],"summary":"Dev Update Session Title","description":"Update dev session title.","operationId":"dev_update_session_title_app_v1_dev_mode_sessions__session_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevSessionUpdateTitle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Dev Mode"],"summary":"Dev Delete Session","description":"Delete dev session and its messages.","operationId":"dev_delete_session_app_v1_dev_mode_sessions__session_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/dev-mode/sessions/{session_id}/messages":{"get":{"tags":["Dev Mode"],"summary":"Dev List Messages","description":"List messages in a dev session.","operationId":"dev_list_messages_app_v1_dev_mode_sessions__session_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/rag":{"post":{"tags":["RAG"],"summary":"Rag","operationId":"rag_app_v1_rag_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/app/v1/data-groups":{"get":{"tags":["RAG"],"summary":"Get Data Group","operationId":"get_data_group_app_v1_data_groups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["RAG"],"summary":"Create Data Group","operationId":"create_data_group_app_v1_data_groups_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataGroupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/app/v1/data-groups/{group_id}":{"delete":{"tags":["RAG"],"summary":"Delete Data Group","operationId":"delete_data_group_app_v1_data_groups__group_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/data-groups/{data_group_id}/users":{"get":{"tags":["RAG"],"summary":"Get Data Group Users","operationId":"get_data_group_users_app_v1_data_groups__data_group_id__users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"data_group_id","in":"path","required":true,"schema":{"type":"string","title":"Data Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/data-groups/add-users":{"post":{"tags":["RAG"],"summary":"Add Users To Data Group","operationId":"add_users_to_data_group_app_v1_data_groups_add_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddUsersToGroupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/app/v1/data-groups/{data_group_id}/users/{user_org_profile_id}":{"delete":{"tags":["RAG"],"summary":"Remove User From Data Group","operationId":"remove_user_from_data_group_app_v1_data_groups__data_group_id__users__user_org_profile_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"data_group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Data Group Id"}},{"name":"user_org_profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Org Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/files/{data_group_id}":{"post":{"tags":["RAG"],"summary":"Upload Files","operationId":"upload_files_app_v1_files__data_group_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"data_group_id","in":"path","required":true,"schema":{"type":"string","title":"Data Group Id"}},{"name":"purpose","in":"query","required":false,"schema":{"type":"string","default":"user_data","title":"Purpose"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_files_app_v1_files__data_group_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["RAG"],"summary":"Get Files","operationId":"get_files_app_v1_files__data_group_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"data_group_id","in":"path","required":true,"schema":{"type":"string","title":"Data Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/files/{data_id}/{data_group_id}":{"delete":{"tags":["RAG"],"summary":"Delete Files","operationId":"delete_files_app_v1_files__data_id___data_group_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"data_id","in":"path","required":true,"schema":{"type":"string","title":"Data Id"}},{"name":"data_group_id","in":"path","required":true,"schema":{"type":"string","title":"Data Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/v1/top-k/{data_group_id}":{"get":{"tags":["RAG"],"summary":"Get Top K","description":"Get top-k results for a query using API key authentication","operationId":"get_top_k_app_v1_v1_top_k__data_group_id__get","parameters":[{"name":"data_group_id","in":"path","required":true,"schema":{"type":"string","title":"Data Group Id"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"The query to search for","title":"Query"},"description":"The query to search for"},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of top results to return","default":10,"title":"K"},"description":"Number of top results to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/signup":{"post":{"tags":["Auth"],"summary":"Signup","operationId":"signup_app_v1_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/login":{"post":{"tags":["Auth"],"summary":"Login","operationId":"login_app_v1_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/app/v1/refresh":{"post":{"tags":["Auth"],"summary":"Refresh Token","description":"Refresh the access token using either:\n1. Refresh token (if user selected \"stay signed in\")\n2. Current access token (for active users without refresh token)","operationId":"refresh_token_app_v1_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/app/v1/logout":{"post":{"tags":["Auth"],"summary":"Logout","description":"Logout the current user by clearing cookies and revoking refresh token","operationId":"logout_app_v1_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/app/v1/verify-email/{token}":{"get":{"tags":["Auth"],"summary":"Verify Email","description":"Verify email address using verification token and redir

# --- truncated at 32 KB (270 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/arcee-ai/refs/heads/main/openapi/arcee-ai-afm-openapi.json