GRGlobalRouter Docs
Console

Chat / Text / POST

Create message

Create an OpenRouter-style message response.

endpoint list

Mobile view shows the endpoint list. Use desktop view for parameters and examples.

MethodEndpointDescription
POST/api/v1/chat/completionsCreate an OpenRouter-style chat completion.
POST/api/v1/responsesCreate an OpenRouter-style response.
POST/api/v1/messagesCreate an OpenRouter-style message response.
POST/api/v1/embeddingsCreate OpenRouter text embeddings.
POST/api/v1/messages

For multi-turn context in a messages array, with text generation through upstream OpenRouter.

Back to Chat / Text endpoint list

Request parameters

FieldTypeRequiredDescription
modelOpenRouterPublicModelIdYesGR public model ids used in request bodies.
messagesChatMessage[]YesSee the OpenAPI schema for field details.
messages[].rolestringYesAllowed values: system, user, assistant, tool.
messages[].contentstring | object[]YesSee the OpenAPI schema for field details.
providerstring | OpenRouterProviderRoutingNoSee the OpenAPI schema for field details.
max_tokensintegerNoSee the OpenAPI schema for field details.

Response fields

FieldTypeRequiredDescription
bodyobjectNoObject fields are passed through according to the current OpenRouter or GR endpoint implementation.

Errors

401UNAUTHORIZED

Missing or invalid Authorization Bearer token.

403FORBIDDEN

The current API key is not authorized for this scope, model, or management capability.

422VALIDATION_ERROR

The request body, path parameters, or query parameters do not match the endpoint schema.

Notes

  • Use a GlobalRouter API key; upstream OpenRouter API keys are never exposed to tenants.