For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://modelgates.ai/docs/_mcp/server.
Get stored prompt and completion content for a generation
GET https://modelgates.ai/api/v1/generation/content
Reference: https://modelgates.ai/docs/api/api-reference/generations/list-generation-content
OpenAPI Specification
yaml
openapi: 3.1.0info: title: ModelGates API version: 1.0.0paths: /generation/content: get: operationId: list-generation-content summary: Get stored prompt and completion content for a generation tags: - subpackage_generations parameters: - name: id in: query description: The generation ID required: true schema: type: string - name: Authorization in: header description: API key as bearer token in Authorization header required: true schema: type: string responses: '200': description: Returns the stored prompt and completion content content: application/json: schema: $ref: '#/components/schemas/GenerationContentResponse' '401': description: Unauthorized - Authentication required or invalid credentials content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' '403': description: Forbidden - Authentication successful but insufficient permissions content: application/json: schema: $ref: '#/components/schemas/ForbiddenResponse' '404': description: Not Found - Resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' '429': description: Too Many Requests - Rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/TooManyRequestsResponse' '500': description: Internal Server Error - Unexpected server error content: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' '502': description: Bad Gateway - Provider/upstream API failure content: application/json: schema: $ref: '#/components/schemas/BadGatewayResponse'servers: - url: https://modelgates.ai/api/v1components: schemas: GenerationContentDataInput0: type: object properties: prompt: type: string required: - prompt title: GenerationContentDataInput0 GenerationContentDataInput1: type: object properties: messages: type: array items: description: Any type required: - messages title: GenerationContentDataInput1 GenerationContentDataInput: oneOf: - $ref: '#/components/schemas/GenerationContentDataInput0' - $ref: '#/components/schemas/GenerationContentDataInput1' description: >- The input to the generation — either a prompt string or an array of messages title: GenerationContentDataInput GenerationContentDataOutput: type: object properties: completion: type: - string - 'null' description: The completion output reasoning: type: - string - 'null' description: Reasoning/thinking output, if any required: - completion - reasoning description: The output from the generation title: GenerationContentDataOutput GenerationContentData: type: object properties: input: $ref: '#/components/schemas/GenerationContentDataInput' description: >- The input to the generation — either a prompt string or an array of messages output: $ref: '#/components/schemas/GenerationContentDataOutput' description: The output from the generation required: - input - output description: Stored prompt and completion content title: GenerationContentData GenerationContentResponse: type: object properties: data: $ref: '#/components/schemas/GenerationContentData' required: - data description: Stored prompt and completion content for a generation title: GenerationContentResponse UnauthorizedResponseErrorData: type: object properties: code: type: integer message: type: string metadata: type: - object - 'null' additionalProperties: description: Any type required: - code - message description: Error data for UnauthorizedResponse title: UnauthorizedResponseErrorData UnauthorizedResponse: type: object properties: error: $ref: '#/components/schemas/UnauthorizedResponseErrorData' modelgates_metadata: type: - object - 'null' additionalProperties: description: Any type user_id: type: - string - 'null' required: - error description: Unauthorized - Authentication required or invalid credentials title: UnauthorizedResponse ForbiddenResponseErrorData: type: object properties: code: type: integer message: type: string metadata: type: - object - 'null' additionalProperties: description: Any type required: - code - message description: Error data for ForbiddenResponse title: ForbiddenResponseErrorData ForbiddenResponse: type: object properties: error: $ref: '#/components/schemas/ForbiddenResponseErrorData' modelgates_metadata: type: - object - 'null' additionalProperties: description: Any type user_id: type: - string - 'null' required: - error description: Forbidden - Authentication successful but insufficient permissions title: ForbiddenResponse NotFoundResponseErrorData: type: object properties: code: type: integer message: type: string metadata: type: - object - 'null' additionalProperties: description: Any type required: - code - message description: Error data for NotFoundResponse title: NotFoundResponseErrorData NotFoundResponse: type: object properties: error: $ref: '#/components/schemas/NotFoundResponseErrorData' modelgates_metadata: type: - object - 'null' additionalProperties: description: Any type user_id: type: - string - 'null' required: - error description: Not Found - Resource does not exist title: NotFoundResponse TooManyRequestsResponseErrorData: type: object properties: code: type: integer message: type: string metadata: type: - object - 'null' additionalProperties: description: Any type required: - code - message description: Error data for TooManyRequestsResponse title: TooManyRequestsResponseErrorData TooManyRequestsResponse: type: object properties: error: $ref: '#/components/schemas/TooManyRequestsResponseErrorData' modelgates_metadata: type: - object - 'null' additionalProperties: description: Any type user_id: type: - string - 'null' required: - error description: Too Many Requests - Rate limit exceeded title: TooManyRequestsResponse InternalServerResponseErrorData: type: object properties: code: type: integer message: type: string metadata: type: - object - 'null' additionalProperties: description: Any type required: - code - message description: Error data for InternalServerResponse title: InternalServerResponseErrorData InternalServerResponse: type: object properties: error: $ref: '#/components/schemas/InternalServerResponseErrorData' modelgates_metadata: type: - object - 'null' additionalProperties: description: Any type user_id: type: - string - 'null' required: - error description: Internal Server Error - Unexpected server error title: InternalServerResponse BadGatewayResponseErrorData: type: object properties: code: type: integer message: type: string metadata: type: - object - 'null' additionalProperties: description: Any type required: - code - message description: Error data for BadGatewayResponse title: BadGatewayResponseErrorData BadGatewayResponse: type: object properties: error: $ref: '#/components/schemas/BadGatewayResponseErrorData' modelgates_metadata: type: - object - 'null' additionalProperties: description: Any type user_id: type: - string - 'null' required: - error description: Bad Gateway - Provider/upstream API failure title: BadGatewayResponse securitySchemes: apiKey: type: http scheme: bearer description: API key as bearer token in Authorization headerSDK Code Examples
python
import requests url = "https://modelgates.ai/api/v1/generation/content" querystring = {"id":"gen-1234567890"} headers = {"Authorization": "Bearer <token>"} response = requests.get(url, headers=headers, params=querystring) print(response.json())