AI Providers

List the models this provider can run

Asks the provider which models it can run, using this provider record's own credentials and configuration, and returns provider-native model ids — the same strings default_model and an agent's model carry. Which models are reachable is a property of the credential, not of the provider type: a Vertex provider sees only the publisher models its Google Cloud project and location serve, and a Bedrock provider only the foundation models enabled in its region. Reading the list is how a caller avoids pinning a model that fails at generation time. Not every provider type can answer. azure lists deployments an operator named rather than models, and ollama lists whatever was pulled onto that host, so both return 400 MODEL_LISTING_UNSUPPORTED. Listing resolves credentials the same way generation does, so a record that can generate can list. The API-key types (openai, groq, xai, gateway, custom, anthropic, google) use the record's linked secret and cannot list without one. bedrock and vertex use the linked secret — IAM keys or a Bedrock API key, a Google service-account key. A record with no secret_id would fall back to the server's own credentials (the AWS default credential chain, Google Application Default Credentials); it can list only on a deployment that allows a record to use them, and returns 400 AI_PROVIDER_MISCONFIGURED otherwise. A Vertex record needs no config.project when its secret is a service-account key, since the key file names its own project. A Vertex record in express mode (API key) cannot list at all: the publisher-model listing rejects API keys and needs a credential that asserts a principal, so it returns 400 MODEL_LISTING_UNSUPPORTED. The Vertex answer is the publisher catalogue the record's config.location region serves. The project behind the credential is billed and quota'd for the call but does not filter the result, so a listed model may still be unavailable to that project at generation time. The provider answers its whole catalogue in one call; q, limit and offset narrow and page what it returned. A request without limit gets the first 50 models.

get/v1/projects/{project_id}/ai-providers/{ai_provider_id}/models

Request

  • Base URL: https://api.naturali.ai
  • URL: https://api.naturali.ai/v1/projects/{project_id}/ai-providers/{ai_provider_id}/models
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)

Path parameters

ai_provider_idstring required
Example:aip_V1StGXR8Z5jdHi6B

AI Provider ID

Query parameters

qstring
Example:sonnet

Keeps the models whose id or display_name contains this text, ignoring case. Applied before paging, so total counts the matches.

limitinteger

Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is 400.

offsetinteger

Results to skip. Negative or not an integer it is 400.

Response

The models this provider can run

totalinteger required

Models matching q across every page

limitinteger required
offsetinteger required

Example response

{
  "data": [
    {
      "id": "gemini-2.5-flash",
      "display_name": "Gemini 2.5 Flash",
      "vendor": "google",
      "input_modalities": [
        "text",
        "image"
      ],
      "output_modalities": [
        "text"
      ],
      "inference_types": [
        "on_demand",
        "inference_profile"
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.