ArchAstro.V1.Ai.Chat.Completions (archastro v0.2.0)

Copy Markdown

Completion API resource.

Summary

Functions

Create a chat completion

Functions

create(client, input)

Create a chat completion

Sends a list of messages to the configured AI provider and returns a single completion. Use this endpoint when you want direct, low-level access to the underlying model without any workflow or agent orchestration.

The authenticated app must have the llm_calls entitlement enabled on its plan. Requests that exceed the plan quota are rejected with 402. Token usage is recorded against the authenticated app and organization.

Supply tools and tool_choice to enable OpenAI-compatible function calling. Use server_tools to activate platform-managed tools such as search that run on the server side before the response is returned.

The completed AI response, including the generated message, finish reason, and token usage.