Skip to content

EcoLogitsGenAIExternalAPI

An external generative-AI API (OpenAI, Anthropic, Mistral...) modelled through the EcoLogits library. Picks a model and provider; EcoLogits supplies parameter counts, throughput, datacenter location, and grid carbon intensity.

Usage from Python

Pick EcoLogitsGenAIExternalAPI.provider and EcoLogitsGenAIExternalAPI.model_name from the EcoLogits catalog, then attach EcoLogitsGenAIExternalAPIJobs sized by output token count. EcoLogits queries are cached as calculated attributes so they fire only when the model changes.

Params

name

A human readable description of the object.

provider

Provider key from the EcoLogits catalog (anthropic, openai, mistralai...).

For example, anthropic.

model_name

Specific model name from the chosen provider's EcoLogits catalog. Drives parameter counts, throughput, and the datacenter location used for grid carbon intensity.

For example, claude-opus-4-5.

Calculated attributes

model_total_params

Total parameter count of the chosen model in billions, looked up in the EcoLogits model repository.

Example value: 670 billion

Depends directly on:

through the following calculations:

You can also visit the link to claude-opus-4-5 total parameter count (in billions)’s full calculation graph.

model_active_params

Active parameter count per inference step in billions (less than total for mixture-of-experts models), looked up in the EcoLogits model repository.

Example value: 134 billion

Depends directly on:

through the following calculations:

You can also visit the link to claude-opus-4-5 active parameter count (in billions)’s full calculation graph.

tokens_per_second

Average generation throughput of the model in tokens per second, looked up in the EcoLogits model repository. Empty if the model does not publish a value.

Example value: 34.1

Depends directly on:

through the following calculations:

You can also visit the link to claude-opus-4-5 token per second’s full calculation graph.

time_to_first_token

Time between sending the prompt and receiving the first generated token, looked up in the EcoLogits model repository. Empty if the model does not publish a value.

Example value: 1.59 s

Depends directly on:

through the following calculations:

You can also visit the link to claude-opus-4-5 time to first token’s full calculation graph.

datacenter_location

Geographic zone where the provider's datacenter runs, looked up in the EcoLogits provider config. Drives which electricity mix is applied.

Example value: USA

Depends directly on:

through the following calculations:

You can also visit the link to Datacenter location for anthropic’s full calculation graph.

data_center_pue

Power Usage Effectiveness of the provider's datacenter, looked up in the EcoLogits provider config.

Example value: 1.11

Depends directly on:

through the following calculations:

You can also visit the link to Datacenter PUE for anthropic’s full calculation graph.

average_carbon_intensity

Average grid carbon intensity at the datacenter location, looked up in the EcoLogits electricity mix repository.

Example value: 0.384 kg/kWh

Depends directly on:

through the following calculations:

You can also visit the link to Average carbon intensity of electricity mix for anthropic’s full calculation graph.