Skip to content

TextCortex API guides

Build a knowledge agent on a multi-model API

Build a retrieval-based agent using TextCortex API access to multiple model families. Keep documents, permissions and tool execution in your application.

Build a knowledge agent on a multi-model API

The practical takeaway

Build on a multi-model API.

Use TextCortex as the model layer in your own agent architecture. Select a model for each request while your application controls retrieval, permissions and actions.

Define the agent boundary

An agent request needs instructions, relevant context and a clear set of permitted actions. Keep these inputs explicit in your application rather than expecting a raw model call to inherit workspace configuration.

Start with a read-only task such as answering a question from retrieved documents. This lets you evaluate source use before introducing tools that change external systems.

Connect retrieval to the model request

Retrieve authorized passages, attach stable source identifiers and include them with the user’s question. Keep the context within the limits of the selected model and your latency budget.

Send the request through TextCortex using the available model identifier. Use the same integration to compare proprietary and open-weight candidates on answer quality.

Execute tools through application controls

For a model route that supports tools, validate the proposed tool name and arguments against your application’s rules. Enforce permissions before execution and return the result to the model only when appropriate.

Use bounded steps and timeouts. Require review for consequential actions, and prevent a repeated model request from executing the same external action twice.

Route by agent step

A classification step and a complex synthesis step can use different models. Keep the mapping configurable and record which model produced each result.

Use the routing guide to organize this mapping. For EU workloads, constrain every agent step to the permitted deployments, including fallback paths.

Questions

Your next questions, answered.

Is TextCortex limited to open-source models?

No. The API provides access to proprietary model families such as GPT, Claude and Gemini alongside open-weight families such as Kimi, GLM, DeepSeek and MiMo. Use GET /models to list the identifiers available to your account.

Can I use an OpenAI-compatible client?

Yes. Configure the client with the TextCortex base URL and API key. Use a TextCortex model identifier and the parameters supported by that model. Model discovery, chat completions and responses are documented in the API reference.

How do I start using the API?

Sign up for TextCortex, create an API key in your account settings, and use https://api.textcortex.com/v1 as the base URL. Retrieve the model catalog, select a model identifier and send a chat-completion request.

TextCortex AI

One integration. Your choice of models.

Sign up for TextCortex, create an API key and start building with the models your application needs.

Sources and documentation

Product documentation and provider references used for this guide. Reviewed on 5 October 2026.