- OpenAI-compatible API — using
logprobsandtop_logprobsparameters - DeepInfra Native API — streaming and non-streaming
OpenAI-compatible API
Setlogprobs: true in your request. Optionally set top_logprobs (1–20) to also get the top alternative tokens at each position.
DeepInfra Native API (streaming)
The native streaming API returns log probabilities inline with each token as it is generated.logprob field is the log probability of the generated token (base e). Lower (more negative) values indicate less likely tokens.