Skip to content
Last updated

Pending development This endpoint is under active development and not yet available in production. Response fields and availability may change.

GET /v1/organizations/{organization_id}/models - Retrieve all AI models available to a specific organization, including active models with their configurations, pricing, and capabilities.

Note: This endpoint is planned for an upcoming release. The API is not yet available.

Returns a list of active AI models available to the specified organization. Models are returned in display order and include information about capabilities, token limits, and cost.

Path Parameters

organization_id string required

The unique identifier of the organization. Find your organization ID in Freddy → Settings → Organization.

Features

  • Organization-Scoped - Only models available to your organization
  • Active Models Only - Returns only currently available models
  • Ordered Results - Models sorted by display order for UI consumption
  • UI Compatible - Formatted specifically for frontend applications
  • Complete Information - Provider, capabilities, token limits, and pricing

Security

  • Requires valid authentication (JWT token or API key)
  • User must be a member of the organization
  • Returns 403 if user doesn't have access to the organization

Response

Returns an OrganizationModelsResponse object.

organization_id string

The organization ID from the request path.

models array

Array of Organization Model objects representing available models.

total_count integer

Total number of models available to the organization.

Organization Model Object

id string - Internal model ID

title string - Human-readable model name displayed in UI

description string or null - Detailed description of model capabilities

key string - Internal model key for API requests (e.g., gpt-4o, claude-3-5-sonnet)

external string - External provider identifier

provider string - Model provider (openai, anthropic, aitronos, freddy)

is_active boolean - Whether the model is currently active

is_visible_in_ui boolean - Whether the model should be displayed in user interfaces

order integer - Display order for UI sorting (lower numbers appear first)

max_tokens integer or null - Maximum context window size in tokens

cost_per_1k_tokens number or null - Cost per 1,000 tokens (if available)

Display Order

Models are returned sorted by the order field (ascending), then alphabetically by title. This order is optimized for UI display:

  1. Lower order numbers = Higher priority/recommended models
  2. Equal order numbers = Sorted alphabetically
  3. Use the order as-is for consistent UI presentation across your application

Model Availability

  • Model availability can change based on organization tier
  • New models may be added without notice
  • is_active flag indicates current availability
  • is_visible_in_ui determines if model should be shown to users
  • Always check is_active before presenting models to users

Best Practices

  1. Cache the Response - Models don't change frequently, cache for at least 1 hour
  2. Respect the Order - Use the order field for consistent UI presentation
  3. Filter by Provider - Allow users to filter models by provider if needed
  4. Show Context Limits - Display max_tokens to help users choose appropriate models
  5. Handle Missing Data - max_tokens and cost_per_1k_tokens may be null
  6. Check isVisibleInUI - Only show models where is_visible_in_ui is true

Returns

Returns a JSON response indicating success or failure.

JavaScript
// Fetch models and build dropdown
async function loadModelSelector() {
  const apiKey = process.env.FREDDY_API_KEY;

const response = await fetch(
    `https://api.aitronos.com/v1/organizations/${orgId}/models`,
    { headers: { 'X-API-Key': apiKey } }
  );

  const data = await response.json();

  // Create dropdown options
  const select = document.getElementById("model-selector");
  data.models.forEach((model) => {
    const option = document.createElement("option");
    option.value = model.key;
    option.textContent = `${model.title} - ${model.provider}`;
    if (model.max_tokens) {
      option.textContent += ` (${model.max_tokens.toLocaleString()} tokens)`;
    }
    select.appendChild(option);
  });
}

This endpoint returns organization-scoped models. For global model information with full details, use the Models API.